Deconvolution layer (Transposed convolution)

This operation is rather badly named as deconvolution, which implies that it is the inverse operation to convolution, but that is not actually the case. The more apt name is transposed convolution or fractionally-strided convolution.

This layer type offers you a learnable way of upsampling an input volume and can be used every time that you need to intelligently project an input feature map to a higher spatial space. Some use cases include the following:

  • Upsampling (strided transposed convolution) == UNPOOL+CONV
  • Visualizing salient maps
  • As part of autoencoders

In Tensorflow, we have access to transposed convolution within tf.layers. The following example will take an input of spatial size 14 x 14 and put it through the conv2d_transpose layer, where the output spatial size becomes 28 x 28:

# input_im has spatial dimensions 14x14 in this example  
output = tf.layers.conv2d_transpose(inputs=input_im, filters=1, kernel_size=4, strides=2, padding='same') 

Care has to be taken when selecting kernel_size, strides, and padding scheme, as these will all affect the output spatial size.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.158.165