I change this line into
model_test = model_unet(model_Inputs[0], 3, 5)
raise ValueError("Target size ({}) must be the same as input size ({})".format(target.size(), input.size()))
ValueError: Target size (torch.Size([4, 1, 256, 256])) must be the same as input size (torch.Size([4, 5, 256, 256]))
my train images is 3 channels,and label images is 1 channel ,and label values is 0,1,2,3,4,could you tell me how solve this problem?
You will have to add softmax at end. This was designed for binary classification, so try adding softmax at the output and check.
Check the output of torch summary.
I change this line into
model_test = model_unet(model_Inputs[0], 3, 5)
my train images is 3 channels,and label images is 1 channel ,and label values is 0,1,2,3,4,could you tell me how solve this problem?