As I expected, It didn’t work. Size is the problem. Data has size
torch.Size([1, 1, 256, 256])
but after x[x!=-10]
torch.Size([62779])
So my model didn’t accept data. But I also tried torch.clamp. I applied this to my data before sending to model and for the ground truth before calculating loss function and so backpropagation. It is working but in a wrong way. I want to estimate weights of my model without taking account of this -10 data. Because I think my model predicts near this -10 region by considering it.