Hi thank you for your response, I printed the following tensors:
pred = torch.sigmoid(model(x))
out = (pred > 0.5).float()

pred: tensor([[[[0.5138, 0.5134, 0.5132,  ..., 0.5134, 0.5133, 0.5129],
          [0.5128, 0.5126, 0.5120,  ..., 0.5126, 0.5123, 0.5122],
          [0.5135, 0.5133, 0.5126,  ..., 0.5129, 0.5126, 0.5124],
          ...,
          [0.5130, 0.5129, 0.5122,  ..., 0.5128, 0.5128, 0.5131],
          [0.5128, 0.5122, 0.5120,  ..., 0.5126, 0.5127, 0.5132],
          [0.5129, 0.5136, 0.5128,  ..., 0.5136, 0.5141, 0.5139]],

         [[0.5214, 0.5217, 0.5219,  ..., 0.5217, 0.5211, 0.5212],
          [0.5217, 0.5225, 0.5224,  ..., 0.5225, 0.5208, 0.5211],
          [0.5218, 0.5222, 0.5216,  ..., 0.5220, 0.5208, 0.5208],
          ...,
          [0.5212, 0.5216, 0.5210,  ..., 0.5211, 0.5205, 0.5212],
          [0.5211, 0.5212, 0.5207,  ..., 0.5207, 0.5205, 0.5208],
          [0.5206, 0.5209, 0.5202,  ..., 0.5202, 0.5202, 0.5208]],

         [[0.4996, 0.4995, 0.4993,  ..., 0.4992, 0.4993, 0.4991],
          [0.4998, 0.4996, 0.4993,  ..., 0.4992, 0.4995, 0.4989],
          [0.5001, 0.4996, 0.4997,  ..., 0.4997, 0.4996, 0.4994],
          ...,
          [0.5001, 0.5000, 0.5000,  ..., 0.4999, 0.5003, 0.4995],
          [0.5000, 0.4998, 0.5001,  ..., 0.5001, 0.5001, 0.4994],
          [0.4999, 0.4997, 0.4999,  ..., 0.4997, 0.5001, 0.4999]]]],
       device='cuda:0')

out: tensor([[[[1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.],
          ...,
          [1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.]],

         [[1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.],
          ...,
          [1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.],
          [1., 1., 1.,  ..., 1., 1., 1.]],

         [[0., 0., 0.,  ..., 0., 0., 0.],
          [0., 0., 0.,  ..., 0., 0., 0.],
          [1., 0., 0.,  ..., 0., 0., 0.],
          ...,
          [1., 1., 1.,  ..., 0., 1., 0.],
          [0., 0., 1.,  ..., 1., 1., 0.],
          [0., 0., 0.,  ..., 0., 1., 0.]]]], device='cuda:0')

I don’t think pred or out make sense, especially pred because shouldn’t the values be 0, 1, or 2?