Hi Joseph,
As the error message says, the reason is the target tensor is ByteTensor though it’s expected to be LongTensor. So, specify the target to be Long. There exist some solutions, but for example, in the dataset,
self.image_list.append((torch.tensor(color.rgb2gray(img)), torch.tensor(mask, dtype=torch.long))) #converts car image to grayscale