From e2082162ead5f3a35d67f2a370ae6c47108c85c4 Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Wed, 5 Aug 2020 09:03:10 +0000 Subject: [PATCH] add config --- tools/eval_multi_platform.py | 2 +- tools/train_multi_platform.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/eval_multi_platform.py b/tools/eval_multi_platform.py index bd3e121b..90f87f7e 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 ba024e89..1583a98c 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( -- GitLab