Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Conv1DTranspose, Conv2DTranspose, Conv3DTranspose layers #124

Closed
8 tasks
zaleslaw opened this issue Jun 15, 2021 · 6 comments · Fixed by #315
Closed
8 tasks

Add Conv1DTranspose, Conv2DTranspose, Conv3DTranspose layers #124

zaleslaw opened this issue Jun 15, 2021 · 6 comments · Fixed by #315
Assignees
Labels
good second issue Good for advanced contributors
Milestone

Comments

@zaleslaw
Copy link
Collaborator

zaleslaw commented Jun 15, 2021

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.

@zaleslaw zaleslaw added the good second issue Good for advanced contributors label Jun 15, 2021
@zaleslaw zaleslaw added this to the 0.3 milestone Jun 15, 2021
@avan1235
Copy link
Contributor

avan1235 commented Jun 18, 2021

I would like to take this issue to get to know the ConvTranspose layers if it possible 😊

@zaleslaw I suppose we can add also the Conv1DTranspose layer?

@zaleslaw
Copy link
Collaborator Author

I'm not sure about the Conv1DTranspose layer, it's not added to the Keras, please write here, if you have any ideas/or found some useful articles about its implementations

@avan1235
Copy link
Contributor

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

@mkaze
Copy link
Contributor

mkaze commented 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.

@zaleslaw zaleslaw changed the title Add Conv2DTranspose and Conv3DTranspose layers Add Conv1DTranspose, Conv2DTranspose, Conv3DTranspose layers Jun 21, 2021
@zaleslaw
Copy link
Collaborator Author

Great @mkaze @avan1235 I've updated an issue

@zaleslaw
Copy link
Collaborator Author

zaleslaw commented Aug 5, 2021

@avan1235 partially implemented this, but now have no time to finish this PR. It could be a good starting point for future implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good second issue Good for advanced contributors
Projects
None yet
4 participants