-
Notifications
You must be signed in to change notification settings - Fork 462
Add tf custom op conversion example #1878
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: hwangdeyu <[email protected]>
|
This pull request introduces 1 alert when merging 561765d into 8f2e84b - view on LGTM.com new alerts:
|
04cce83 to
ffe7769
Compare
Signed-off-by: hwangdeyu <[email protected]> Co-authored-by: fatcat-z <[email protected]>
fatcat-z
left a 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.
LGTM, thanks!
|
This pull request introduces 1 alert when merging 6c5523c into 8f2e84b - view on LGTM.com new alerts:
|
| x_ = AddOne.add_one(x) | ||
| _ = tf.identity(x_, name="output") | ||
|
|
||
| onnx_graph = tf2onnx.tfonnx.process_tf_graph(sess.graph, |
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.
don't use the OLD api !!!
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.
will change a new example and use tf2 api
| node.input.append(const_one) | ||
|
|
||
|
|
||
| with tf.compat.v1.Session() as sess: |
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.
don't use TF1 !!
| */ | ||
|
|
||
| #include "tensorflow/core/framework/op.h" | ||
| #include "tensorflow/core/framework/shape_inference.h" |
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.
I don't understand the purpose of this example.
A tf2onnx user will already have the tensorflow custom op, aka this code here he already has it.
Should the example not be AddOne in onnxruntime ?
Add tf custom op conversion example
Signed-off-by: hwangdeyu [email protected]