Conv2D or ConvTranspose2D

I have a CNN for image reconstruction. My Input is a low resolution image resized to the same dimension as the high resolution ouput. Should i use Conv2D or ConvTranspose2D?

Deconvolution (ConvTranspose2D) can result in some unwanted artefacts in the final images.

Most state of the art image generation networks (see stylegan or progan) have dedicated upscaling followed by non-resizing convolution (stride-1) layers.


https://towardsdatascience.com/progan-how-nvidia-generated-images-of-unprecedented-quality-51c98ec2cbd2

I would suggest something like this (say we want to double the image resolution):

nn.Upsample(scale_factor=2, mode="nearest" )
nn.Conv2d( in_channels=C_in, out_channels=C_out, kernel_size=3, stride=1, padding=1 )
2 Likes