Oh, I think I must have miscalculated the output size as [batch_size,128,7,7]. Will introducing the padding=1 in self.conv3 solve the problem to give me an output size of [batch_size,1,1,256] as I have to use kernel_size of 8?