From da15e27a4db75dfc21090f5fc321c8cde53fcc50 Mon Sep 17 00:00:00 2001 From: Francesco Mattioli Date: Wed, 6 Nov 2024 13:34:06 +0100 Subject: [PATCH] Added Error for TFLite int8 end2end model export (#17360) Co-authored-by: Glenn Jocher --- ultralytics/engine/exporter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ultralytics/engine/exporter.py b/ultralytics/engine/exporter.py index e764dd4d..39d8d400 100644 --- a/ultralytics/engine/exporter.py +++ b/ultralytics/engine/exporter.py @@ -226,6 +226,8 @@ class Exporter: if self.args.optimize: assert not ncnn, "optimize=True not compatible with format='ncnn', i.e. use optimize=False" assert self.device.type == "cpu", "optimize=True not compatible with cuda devices, i.e. use device='cpu'" + if self.args.int8 and tflite: + assert not model.end2end, "TFLite INT8 export not supported for end2end models, please use half precision." if edgetpu: if not LINUX: raise SystemError("Edge TPU export only supported on Linux. See https://coral.ai/docs/edgetpu/compiler")