keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.98k stars 19.47k forks source link

Add Unpooling Layer #14994

Closed pedrogalher closed 3 years ago

pedrogalher commented 3 years ago

ISystem information.

TensorFlow version (you are using): 2.5 Are you willing to contribute it (Yes/No) : Yes

Describe the feature and the current behavior/state.

Some segmentation models, such as Segnet or Deconvnet rely in the so-called "Unpooling" layer. An implementation of such layer has been implemented for tensorflow 1.x here. However, no official implementation exists neither for Tensorflow 1.x or 2.x.

I think that it could be really useful for the deep learning community to have an official implementation of this type of layer as other frameworks already have one.

I used the existing implementation and tried to adapt it to TF 2.x, but my knowledge about Keras/Tensorflow is very limited and keep getting the error: "TypeError: Could not build a TypeSpec for <KerasTensor: shape=(None, None, None, None) dtype=float32 (created by layer 'tf.scatter_nd_11')> with type KerasTensor" However, I'm willing to colaborate to the implementation of the layer if needed.

Will this change the current api? How?

Who will benefit from this feature? Everybody implementing deep pearning models for semantic segmentation relying on the "Unpool" layer.

pedrogalher commented 3 years ago

I just found out that this layer has been implemented in Tensorflow Addons Threfore, I close the issue.

Pedro