my model structure is given as follows:
conv2d_31 (Conv2D) (None, 40, 40, 16) 160
_________________________________________________________________
max_pooling2d_4 (MaxPooling2 (None, 20, 20, 16) 0
_________________________________________________________________
conv2d_32 (Conv2D) (None, 20, 20, 32) 12832
_________________________________________________________________
max_pooling2d_5 (MaxPooling2 (None, 10, 10, 32) 0
_________________________________________________________________
conv2d_33 (Conv2D) (None, 10, 10, 64) 100416
_________________________________________________________________
max_pooling2d_6 (MaxPooling2 (None, 5, 5, 64) 0
_________________________________________________________________
flatten_2 (Flatten) (None, 1600) 0
_________________________________________________________________
dense_3 (Dense) (None, 1024) 1639424
_________________________________________________________________
dropout_2 (Dropout) (None, 1024) 0
_________________________________________________________________
dense_4 (Dense) (None, 1) 1025
_________________________________________________________________
activation_52 (Activation) (None, 1) 0
I want to apply Deconvolution to any specific layer and plot the results. I figured I should use the Conv2DTranspose layer but I can't seem to understand the arguments involved in it. Please help
Pay attention to the nomenclature.
Deconvolution is not transposed convolution, although the terms are widely used interchangeably. The correct term to be used is transposed convolution. That is why the layer "deconvolution" does not even exist in Keras, while Conv2DTransposed does.
You can try constructing your deep learning model via the Model API instead of the Sequential API.
In that way, you can add a Conv2DTransposed to a specific layer, and see the result of the transposed convolution.
You can view the transposed convolution layer as an upsampling layer. The former has learnable paramaters, while the latter only double/triples etc. the size of an image by means of interpolation.
Check out Keras documentation for the Functional API (Model API) : https://keras.io/models/model/
Check out Keras documentation for the transposed convolution : https://keras.io/layers/convolutional/
Check out this github account to visually understand transposed convolution : https://github.com/vdumoulin/conv_arithmetic