fix Pylint Warning too-many-function-args

This commit is contained in:
shijianning 2020-05-12 09:14:03 +08:00
parent 206b36cc9a
commit 42ac7c5028
2 changed files with 8 additions and 8 deletions

View File

@ -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))

View File

@ -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)