Palash_Shah:

The size of images and masks is (1, 1, 128, 128)


Hi,
If the size of images and masks are [1, 1, 128, 128] then is not your images 2D?
Also, how can you do



 Palash_Shah:

image = torch.reshape(image, shape=(1, 128, 128, 128))


when you have only 128*128 elements?
Although error says inputs are [1, 1, 128, 128, 128] which still I cannot understand how your inputs of size [1, 1, 128, 128] became 3d.
Bests