Hello, trying to train model on 32x32 images. but got dimensional error.
Here is my Module.
And here is an error
i just don’t get where is that 4th input?
Hello, trying to train model on 32x32 images. but got dimensional error.
Here is my Module.
And here is an error
i just don’t get where is that 4th input?
The fourth dimension is the number of channels. Currently you only have batch size and x and y. You need to add the number of channels. To just do it simply in your forward function you can do this
def forward(self, x):
x = x.unsqueeze(1)
Finally, thank you. I thought that color channels were the first input in self.conv1