Solved by ptrblck in post #2 
              
              
                I would guess this error is raised in self.fc2, as you are feeding the shape: 
x=self.fc2(-1,1901)

instead of the activation x.