Solved by el_samou_samou in post #2 
              
              
                Hi, 
As you are using convolutional filters, you don t have to specify the input height and with. Yet, as at the end of your classifiers there are linear layers, you can actually retreive the input size from the first linear layer input size which is here 16x5x5. 
Here is the reasonning I use: 
5x5 …