Actually, I have masks as images of size 480x640. Model() also returns tensors of shape [480, 640]. Now, I am trying to train the model with a set of training images along with its corresponding masks. Please let me know if my implementation is fine or if I have to use any other loss function?
I also tried giving outputs1 directly to criterion() function. Then, it shows this error: ValueError: Expected target size (8, 640), got torch.Size([8, 360, 640])