Chapter 9 - UNET
troylane opened this issue · 1 comments
troylane commented
Hello,
First Thanks for this book. It is a great learning and reference tool.
I am trying to apply the UNET exercise to my own data. My data masks only have 2 integers [0,1]
I have prepared the data as highlighted in the chapter content. I have made one change which is ce(loss) = = BCELoss instead of cross entropy loss.
I have also changed out_channels=2 (representing the 2 values listed above).
When I run training, I get the following error:
ValueError: Using a target size (torch.Size([4, 512, 512])) that is different to the input size (torch.Size([4, 2, 512, 512])) is deprecated. Please ensure they have the same size.
Any help addressing this would be appreciated.