Solved by ptrblck in post #9 
              
              
                Static frameworks can infer the input size based on the computation graph. 
I.e. if we know which activation will be passed to the linear layer in advance, we can set the number of input features based on the activation shape. 
However, as the forward pass is not known in advance in PyTorch and the …