Hi all,
I’m working with GAN model on my dataset, everything going well but the problem is when I tried to print the input size before and after each layer; suddenly at some point (after many successful iterations) the batch size changes (while printing I notice that) and the running stops because it will a problem of dimensions.
So, originally I chose batch_size = 36 and when it changes, it becomes 24!
And as I said it works well after many iterations but then this happens!
This is an example of what I did:
#the x of size [36,1,32,32]
x = F.relu(self.conv1(x))
print(x.shape) #here x will be [36,128,16,16]

And after a number of iterations the x after x = F.relu(self.conv1(x)) become [24,128,16,16]
Is there an explanation for this strange thing, please?