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
Conversation
guschmue
commented
May 26, 2020
- 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) |
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.
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") | ||
|
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 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 :)
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.
opset-11 added support for the negative axes.
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.
LGTM
This pull request introduces 1 alert when merging a5373c0 into f4f2f04 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging f31ff36 into f4f2f04 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 2d5760d into f4f2f04 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging f2bbe8d into f4f2f04 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging c891780 into f4f2f04 - view on LGTM.com new alerts:
|