提交 cb415a63 编写于 作者: M malin10

bug fix

上级 8a800d25
...@@ -122,6 +122,10 @@ class SingleTrainer(TranspileTrainer): ...@@ -122,6 +122,10 @@ class SingleTrainer(TranspileTrainer):
with fluid.program_guard(infer_program, startup_program): with fluid.program_guard(infer_program, startup_program):
self.model.infer_net() self.model.infer_net()
if self.model._infer_data_loader is None:
context['status'] = 'terminal_pass'
return
reader = self._get_dataloader("Evaluate") reader = self._get_dataloader("Evaluate")
metrics_varnames = [] metrics_varnames = []
......
...@@ -102,8 +102,8 @@ class TranspileTrainer(Trainer): ...@@ -102,8 +102,8 @@ class TranspileTrainer(Trainer):
if not need_save(epoch_id, save_interval, False): if not need_save(epoch_id, save_interval, False):
return return
# print("save inference model is not supported now.") print("save inference model is not supported now.")
# return return
feed_varnames = envs.get_global_env("save.inference.feed_varnames", None, namespace) feed_varnames = envs.get_global_env("save.inference.feed_varnames", None, namespace)
fetch_varnames = envs.get_global_env("save.inference.fetch_varnames", None, namespace) fetch_varnames = envs.get_global_env("save.inference.fetch_varnames", None, namespace)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册