Key space/depth operations commonly used in SISR models are missing #20622
Labels
stat:awaiting keras-eng
Awaiting response from Keras engineer
type:feature
The user is asking for a new feature.
Hi! I would like to ask if it would be possible to add support for the
depth to space
andspace to depth
operations commonly found on many SISR models.While you can achieve the same result with some clever usage of
keras.ops.reshape
andkeras.ops.transpose
, both TF and Pytorch offer them as easy to use functions:https://www.tensorflow.org/api_docs/python/tf/nn/depth_to_space
https://www.tensorflow.org/api_docs/python/tf/nn/space_to_depth
https://pytorch.org/docs/stable/generated/torch.nn.PixelShuffle.html
https://pytorch.org/docs/stable/generated/torch.nn.PixelUnshuffle.html
I've been able to find the same operations in the PIX library as well:
https://dm-pix.readthedocs.io/en/latest/api.html#depth-and-space-transformations
This exact same depth to space transformation can be found in the following example:
https://keras.io/examples/vision/super_resolution_sub_pixel/
Thanks in advance =)
The text was updated successfully, but these errors were encountered: