From 42ac7c50283095c41fc4313cf6995bcc276ab39a Mon Sep 17 00:00:00 2001 From: shijianning Date: Tue, 12 May 2020 09:14:03 +0800 Subject: [PATCH] fix Pylint Warning too-many-function-args --- example/alexnet_cifar10/eval.py | 8 ++++---- example/alexnet_cifar10/train.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/example/alexnet_cifar10/eval.py b/example/alexnet_cifar10/eval.py index be71e339950..7ce96d06c26 100644 --- a/example/alexnet_cifar10/eval.py +++ b/example/alexnet_cifar10/eval.py @@ -50,9 +50,9 @@ if __name__ == "__main__": print("============== Starting Testing ==============") param_dict = load_checkpoint(args.ckpt_path) load_param_into_net(network, param_dict) - ds_eval = create_dataset(args.data_path, - cfg.batch_size, - 1, - "test") + ds_eval = create_dataset(data_path=args.data_path, + batch_size=cfg.batch_size, + repeat_size=1, + status="test") acc = model.eval(ds_eval, dataset_sink_mode=args.dataset_sink_mode) print("============== Accuracy:{} ==============".format(acc)) diff --git a/example/alexnet_cifar10/train.py b/example/alexnet_cifar10/train.py index b97843902dd..e0588420e80 100644 --- a/example/alexnet_cifar10/train.py +++ b/example/alexnet_cifar10/train.py @@ -47,10 +47,10 @@ if __name__ == "__main__": model = Model(network, loss, opt, metrics={"Accuracy": Accuracy()}) # test print("============== Starting Training ==============") - ds_train = create_dataset(args.data_path, - cfg.batch_size, - cfg.epoch_size, - "train") + ds_train = create_dataset(data_path=args.data_path, + batch_size=cfg.batch_size, + repeat_size=cfg.epoch_size, + status="train") config_ck = CheckpointConfig(save_checkpoint_steps=cfg.save_checkpoint_steps, keep_checkpoint_max=cfg.keep_checkpoint_max) ckpoint_cb = ModelCheckpoint(prefix="checkpoint_alexnet", directory=args.ckpt_path, config=config_ck)