1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

深層学習(Coral TPU)とかでのPythonエラー「ValueError: Model provided has model identifier '<!', should be 'TFL3'」への対処

Posted at

目的

Coral TPUをCoralのページをみて動かそうとして、
おおぼけで、
以下の難しそうなエラーをたたき出した。

ValueError: Model provided has model identifier '<!', should be 'TFL3'

エラー全体を以下に示す。

C:\_work1\_win_corel1\edgetpu_runtime\corel\tflite-master\python\examples\classification>python classify_image.py --model mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite --labels inat_bird_labels.txt --input images/parrot.jpg
Traceback (most recent call last):
  File "classify_image.py", line 122, in <module>
    main()
  File "classify_image.py", line 99, in main
    interpreter = make_interpreter(args.model)
  File "classify_image.py", line 73, in make_interpreter
    {'device': device[0]} if device else {})
  File "C:\Users\XYZZZ\AppData\Local\Programs\Python\Python37\lib\site-packages\tflite_runtime\interpreter.py", line 205, in __init__
    model_path, self._custom_op_registerers))
ValueError: Model provided has model identifier '

<!', should be 'TFL3'

対処方法

モデルファイルである
mobilenet_v2_1.0_224_inat_bird_quant_edgetpu.tflite
のファイル取得(ダウンロード)に失敗しているだけ。
再度、正しく、取得(ダウンロード)すれば問題なし。
ワタシの場合は、リンク先を保存等で、なんか、
htmlかxmlか、とにかく、モデルじゃないものを、大事にダウンロード保存していました。
サイズでも気づくと思います。普通。

[再掲]
正しく、取得(ダウンロード)すれば問題なし

まとめ

この記事は、、、この間違いをする人が少ないと思うので、微妙だが、
一人二人には、お役に立つ可能性あり。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?