I am trying to train a model by using Unet model. My images are in RGB channel with size of 1024, I am resizing it to (400,400,3). But while training i am getting this error. “The size of tensor a (400) must match the size of tensor b (11) at non-singleton dimension 2”. How to solve this?
You might have several problems. It would be easier to tell if you have provided the implementation, but I am going to name a couple of things to look out for:
- Resizing. You need to make sure you did not just cut a picture, but actually resized it
- Dimensions (original issue). conv2d here are the docs, and you need to focus on exact dimensions described there. I cant tell where the exact issue is without seeing the implementation.
Good luck and familiarize yourself with theory behind all of this machinery.