-
Notifications
You must be signed in to change notification settings - Fork 453
Fixes #595, support operator InvertPermutation #1117
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
Conversation
Signed-off-by: xavier dupré <[email protected]>
Signed-off-by: xavier dupré <[email protected]>
tf2onnx/onnx_opset/math.py
Outdated
|
||
@tf_op("InvertPermutation") | ||
class InvertPermutationOp: | ||
supported_dtypes = [ |
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.
This seems unused. What is it for?
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.
The operator only supports these types. I was that on other operators. I assumed some verification would automatically happen. Based on your remark, I assume not. I'll do that then.
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.
Just searched the repo for supported_dtypes
. It is usually declared in a function and then iterated through for casting purposes. I think you might have seen it and mistakenly thought it should be assigned in a class. You defined it in RFFT, ComplexAbs, and Atan2 but I don't think it should be included. Sorry I didn't catch that sooner.
tf2onnx/onnx_opset/math.py
Outdated
outputs = [topk_unused, utils.port_name(topk_indices, 1)] | ||
topk_node = ctx.make_node( | ||
"TopK", inputs=[neg_node.output[0], shape_node.output[0]], | ||
name=utils.make_name(node.name + '_topk'), outputs=outputs) |
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.
The output names should be node_name:0 and node_name:1 which I think make_node will assign automatically. make_name is for making node names, not output names, I think.
Signed-off-by: xavier dupré <[email protected]>
No description provided.