Hi,
I wanted to use the layer Conv2Dtranspose and Conv3Dtranspose in order to do deconvolution.
I can get my model built and compiled, but the upsampling part does not seem to work, even when I modify the parameter dilate_rate.
Any idea how to do the upsampling part using ConvXDtranspose?
Or am I misunderstanding how this layer works?
When you say deconvolution, do you mean this or just getting a bigger output by doing transposed convolution?
The parameter to control the upsampling rate in Conv2DTranspose is not dilate_rate but strides. Alternatively, you can use UpSample2D + Conv2D to replace Conv2DTranspose .
Does UpSample2D + Conv2D produce exactly the same effect/result as Conv2DTranspose?
Conceptually yes, but in practice not. Upsample2D enlarges an input tensor by repeating its rows and columns, while Conv2DTranspose not.
Thanks!
Last question to make sure I understand how it works: If strides is the parameter that controls the upsampling, how do we control the strides? In other words, how to I do Conv2D(strides=(1,1))+UpSampling2D(2) with Conv2DTranspose?
You can't. For a transposed convolution to result in a larger output you have to have holes (similar to how strided convolutions are an alternative to pooling). This is one of the reasons it doesn't make sense to call them deconvolution layers.
thanks a lot.
Most helpful comment
Conceptually yes, but in practice not.
Upsample2Denlarges an input tensor by repeating its rows and columns, whileConv2DTransposenot.