tensorflow-yolov4-tflite icon indicating copy to clipboard operation
tensorflow-yolov4-tflite copied to clipboard

请问在运行convert_tflite.py时以下报错什么原因

Open mengxiangqiqin opened this issue 3 years ago • 4 comments

将save_model.py得到的模型文件进行tflite convert时出现下面报错 tensorflow.lite.python.convert_phase.ConverterError: Variable constant folding is failed. Please consider using enabling experimental_enable_resource_variables flag in the TFLite converter object. For example, converter.experimental_enable_resource_variables = True

请问如何解决

mengxiangqiqin avatar Mar 21 '22 13:03 mengxiangqiqin

I had a similar issue with yolo v4 tiny:

tensorflow.lite.python.convert_phase.ConverterError: <unknown>:0: error: loc("batch_normalization/moving_mean"): is not immutable, try removing mutable variables in your model since mutable variables are currently not supported through this converter

UcefMountacer avatar Mar 27 '22 21:03 UcefMountacer

請安裝 pip install tenosorflow==2.3.0

leeprinxin avatar Mar 31 '22 14:03 leeprinxin

For those who following this repo, strongly suggest to stick with the tensorflow2.3.0rc0 version, you could find a docker image from here

TZECHIN6 avatar Jun 16 '22 06:06 TZECHIN6

For those who following this repo, strongly suggest to stick with the tensorflow2.3.0rc0 version, you could find a docker image from here

thanks. I installed again tensorflow and seems the new version of 2.9.0 is messing up things.

I have error of XNNPACK with a successfully converted yolo4 tiny :

RuntimeError: failed to invoke XNNPACK runtimeNode number 152 (TfLiteXNNPackDelegate) failed to invoke.

But solved by installing tensorflow 2.8.0

UcefMountacer avatar Jun 30 '22 21:06 UcefMountacer