Solved by richard in post #2 
              
              
                The forward function defines how to get the output of the neural net. In particular, it is called when you apply the neural net to an input Variable: 
net = Net()
net(input)  # calls net.forward(input)

The view function takes a Tensor and reshapes it. 
In particular, here x is being resized to a ma…