无法将自定义keras模型转换为tflite

时间:2020-02-01 06:34:36

标签: python tensorflow keras tf-lite

我已经打开了also on the TensorFlow GitHub repository这个问题。

系统信息

Windows 10,每晚通过pip tf安装TensorFlow,TensorFlow 2.2

提供tflite_convert的文本输出

ConverterError: See console for info.
2020-02-01 09:13:14.262240: W tensorflow/compiler/mlir/lite/python/graphdef_to_tfl_flatbuffer.cc:108] Ignored output_format.
2020-02-01 09:13:14.262433: W tensorflow/compiler/mlir/lite/python/graphdef_to_tfl_flatbuffer.cc:111] Ignored drop_control_dependency.
2020-02-01 09:13:14.751498: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
loc(fused["model/head_block2_bn1_8/FusedBatchNorm@__inference__wrapped_model_1223", "StatefulPartitionedCall/model/head_block2_bn1_8/FusedBatchNorm"]): error: non-broadcastable operands
Windows fatal exception: access violation

Current thread 0x00003154 (most recent call first):
  File "c:\users\san10428\.conda\envs\tfpreview\lib\site-packages\tensorflow_core\lite\toco\python\toco_from_protos.py", line 56 in execute
  File "c:\users\san10428\.conda\envs\tfpreview\lib\site-packages\absl\app.py", line 250 in _run_main
  File "c:\users\san10428\.conda\envs\tfpreview\lib\site-packages\absl\app.py", line 299 in run
  File "c:\users\san10428\.conda\envs\tfpreview\lib\site-packages\tensorflow_core\python\platform\app.py", line 40 in run
  File "c:\users\san10428\.conda\envs\tfpreview\lib\site-packages\tensorflow_core\lite\toco\python\toco_from_protos.py", line 93 in main
  File "C:\Users\san10428\.conda\envs\tfpreview\Scripts\toco_from_protos.exe\__main__.py", line 7 in <module>
  File "c:\users\san10428\.conda\envs\tfpreview\lib\runpy.py", line 85 in _run_code
  File "c:\users\san10428\.conda\envs\tfpreview\lib\runpy.py", line 193 in _run_module_as_main

其他任何信息/日志

我正在使用nchw数据格式

0 个答案:

没有答案