Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tflite 版本问题 #11

Open
Yakuho opened this issue Apr 8, 2021 · 0 comments
Open

tflite 版本问题 #11

Yakuho opened this issue Apr 8, 2021 · 0 comments

Comments

@Yakuho
Copy link

Yakuho commented Apr 8, 2021

作者你好,你的模型不错,感谢你的开源精神。我尝试使用你的模型去转为tflite的时候遇到的麻烦,转换器貌似不支持一些ops,报错如下

2021-04-08 15:37:58.650532: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
loc(callsite(callsite("map/TensorArrayV2_2@__inference_inference_5346" at "StatefulPartitionedCall@__inference_signature_wrapper_5514") at "StatefulPartitionedCall")): error: requires element_shape to be 1D tensor during TF Lite transformation pass
loc(callsite(callsite("map/TensorArrayV2_2@__inference_inference_5346" at "StatefulPartitionedCall@__inference_signature_wrapper_5514") at "StatefulPartitionedCall")): error: failed to legalize operation 'tf.TensorListReserve' that was explicitly marked illegal
Traceback (most recent call last):
  File "D:\python\lib\site-packages\tensorflow\lite\python\convert.py", line 213, in toco_convert_protos
    enable_mlir_converter)
  File "D:\python\lib\site-packages\tensorflow\lite\python\wrap_toco.py", line 38, in wrapped_toco_convert
    enable_mlir_converter)
Exception: <unknown>:0: error: loc(callsite(callsite("map/TensorArrayV2_2@__inference_inference_5346" at "StatefulPartitionedCall@__inference_signature_wrapper_5514") at "StatefulPartitionedCall")): requires element_shape to be 1D tensor during TF Lite transformation pass
<unknown>:0: note: loc("StatefulPartitionedCall"): called from
<unknown>:0: error: loc(callsite(callsite("map/TensorArrayV2_2@__inference_inference_5346" at "StatefulPartitionedCall@__inference_signature_wrapper_5514") at "StatefulPartitionedCall")): failed to legalize operation 'tf.TensorListReserve' that was explicitly marked illegal
<unknown>:0: note: loc("StatefulPartitionedCall"): called from


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "convert_tflite_model.py", line 9, in <module>
    tflite_model = converter.convert()
  File "D:\python\lib\site-packages\tensorflow\lite\python\lite.py", line 739, in convert
    result = _convert_saved_model(**converter_kwargs)
  File "D:\python\lib\site-packages\tensorflow\lite\python\convert.py", line 637, in convert_saved_model
    enable_mlir_converter=True)
  File "D:\python\lib\site-packages\tensorflow\lite\python\convert.py", line 216, in toco_convert_protos
    raise ConverterError(str(e))
tensorflow.lite.python.convert.ConverterError: <unknown>:0: error: loc(callsite(callsite("map/TensorArrayV2_2@__inference_inference_5346" at "StatefulPartitionedCall@__inference_signature_wrapper_5514") at "StatefulPartitionedCall")): requires element_shape to be 1D tensor during TF Lite transformation pass
<unknown>:0: note: loc("StatefulPartitionedCall"): called from
<unknown>:0: error: loc(callsite(callsite("map/TensorArrayV2_2@__inference_inference_5346" at "StatefulPartitionedCall@__inference_signature_wrapper_5514") at "StatefulPartitionedCall")): failed to legalize operation 'tf.TensorListReserve' that was explicitly marked illegal
<unknown>:0: note: loc("StatefulPartitionedCall"): called from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant