pythongoogle-colaboratorytensorflow-litetpu

Error: Model provided has model identifier 'ctyp', should be 'TFL3'


I created a tflite model in python, but now I need to compile the model for EdgeTPU. When I use !edgetpu_compiler modelname.tflite in google colab, I am still getting this:

Edge TPU Compiler version 16.0.384591198
ERROR: Model provided has model identifier 'ctyp', should be 'TFL3'

Invalid model: modelname.tflite
Model could not be parsed

I've been searching through the internet but found only this thread on github: https://github.com/synesthesiam/de_deepspeech-aashishag/issues/2, which doesn't work for me.


Solution

  • That error message means there is something about the model file that is corrupt, or incomplete. Recheck the script that outputs the model file to disk, check the file size to be sure it's sensible, etc. I believe there are also processor incompatibilities (ie edge tpu versus arm) in a model file that can generate this same message too, but am less certain of those aspects.