You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to export yolov8n.pt through TFLite, but encountered the following bug during the export process.
TensorFlow SavedModel: export failure ❌ 20.8s: cannot import name 'metadata_schema_py_generated' from 'tflite_support.metadata' (C:\conda\envs\yolov8\lib\site-packages\tflite_support\metadata.py)
Traceback (most recent call last):
File "c:\my_programm\yolov8\test.py", line 7, in
model.export(format="tflite") # creates 'yolov8n_float32.tflite'
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\model.py", line 591, in export
return Exporter(overrides=args, _callbacks=self.callbacks)(model=self.model)
File "C:\conda\envs\yolov8\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 313, in call
f[5], keras_model = self.export_saved_model()
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 142, in outer_func
raise e
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 137, in outer_func
f, model = inner_func(*args, **kwargs)
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 900, in export_saved_model
f.unlink() if "quant_with_int16_act.tflite" in str(f) else self._add_tflite_metadata(file)
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 1024, in _add_tflite_metadata
from tflite_support.metadata import metadata_schema_py_generated as schema # noqa
ImportError: cannot import name 'metadata_schema_py_generated' from 'tflite_support.metadata' (C:\conda\envs\yolov8\lib\site-packages\tflite_support\metadata.py)
This is where the error occurred.
But after I imported the same module in both branches, the bug was resolved.
The text was updated successfully, but these errors were encountered:
I want to export yolov8n.pt through TFLite, but encountered the following bug during the export process.
TensorFlow SavedModel: export failure ❌ 20.8s: cannot import name 'metadata_schema_py_generated' from 'tflite_support.metadata' (C:\conda\envs\yolov8\lib\site-packages\tflite_support\metadata.py)
Traceback (most recent call last):
File "c:\my_programm\yolov8\test.py", line 7, in
model.export(format="tflite") # creates 'yolov8n_float32.tflite'
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\model.py", line 591, in export
return Exporter(overrides=args, _callbacks=self.callbacks)(model=self.model)
File "C:\conda\envs\yolov8\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 313, in call
f[5], keras_model = self.export_saved_model()
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 142, in outer_func
raise e
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 137, in outer_func
f, model = inner_func(*args, **kwargs)
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 900, in export_saved_model
f.unlink() if "quant_with_int16_act.tflite" in str(f) else self._add_tflite_metadata(file)
File "C:\conda\envs\yolov8\lib\site-packages\ultralytics\engine\exporter.py", line 1024, in _add_tflite_metadata
from tflite_support.metadata import metadata_schema_py_generated as schema # noqa
ImportError: cannot import name 'metadata_schema_py_generated' from 'tflite_support.metadata' (C:\conda\envs\yolov8\lib\site-packages\tflite_support\metadata.py)
This is where the error occurred.
But after I imported the same module in both branches, the bug was resolved.
The text was updated successfully, but these errors were encountered: