diff --git a/tools/eval_multi_platform.py b/tools/eval_multi_platform.py index bd3e121b572155107f673ef95fb4409a90130f25..90f87f7e45aa42feaa3e08047a61903fb4b758cb 100644 --- a/tools/eval_multi_platform.py +++ b/tools/eval_multi_platform.py @@ -68,7 +68,7 @@ def main(args): compiled_valid_prog = program.compile(config, valid_prog) program.run(valid_dataloader, exe, compiled_valid_prog, valid_fetchs, -1, - 'eval') + 'eval', config) if __name__ == '__main__': diff --git a/tools/train_multi_platform.py b/tools/train_multi_platform.py index ba024e89d287e66bd6228b9219349ed1728c10c4..1583a98c5b795d18adfbaa250460b9319af80f25 100644 --- a/tools/train_multi_platform.py +++ b/tools/train_multi_platform.py @@ -119,7 +119,7 @@ def main(args): for epoch_id in range(config.epochs): # 1. train with train dataset program.run(train_dataloader, exe, compiled_train_prog, train_fetchs, - epoch_id, 'train', vdl_writer) + epoch_id, 'train', config, vdl_writer) # 2. validate with validate dataset if config.validate and epoch_id % config.valid_interval == 0: @@ -128,11 +128,11 @@ def main(args): with ema.apply(exe): top1_acc = program.run(valid_dataloader, exe, compiled_valid_prog, valid_fetchs, - epoch_id, 'valid') + epoch_id, 'valid', config) logger.info(logger.coloring("EMA validate over!")) top1_acc = program.run(valid_dataloader, exe, compiled_valid_prog, - valid_fetchs, epoch_id, 'valid') + valid_fetchs, epoch_id, 'valid', config) if top1_acc > best_top1_acc: best_top1_acc = top1_acc message = "The best top1 acc {:.5f}, in epoch: {:d}".format(