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 support for tf.math.is_finite #936

Merged
merged 8 commits into from May 27, 2020
Merged

add support for tf.math.is_finite #936

merged 8 commits into from May 27, 2020

Conversation

guschmue
Copy link
Collaborator

  • add support for tf.math.is_finite
  • expanddims() does not need to depend on shape in opset-11
  • remove Inverse() from onnx_opset/math.py since this is in ms-domain

@@ -3224,6 +3224,14 @@ def func(x, y):
tf.math.greater_equal(x, y, name=_TFOUTPUT1)
self._run_test_case(func, [_OUTPUT, _OUTPUT1], {_INPUT: x_val, _INPUT1: y_val})

@check_opset_min_version(10)
def test_is_finite(self):
x_val = np.array([5.0, 4.8, 6.8, np.inf, np.nan], dtype=np.float32)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sometimes data has negative-infinity, so might be something to check.

node.set_attr("axes", [dim])
ctx.remove_input(node, node.input[1])
return
raise ValueError("non-const dim is not supported")

Copy link
Contributor

Choose a reason for hiding this comment

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

Is ver_11 same as ver_7, but without the negative axis check? ... if yes, the should we just call ver_7 (less code)? If no, then ignore this comment :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

opset-11 added support for the negative axes.

Copy link
Contributor

@jignparm jignparm left a comment

Choose a reason for hiding this comment

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

LGTM

@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 1 alert when merging a5373c0 into f4f2f04 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 1 alert when merging f31ff36 into f4f2f04 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 1 alert when merging 2d5760d into f4f2f04 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 1 alert when merging f2bbe8d into f4f2f04 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 1 alert when merging c891780 into f4f2f04 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@guschmue guschmue merged commit 695e159 into master May 27, 2020
@guschmue guschmue deleted the gs/add-is_finite branch June 7, 2020 18:26
@guschmue guschmue restored the gs/add-is_finite branch July 24, 2020 14:29
@guschmue guschmue deleted the gs/add-is_finite branch July 24, 2020 14:38
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.

None yet

2 participants