Closed imLogM closed 5 years ago
The error is "Didn't find custom op for name 'Convolution2DTransposeBias' with version 1 Registration failed."
I have solved this problem.
My method is more complex.
The official source code has some "offical custom ops" in tensorflow/lite/kernels
, showing how to add custom_ops.
So I used the following steps:
tensorflow/lite/kernels/relu1.cc
, revise the new custom_ops codes ( *.cc files );tensorflow/lite/kernels/
;tensorflow/lite/kernels/register.cc
to register new custom_ops;tensorflow/lite/kernels/BUILD
, Bazel will compile custom_ops *.cc files into library builtin_op_kernels
.Official guide maybe useful: https://www.tensorflow.org/lite/guide/ops_custom
Great, just came across your issue. In case anybody needs it - here's the full git diff and the BUILD file in the custom_ops directory https://gist.github.com/wolterlw/767a467d6f75b3533cd49482ba25ae7e
I have solved this problem.
My method is more complex. The official source code has some "offical custom ops" in
tensorflow/lite/kernels
, showing how to add custom_ops.So I used the following steps:
- According to
tensorflow/lite/kernels/relu1.cc
, revise the new custom_ops codes ( *.cc files );- Put new custom_ops *.cc files into
tensorflow/lite/kernels/
;- Modify
tensorflow/lite/kernels/register.cc
to register new custom_ops;- Modify
tensorflow/lite/kernels/BUILD
, Bazel will compile custom_ops *.cc files into librarybuiltin_op_kernels
.- Recompile the whole project.
Official guide maybe useful: https://www.tensorflow.org/lite/guide/ops_custom
Could you please share your files which modified compared to tensorflow's source? I have the same problem
I have solved this problem. My method is more complex. The official source code has some "offical custom ops" in
tensorflow/lite/kernels
, showing how to add custom_ops. So I used the following steps:
- According to
tensorflow/lite/kernels/relu1.cc
, revise the new custom_ops codes ( *.cc files );- Put new custom_ops *.cc files into
tensorflow/lite/kernels/
;- Modify
tensorflow/lite/kernels/register.cc
to register new custom_ops;- Modify
tensorflow/lite/kernels/BUILD
, Bazel will compile custom_ops *.cc files into librarybuiltin_op_kernels
.- Recompile the whole project.
Official guide maybe useful: https://www.tensorflow.org/lite/guide/ops_custom
Could you please share your files which modified compared to tensorflow's source? I have the same problem
oh, my method is too complex, you can use @wolterlw 's method.
@wolterlw
Thanks for sharing.
I followed these changes : https://gist.github.com/wolterlw/767a467d6f75b3533cd49482ba25ae7e. Additionally I had to change the include path in each .cc. I am stuck with this error.
`tensorflow/lite/python/interpreter_wrapper/interpreter_wrapper.cc: In static member function 'static tflite::interpreter_wrapper::InterpreterWrapper tflite::interpreter_wrapper::InterpreterWrapper::CreateInterpreterWrapper(std::unique_ptr
I figured out the namespace mediapipe has to be appended in interpreter_wrapper.cc
I figured out the namespace mediapipe has to be appended in interpreter_wrapper.cc tflite_operations::RegisterMaxUnpooling2D() should be mediapipe::tflite_operations::RegisterMaxUnpooling2D()
Thank for your guide! :) But when completed, I got an error "cannot find operation Convolution2DTransposeBias". It seems "CustomOperations" not participating in the compilation. Could you please share your files which modified compared to tensorflow's source, include "CustomOperations" files and "BUILD" files ?