fmassa:

You have the wrong size for the linear block, it should probably not be 1633, but something else.


You are correct, it should be 16 * 6 * 6.



 fmassa:

you can construct it with an OrderedDict, so that you don’t need to create a Net class for it.


Thanks for the tips of OrderedDict 
Do PyTorch have any plan to provide layers without a need to specify input size?