Thank you for your reply sir. I have replaced  ‘list’ with nn.ModuleList as you suggested and after adjusting the number of neurons in the convolutional layers, Resnet50 could run. However, VGG and MobileNet still gave the same error. I guess this might be due to some differences in network architectures. Please, could you explain to me how to fix this? I would also like to get better understanding of the design of a transfer learning based FCN model for segmentation problems.
Really appreciate your time, patience and guidance