Open ricardodeazambuja opened 4 years ago
Ok, if nobody from Google wants to help or simply doesn't have time to help, why don't you release the full source code for the bonnet_model_compiler?
Hello, I have the same problem when trying to generate a binaryproto file, have you solved this problem now? I would appreciate it if you can share your solution, thank you very much! @ricardodeazambuja
Hi @0russ, I wouldn't say I really solved the problem because my aim was to automatically replace the operations that make the compiler crash, but after many hours testing I found a way to make it work. Basically, the problem seems connected to new operations added to TF > 1.14. I was able to train the model using TF 1.15.X, but I need to freeze it using TF <= 1.14.X (I can't remember the Xs now...). I'm creating a series of notebooks that go step-by-step from the data collection, labelling, training and the deployment to the AIY Vision Bonnet.... but I haven't pushed to github yet. I will polish and push as a tutorial to a repo in this project https://github.com/thecognifly, probably in one or two weeks ;)
I thought it might because of Hard swish, it is a new activation function proposed in mobilenet_v3.This Bonnet model compile may not support this new activation function.....I'll try to lower my TF version and train the model, thanks again and looking forward to your tutorial! @ricardodeazambuja
Sorry @0russ, I meant the original mobilenet embed config file. The V3 will not work because of the new ops it is using and also the final size (I think I compared the sizes and V3 was bigger even with depth_multiplier: 0.125
because the ssd anchor generator has more layers, etc... I can't remember).
OK,I see. It's all right, thank you for your reminding.@ricardodeazambuja
@ricardodeazambuja Hello I am facing similar problems. I am using the current version of object detection from GitHub and I tried Tensorflow 1.14.0 and 1.15.0. Version 1.15.0 produces even more errors. Output from 1.14.0 is below. Can you please tell me what did you use exactly to make it work?
The series of notebook tutorials you mentioned might be very useful.
Thank you.
2020-10-18 11:58:52.493807: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: TensorArrayV3
2020-10-18 11:58:52.493918: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: TensorArrayScatterV3
2020-10-18 11:58:52.493942: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: TensorArrayV3
2020-10-18 11:58:52.493968: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Enter
2020-10-18 11:58:52.493983: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Enter
2020-10-18 11:58:52.493995: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Enter
2020-10-18 11:58:52.494016: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Enter
2020-10-18 11:58:52.494031: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: LogicalAnd
2020-10-18 11:58:52.494040: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: LoopCond
2020-10-18 11:58:52.494072: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: TensorArrayReadV3
2020-10-18 11:58:52.494085: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Enter
2020-10-18 11:58:52.494096: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Enter
2020-10-18 11:58:52.494124: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: TensorArrayWriteV3
2020-10-18 11:58:52.494138: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Enter
2020-10-18 11:58:52.494164: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: Exit
2020-10-18 11:58:52.494176: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: TensorArraySizeV3
2020-10-18 11:58:52.494198: I external/org_tensorflow/tensorflow/contrib/lite/toco/import_tensorflow.cc:1268] Converting unsupported operation: TensorArrayGatherV3
2020-10-18 11:58:52.499753: F external/org_tensorflow/tensorflow/contrib/lite/toco/tooling_util.cc:822] Check failed: d >= 1 (0 vs. 1)
I finally pushed all the notebooks and instructions here: https://github.com/thecognifly/AIYVisionKit_Utils
Hi,
I've trained the model you can see at the end of this comment and it works (I tested the frozen model with an image and everything was fine), but when I try to compile for the AIY I get this error message:
I'm using these input arguments for the compiler:
I went through bonnet_model_compiler.par (unzipped, modified the python2.7 code, etc), but the important piece of code that is generating the error is tool_a.bin (
b'\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00...
). Which part of my graph is generating the error? Is it the op that comes just after that AddV2? Is it too big? Is it too ugly? :)Any help will be very much appreciated ;)
Cheers,
Ricardo
P.S. the config file for the model: