Solved by ptrblck in post #7 
              
              
                It seems you are not using Ni in your model architecture, but Fm3 instead. 
The number of input features to the first linear layer should match the (flattened) output shape of the preceding layer. 
If your conv layer outputs an activation of [batch_size, out_channels, 1, 1], in_features of the linea…