Solved by Nikronic in post #2 
              
              
                Hi, 

This is a matrix operation, so, MxN * MxN is not valid. Linear layer needs second dimension in your data as its input channels. So the correct way is: 
self.fc1 = nn.Linear(3122, any_arbitrary_number)

A small snippet to understand operation: 
x = torch.randn(5, 3)
nn.Linear(3, any_number)(x) …