Let’s work through the sizes:
The output of the POOL3 layer has size (1, 256, 1, 1).
The output of the view is (1, 256)
The output of the FC1 layer is (1, 256)
The output of the FC2 layer is (1, 1024)
It doesn’t make sense to BatchNorm2d over something of size (1, 1024). Perhaps you meant BatchNorm1d?