Can you share the architecture ? The linear module has only two parameters. Input and output dimensions. Ideally the fully connected ( linear ) will not have input dimension 32512512 (single number) because the number is huge. So repeated convolution and max pooling is carried before using linear layer. View command is used to flatten the convolution layer features into a single dimension by handling batch size. So if it is used the feature map (4x32x512x512) will become (4x(32x512x512)). Here 4 denotes batch size.