I’m trying to build a convolutional auto encoder but at the end of the neural net I don’t get the original size of the tensor initial size : torch.Size([2, 3, 360, 640])  I’m using nn.ConvTranspose2d(in_channels=2x, out_channels=x, kernel_size=2, stride=2) multiple times giving the these results :
initial size :  torch.Size([2, 3, 360, 640])

just before 1st convTranspose2d  torch.Size([2, 1024, 22, 39])

just after 1st convTranspose2d  torch.Size([2, 512, 44, 78])

just after 2nd convTranspose2d  torch.Size([2, 256, 88, 156])

just after 3rd convTranspose2d  torch.Size([2, 128, 176, 312])

just after 4th convTranspose2d  torch.Size([2, 64, 352, 624])

end of the NN  torch.Size([2, 3, 354, 626])


Is there any how I can restore my original torch.Size([2, 3, 360, 640]) ?