Mask RCNN裁剪後移植到Android端,報錯解決方案

模型是在tensorflow r1.12中訓練的,所以使用tensorflow r1.12的源碼編譯libtensorflow_inference.so來配套移植到Android端,結果報了以下兩個錯誤:

1. Op type not registered 'NonMaxSuppressionV3' in binary running on localhost. Make sure the Op and Kernel are registered in the binary running in this process.

參考:https://www.jianshu.com/p/056ba3cbf02a

2. No OpKernel was registered to support Op 'DenseToDenseSetOperation' with these attrs.  Registered devices: [CPU], Registered kernels:

1) 在tensorflow/contrib/makefile/tf_op_files.txt中添加set_kernels.cc

2) 在tensorflow/core/kernels/BUILD中找到:

filegroup(
    name = "android_extended_ops_group2",
    srcs = [

    ]

在srcs裏面加上set_kernels.cc

3) 重新編譯libtensorflow_inference.so

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章