-
Notifications
You must be signed in to change notification settings - Fork 614
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 MaxUnpooling2DV2 layer #2594
Conversation
@tensorflow/sig-addons-maintainers, @thaink - could one of you take a look at this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
@@ -0,0 +1,97 @@ | |||
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2021
@@ -0,0 +1,134 @@ | |||
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing this out @thaink, I have corrected the year in both files.
@WindQAQ @seanpmorgan Can you take a look at this PR? |
from tensorflow_addons.layers.max_unpooling_2d_v2 import MaxUnpooling2DV2 | ||
|
||
|
||
@pytest.mark.usefixtures("maybe_run_functions_eagerly") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a tflite test case too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you provide some clarity regarding this?
Did you mean something like @pytest.mark.with_device(["cpu", "gpu", tf.distribute.MirroredStrategy])
?
"""Unpool the outputs of a maximum pooling operation.""" | ||
output_size_attr = " ".join(["i: %d" % v for v in output_size]) | ||
experimental_implements = [ | ||
'name: "addons:MaxUnpooling2DV2"', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for catching this @fsx950223.
It is not available, and I have removed it from the PR.
Thanks for the PR. |
You should update codeowner too. |
I added myself to .github/CODEOWNERS. |
Description
Add MaxUnpooling2DV2 layer.
The max_pool_with_argmax function can map several input sizes to the same output size. Hence, to avoid ambiguity in the inversion process, the stride and padding arguments have been replaced by the output_size argument. This has been done in a new layer rather than in the existing MaxUnpooling2D class to avoid compatibility issues.
Type of change
Checklist:
How Has This Been Tested?
I run the layer_test