Skip to content

Can't convert to tflite but can convert in Ultralytics #170

Description

@jideilori

Tried converting a yolov12-nano model to tflite but it gave an error.

model = YOLO("models/best.pt")
model.export(format="tflite", imgsz=640)

Error

TensorFlow SavedModel: export failure ❌ 46.2s: module 'onnx.helper' has no attribute 'float32_to_bfloat16'

site-packages\onnx_graphsurgeon\exporters\onnx_exporter.py", line 134, in <module>
    np.uint16, onnx.helper.float32_to_bfloat16
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'onnx.helper' has no attribute 'float32_to_bfloat16'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions