You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write a custom op and inference a model with it in python. I've read this example https://github.com/microsoft/onnxruntime/blob/rel-1.16.0/onnxruntime/test/testdata/custom_op_library/cpu/cpu_ops.cc and run a model with CustomOpOne successfully, but i notice this function below takes ort::runtime::span as input instead of ort::runtime::tensor(in the case of CustomOpOne).
I tried to add this op in python and inference with it but it came with this error:
[E:onnxruntime:, sequential_executor.cc:514 ExecuteKernel] Non-zero status code returned while running Fuse node. Name:'/Add' Status Message: invalid shape while trying to get a span out of Ort::Custom::Tensor
SO my question is:
1、how can i inference with this op?
2、am i following the right example to implement a custom op?
Thank you.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to write a custom op and inference a model with it in python. I've read this example https://github.com/microsoft/onnxruntime/blob/rel-1.16.0/onnxruntime/test/testdata/custom_op_library/cpu/cpu_ops.cc and run a model with CustomOpOne successfully, but i notice this function below takes ort::runtime::span as input instead of ort::runtime::tensor(in the case of CustomOpOne).

I tried to add this op in python and inference with it but it came with this error:
[E:onnxruntime:, sequential_executor.cc:514 ExecuteKernel] Non-zero status code returned while running Fuse node. Name:'/Add' Status Message: invalid shape while trying to get a span out of Ort::Custom::Tensor

SO my question is:
1、how can i inference with this op?
2、am i following the right example to implement a custom op?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions