fix eval.py data_path conflict

This commit is contained in:
l00486551 2021-06-30 16:54:34 +08:00
parent b2b4b8b7ad
commit c569489674
1 changed files with 2 additions and 2 deletions

View File

@ -98,11 +98,11 @@ def run_eval():
if config.dataset_name == "imagenet":
if not cfg.use_label_smooth:
cfg.label_smooth_factor = 0.0
dataset = create_dataset_imagenet(cfg.data_path, 1, False)
dataset = create_dataset_imagenet(cfg.val_data_dir, 1, False)
loss = CrossEntropySmooth(sparse=True, reduction="mean",
smooth_factor=cfg.label_smooth_factor, num_classes=cfg.num_classes)
elif config.dataset_name == "cifar10":
dataset = create_dataset_cifar(dataset_path=config.data_path,
dataset = create_dataset_cifar(dataset_path=config.val_data_dir,
do_train=True,
repeat_num=1,
batch_size=config.batch_size,