This is my VAE. I submit 1x128x128 images, but the output of the network is 1x127x127? Why? I use the exact same parameters for conv and deconv; shouldn’t the output be the same size as well?
tripletVAE(
(encoder): Sequential(
(0): Conv2d(1, 32, kernel_size=(4, 4), stride=(1, 1))
(1): ReLU()
(2): Conv2d(32, 64, kernel_size=(4, 4), stride=(1, 1))
(3): ReLU()
(4): Conv2d(64, 64, kernel_size=(4, 4), stride=(1, 1))
(5): ReLU()
(6): Conv2d(64, 128, kernel_size=(4, 4), stride=(2, 2))
(7): ReLU()
)
(z_enter): Linear(in_features=430592, out_features=512, bias=True)
(z_develop): Linear(in_features=512, out_features=430592, bias=True)
(decoder): Sequential(
(0): ConvTranspose2d(128, 64, kernel_size=(4, 4), stride=(2, 2))
(1): ReLU()
(2): ConvTranspose2d(64, 64, kernel_size=(4, 4), stride=(1, 1))
(3): ReLU()
(4): ConvTranspose2d(64, 32, kernel_size=(4, 4), stride=(1, 1))
(5): ReLU()
(6): ConvTranspose2d(32, 1, kernel_size=(4, 4), stride=(1, 1))
(7): Sigmoid()
)
)