Yes, you should have something of the shape (batch_size, linear_in), and after the linear layer you will have something of the shape (batch_size, linear_out), where your linear layer should be declared like nn.Linear(linear_in, linear_out).