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

Fix issue #2102: Set reduction axis of mean to height and width for tf adjust_contrast op #2140

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

cosineFish
Copy link
Contributor

…or adjust_contrast op

Signed-off-by: cosine <cosine_chen@163.com>
def func(x, y):
x_ = tf.image.adjust_contrast(x, y)
return tf.identity(x_, name=_TFOUTPUT)
self._run_test_case(func, [_OUTPUT], {_INPUT: x_val, _INPUT1: y_val})
for x_shape in [[4, 3, 2], [2, 3, 4, 5], [3, 4, 2, 4, 3]]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is [3, 4, 2, 4, 3] a valid input for adjust_contrast() function? Ideally, the rank of image should be 4, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a valid input. This function only requests input at least 3d, but doesn't require input to be 3d or 4d only.
https://www.tensorflow.org/api_docs/python/tf/image/adjust_contrast

Copy link
Collaborator

@fatcat-z fatcat-z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants