From 29e2fed39ce1b378c58c59b64ea5859af70029d4 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Thu, 3 Sep 2020 18:59:44 +0800 Subject: [PATCH] update code --- tools/program.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/program.py b/tools/program.py index 09552f41..56f6b699 100755 --- a/tools/program.py +++ b/tools/program.py @@ -208,14 +208,14 @@ def build_export(config, main_prog, startup_prog): with fluid.unique_name.guard(): func_infor = config['Architecture']['function'] model = create_module(func_infor)(params=config) - loss_type = config['Global']['loss_type'] - if loss_type == "srn": + algorithm = config['Global']['algorithm'] + if algorithm == "SRN": image, others, outputs = model(mode='export') else: image, outputs = model(mode='export') fetches_var_name = sorted([name for name in outputs.keys()]) fetches_var = [outputs[name] for name in fetches_var_name] - if loss_type == "srn": + if algorithm == "SRN": others_var_names = sorted([name for name in others.keys()]) feeded_var_names = [image.name] + others_var_names else: -- GitLab