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'
Tried converting a yolov12-nano model to tflite but it gave an error.
Error