Could you post the setup of self.fc1 as well as the shape of x?
Also, which device are you using and in case you are using an older PyTorch release, could you update to the latest one and rerun the code, please?