-
Notifications
You must be signed in to change notification settings - Fork 462
add support for tf.math.is_finite #936
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
Changes from all commits
fef0514
b27648b
5ccb4af
a5373c0
f31ff36
2d5760d
f2bbe8d
c891780
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -625,6 +625,16 @@ def version_7(cls, ctx, node, **kwargs): | |
| return | ||
| raise ValueError("non-const dim is not supported") | ||
|
|
||
| @classmethod | ||
| def version_11(cls, ctx, node, **kwargs): | ||
| dim_node = node.inputs[1] | ||
| if dim_node.is_const(): | ||
| node.type = "Unsqueeze" | ||
| dim = dim_node.get_tensor_value() | ||
| node.set_attr("axes", [dim]) | ||
| ctx.remove_input(node, node.input[1]) | ||
| return | ||
| raise ValueError("non-const dim is not supported") | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 :)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. opset-11 added support for the negative axes. |
||
| @tf_op("StridedSlice") | ||
| class StridedSlice: | ||
|
|
||
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.