Hi,
The first dimension is alwasy the batch size. So x has a batch size of 1024 and 1024 features for each sample.
When going through self.fc, it changes the feature size and the last linear makes it go to 1. And so the output has the same batch size: 1024 and feature size of 1. Hence the output size of 1024x1.