JieHe96 / iOS_Tensorflow_ObjectDetection_Example

An iOS application of Tensorflow Object Detection with different models: SSD with Mobilenet, SSD with InceptionV2, Faster-RCNN-resnet101
129 stars 28 forks source link

Suggestions on "No OpKernel was registered to support Op..." #16

Closed albushuang closed 6 years ago

albushuang commented 6 years ago

Thanks for this project, especially the walk through of project compiling.

Here I tried to follow every step of the walk through and made sure there was nothing left undone, I still got the error "No OpKernel was registered to support Op...", the Op could be 'All', 'Where', 'Less' and etc. I checked all the files and was sure they were defined and tensorflow was recompiled. Therefore I have a suggestion, would you please share 'libtensorflow-core.a' you precompiled? For architecture arm64 and x86_64 as specified in the example? Maybe we can at least try and see what's going on there...

Thank you.

albushuang commented 6 years ago

I found mismatched definitions: in registertypes.h, the macro is "\_ANDROID_TYPESFULL_\", but in the script file you provide is "ANDROID_TYPES_FULL". And the terminal output of compiling is also "ANDROID_TYPES_FULL".

anyways, in register_types.h the macro is skipped due to this macro: SUPPORT_SELECTIVE_REGISTRATION suggested in build_all_ios_ssd.sh.

albushuang commented 6 years ago

After I run the commands in the walk-through again and change macro to __ANDROID_TYPESFULL_\, I can finally get the example project work:

bazel build tensorflow/python/tools:print_selective_registration_header bazel-bin/tensorflow/python/tools/print_selective_registration_header \ --graphs=path/to/graph.pb > ops_to_register.h