-
Notifications
You must be signed in to change notification settings - Fork 75
EdgeTPU Compiler: Internal compiler error. Aborting. #49
Comments
python3 -m pip install -U --no-cache-dir yolov4 Ref: #45 |
Ok.. I was building a Colab with a repro, then... It suddenly worked. After looking surprised at my screen for a few minutes and some more experiments to verify my finding, it seems that I must have missed something. I'm pretty sure I already tested the latest bits from master in combination with TF2.4. It must have something to do with the training as only weights from my new environment can be converted. I'll experiment a bit more tomorrow/next week but for now we can consider this an issue between my chair and my screen ;-) Again, great work, happy to be able to use this model on my edgetpu! |
I still run into this issue, now that I have a working setup to compare with I'm able to narrow down on my original issue. Giving the train.py setup in the first post, I'm able to convert the first weights file (yolov4-tiny-10.weights) to TF Lite and then to Edge TPU. However, when I'm running the same conversion for a later weights file (like yolov4-tiny-70.weights) from the same training run, I can convert it to TF Lite but not to Edge TPU. This is weird, right? Looking at the generated TF Lite is see a slight difference in the net that might give a clue?!
|
tensorflow v2.4.0 Hmm.... |
Plus When I convert the model without loading the weights file and then compile it, the same error occurs. |
My guess would be that it has to do with the conversion to Quantized TF Lite. It's adding a quantization step in a place that the edgetpu compiler struggles with. When the weights shift during the training, the converter might choose to place these steps in other places? I dont know, I'm definitely not an expert! :-) What would you say, should I raise this as an issue for the TF Lite converter or the Edge TPU Compiler, or is this something that needs to be fixed here? |
Tensorflow 2 changes fast, but there are some incompatibility even though minor version changes. If you use TensorFlow==v2.2.1 and yolov4<=v2.0.1, perhaps, this error doesn't occur. But accuracy is poor. |
I'll give that a try in ~24hr from now! I also saw that @paradigmn disabled the |
I am trying to change the head(include tf.exp) of the model, but I am not sure if the head change will end before the converter support. |
First of all, thanks a lot for the great work/package/documentation!
I trained a YoloV4 Tiny model using this script:
Using the produced weights file, I verified that this model works, looking very promising!
Then I converted to Quantized TFLite using this script:
The produced TF Lite model seems fine:
yolov4-tiny-relu-int8.tflite.zip
But the EdgeTPU Compiler failed with:
I tried lower input resolutions (TF Lite conversion time), nu success. I also tried the conversion with both with the 2.0.1 release on PyPi and with the current master branch. Any clue on what I seem to be missing?
The text was updated successfully, but these errors were encountered: