Skip to content

Commit b84d0d2

Browse files
glenn-jocherpre-commit-ci[bot]
authored andcommitted
export.py replace check_file -> check_yaml (ultralytics#8852)
* export.py replace `check_file` -> `check_yaml` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent dff15d5 commit b84d0d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
from models.experimental import attempt_load
6868
from models.yolo import Detect
6969
from utils.dataloaders import LoadImages
70-
from utils.general import (LOGGER, check_dataset, check_file, check_img_size, check_requirements, check_version,
70+
from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_version, check_yaml,
7171
colorstr, file_size, print_args, url2file)
7272
from utils.torch_utils import select_device
7373

@@ -490,7 +490,7 @@ def export_tflite(keras_model, im, file, int8, data, nms, agnostic_nms, prefix=c
490490
converter.optimizations = [tf.lite.Optimize.DEFAULT]
491491
if int8:
492492
from models.tf import representative_dataset_gen
493-
dataset = LoadImages(check_dataset(check_file(data))['train'], img_size=imgsz, auto=False)
493+
dataset = LoadImages(check_dataset(check_yaml(data))['train'], img_size=imgsz, auto=False)
494494
converter.representative_dataset = lambda: representative_dataset_gen(dataset, ncalib=100)
495495
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
496496
converter.target_spec.supported_types = []

0 commit comments

Comments
 (0)