@ptrblck when I close the Spyder and run the code again I got this error raise TypeError((error_msg.format(type(batch[0])))) TypeError: batch must contain tensors, numbers, dicts or lists; found <class 'PIL.TiffImagePlugin.TiffImageFile'>
I guess should be about a mask that didn’t transform to tensor.
I did check the masks. They include mainly 85 and 170 value, and also some of them have 85,170, and 255 value. The mask looks like this 26. How can I create a mask tensor with class indices?