usuyama / pytorch-unet

Simple PyTorch implementations of U-Net/FullyConvNet (FCN) for image segmentation
https://colab.research.google.com/github/usuyama/pytorch-unet/blob/master/pytorch_unet_resnet18_colab.ipynb
MIT License
827 stars 233 forks source link

Image dimensions do not match #7

Closed Arktius closed 4 years ago

Arktius commented 5 years ago

I've just downloaded your jupyter notebook and got an error that the dimensions do not match. I'm talking about the very first cell in pytorch_fcn.ipynb.

Printed output: "(3,192,192,3) (3,6,192,192)"

Thanks in advance for your help. 👍

Arktius commented 5 years ago

Ok, I've commented out the transpose function in generate_random_data() in simulation.py. In order to see the black pixels, one has to change the calculation of input_images_rgb. Remove " * -255 +255".

usuyama commented 4 years ago

@Arktius Thanks for posting your solution!