Hi Frank, thanks a lot for your answers. I have some more questions if you don’t mind.
Do you think it’s better to use a resnet with 2d convolutions and override the first layer to have input of 160 channels (160 is the number of 256x256 images for each mri) with this command:
model.features[0] = nn.Conv2d(160,64,7,7,7)

But in that case, the model takes 160 channels and then squish them to 64. Usually the models first expand the channels before reducing them. Would that be a problem ?



 KFrank:

Your first error was caused because your input didn’t have the nBatch
dimension. This dimension can have size one if you want, but it has to
be present


The input shape is [2,160,256,256] where theoretically 2 is the nBatch. I don’t know if I’m not getting that right.