I have no idea why moving the model to gpu is not working for me. I don’t think the model is wrong. the model itself works good on cpu(there’s still an error because of the loss function, which is not about the model architecture.), but when I move it to gpu the error occurs. I have tried it on google colab, result was same.
I read the post you gave me, but I don’t think it is wrong with the label and output size. since my work is about image segmentation. I only need two label, background and the target.



 Yolkandwhite:

self.conv1x1_out = nn.Conv2d(64, 2, kernel_size=(1, 1), stride=(1, 1))