提交 47c7e62f 编写于 作者: C changzherui 提交者: lvmingfu

modify cb_param.loss for callback

上级 deb00df5
...@@ -111,7 +111,7 @@ class StopAtTime(Callback): ...@@ -111,7 +111,7 @@ class StopAtTime(Callback):
cb_params = run_context.original_args() cb_params = run_context.original_args()
epoch_num = cb_params.cur_epoch_num epoch_num = cb_params.cur_epoch_num
step_num = cb_params.cur_step_num step_num = cb_params.cur_step_num
loss = cb_params.cb_params loss = cb_params.net_outputs
cur_time = time.time() cur_time = time.time()
if (cur_time - cb_params.init_time) > self.run_time: if (cur_time - cb_params.init_time) > self.run_time:
print("epoch: ", epoch_num, " step: ", step_num, " loss: ", loss) print("epoch: ", epoch_num, " step: ", step_num, " loss: ", loss)
......
...@@ -110,7 +110,7 @@ class StopAtTime(Callback): ...@@ -110,7 +110,7 @@ class StopAtTime(Callback):
cb_params = run_context.original_args() cb_params = run_context.original_args()
epoch_num = cb_params.cur_epoch_num epoch_num = cb_params.cur_epoch_num
step_num = cb_params.cur_step_num step_num = cb_params.cur_step_num
loss = cb_params.cb_params loss = cb_params.net_outputs
cur_time = time.time() cur_time = time.time()
if (cur_time - cb_params.init_time) > self.run_time: if (cur_time - cb_params.init_time) > self.run_time:
print("epoch: ", epoch_num, " step: ", step_num, " loss: ", loss) print("epoch: ", epoch_num, " step: ", step_num, " loss: ", loss)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册