Commit 5b681a95 authored by Yuxin Wu's avatar Yuxin Wu

global_step in trainer was computed wrong (fix #364)

parent 1dbf6154
...@@ -179,7 +179,7 @@ class Trainer(object): ...@@ -179,7 +179,7 @@ class Trainer(object):
""" """
try: try:
return self._starting_step + \ return self._starting_step + \
self.config.steps_per_epoch * (self.epoch_num - 1) + \ self.config.steps_per_epoch * (self.epoch_num - self.config.starting_epoch) + \
self.local_step + 1 # +1: the ongoing step self.local_step + 1 # +1: the ongoing step
except AttributeError: except AttributeError:
return get_global_step_value() return get_global_step_value()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment