Fix catastrophic accuracy degradation of TFLite static quantized integer models (#1695)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
9627323d7c
commit
3c787eb080
3 changed files with 42 additions and 11 deletions
|
|
@ -343,6 +343,8 @@ class YOLO:
|
|||
overrides['imgsz'] = self.model.args['imgsz'] # use trained imgsz unless custom value is passed
|
||||
if 'batch' not in kwargs:
|
||||
overrides['batch'] = 1 # default to 1 if not modified
|
||||
if 'data' not in kwargs:
|
||||
overrides['data'] = None # default to None if not modified (avoid int8 calibration with coco.yaml)
|
||||
args = get_cfg(cfg=DEFAULT_CFG, overrides=overrides)
|
||||
args.task = self.task
|
||||
return Exporter(overrides=args, _callbacks=self.callbacks)(model=self.model)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue