Input dimension

Can someone in this example the input has to be 4-dimensional?

There is an error message saying that the input has to be 4-dimensional if my input is anything but 4-dimensional…

Thanks a lot!

the blocked lines are:

    x = self.fc3(x)
    return x

sorry about that…

The Conv2d class only takes 4 dimensional inputs that’s why.

The inputs should be formated this way :
[batch_size, channels, height, width] if your want your forward to work.

For more information see the doc :slight_smile: