Sorry, I have not checked the inputs for NaNs or Infs. Can I do that during training? or during the dataloading?. But, as I can see the data, there are no NaNs in the data. Also, the inputs are of .jpg and the masks are of .png.