I am sorry for interruption. I don’t see in your code you are initializing self.fc anywhere.
With regard to the last question: return x is doing self.layer1(x) will do forward pass of your data through the whole layer1 and returning result. If you are returning self.fc.forward(x) it is doing forward pass through it with previously achieved result from layer1.
It is also worth mention, you have to make sure the loss function you are using is awaiting as in input a ‘softmaxed’ version or raw logits (output of the last linear layer).