question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Conv1DTranspose, Conv2DTranspose, Conv3DTranspose layers

See original GitHub issue

Currently, the support for Conv2DTranspose and Conv3DTranspose, Conv1DTranspose are missed, and it would be great to add support for these layers. The desired PR addressing this issue should include:

  • Implementation of layer class named as Conv2DTranspose (you can take inspiration from the implementation of Conv2D as reference)
  • Implementation of layer class named as Conv3DTranspose (you can take inspiration from the implementation of Conv3D as reference)
  • Implementation of layer class named as Conv1DTranspose
  • Common hierarchy of all ConvTranspose layers with abstract class with the common functionality
  • Documentation of layer and all non-private methods
  • JUnit tests in api module
  • Support for export of layer to JSON (see ModelSaver.kt)
  • Support for import of layer from JSON (see ModelLoader.kt)

This operation is sometimes called “deconvolution” after Deconvolutional Networks

De-convolution could be implemented internally via tf.nn.conv2dBackpropInput or tf.nn.conv3dBackpropInput, also you need to implement analogue of convOutputLength function.

Also, if needed, you can take a look at Keras documentation for Conv2DTranspose, and Conv3DTranspose.

NOTE: for the moment, there is no need to add support for “data format” (i.e., channels last vs. channels first) in your PR; you can assume the channels are always in the last dimension.

P.S. If you want to take this ticket, please leave the comment below P.P.S Read the Contributing Guidelines.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mkazecommented, Jun 21, 2021

@zaleslaw Actually, it exists in TF Keras: https://www.tensorflow.org/api_docs/python/tf/keras/layers/Conv1DTranspose But it’s not listed in Keras doc website. And, for the moment, Keras API actually just redirects to TF Keras; so it makes sense to have it.

1reaction
avan1235commented, Jun 21, 2021

I found it here and then think about adding also to KotlinDL. Isn’t it the layer that we are thinking about?

Read more comments on GitHub >

github_iconTop Results From Across the Web

tf.keras.layers.Conv1DTranspose | TensorFlow v2.11.0
The need for transposed convolutions generally arises from the desire to use a transformation going in the opposite direction of a normal ...
Read more >
How to Implement the Conv1DTranspose in keras?
If however you want to go with Conv2DTranspose, you will need to first Reshape the input from 1D to 2D e.g. model =...
Read more >
tf.keras.layers.Conv3DTranspose - TensorFlow 2.4 - W3cubDocs
An integer or tuple/list of 3 integers, specifying the depth, height and width of the 3D convolution window. Can be a single integer...
Read more >
Transposed Convolutions explained with… MS Excel! - Medium
We have got two spatial dimensions so we'll use Conv2DTranspose . Similarly MXNet defines Conv1DTranspose and Conv3DTranspose .
Read more >
mxnet.gluon.nn.Conv2DTranspose
Transposed 2D convolution layer (sometimes called Deconvolution). The need for transposed convolutions generally arises from the desire to use a transformation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found