提交 7f681eb5 编写于 作者: X xjqbest

fix

上级 2bacabab
...@@ -229,7 +229,7 @@ class SingleInfer(TranspileTrainer): ...@@ -229,7 +229,7 @@ class SingleInfer(TranspileTrainer):
fetch_alias = [] fetch_alias = []
fetch_period = int( fetch_period = int(
envs.get_global_env("runner." + self._runner_name + envs.get_global_env("runner." + self._runner_name +
".fetch_period", 20)) ".print_interval", 20))
metrics = model_class.get_infer_results() metrics = model_class.get_infer_results()
if metrics: if metrics:
fetch_vars = metrics.values() fetch_vars = metrics.values()
...@@ -260,7 +260,7 @@ class SingleInfer(TranspileTrainer): ...@@ -260,7 +260,7 @@ class SingleInfer(TranspileTrainer):
metrics_format = [] metrics_format = []
fetch_period = int( fetch_period = int(
envs.get_global_env("runner." + self._runner_name + envs.get_global_env("runner." + self._runner_name +
".fetch_period", 20)) ".print_interval", 20))
metrics_format.append("{}: {{}}".format("batch")) metrics_format.append("{}: {{}}".format("batch"))
for name, var in metrics.items(): for name, var in metrics.items():
metrics_varnames.append(var.name) metrics_varnames.append(var.name)
......
...@@ -226,7 +226,7 @@ class SingleTrainer(TranspileTrainer): ...@@ -226,7 +226,7 @@ class SingleTrainer(TranspileTrainer):
fetch_alias = [] fetch_alias = []
fetch_period = int( fetch_period = int(
envs.get_global_env("runner." + self._runner_name + envs.get_global_env("runner." + self._runner_name +
".fetch_period", 20)) ".print_interval", 20))
metrics = model_class.get_metrics() metrics = model_class.get_metrics()
if metrics: if metrics:
fetch_vars = metrics.values() fetch_vars = metrics.values()
...@@ -253,7 +253,7 @@ class SingleTrainer(TranspileTrainer): ...@@ -253,7 +253,7 @@ class SingleTrainer(TranspileTrainer):
fetch_alias = [] fetch_alias = []
fetch_period = int( fetch_period = int(
envs.get_global_env("runner." + self._runner_name + envs.get_global_env("runner." + self._runner_name +
".fetch_period", 20)) ".print_interval", 20))
metrics = model_class.get_metrics() metrics = model_class.get_metrics()
if metrics: if metrics:
fetch_vars = metrics.values() fetch_vars = metrics.values()
......
...@@ -62,7 +62,7 @@ runner: ...@@ -62,7 +62,7 @@ runner:
save_inference_feed_varnames: [] # feed vars of save inference save_inference_feed_varnames: [] # feed vars of save inference
save_inference_fetch_varnames: [] # fetch vars of save inference save_inference_fetch_varnames: [] # fetch vars of save inference
init_model_path: "" # load model path init_model_path: "" # load model path
fetch_period: 10 print_interval: 10
- name: runner2 - name: runner2
class: single_infer class: single_infer
# num of epochs # num of epochs
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册