Unverified Commit 76d3d72e authored by Lukasz Kaiser's avatar Lukasz Kaiser Committed by GitHub
Browse files

Merge pull request #4822 from buckman-google/master

Fixed minor bug in STEVE which sometimes prevented resuming experiments.
parents 2689c9ae c1da1ae5
......@@ -155,9 +155,10 @@ class Learner(object):
self.resume_from_checkpoint(epoch)
def _log(self):
logstring = "(%3.2f sec) h%-8.2f e%-8d s%-8d f%-8d\t" % (time.time() - self._log_time, self.hours, self.epoch, self.update_i + 1, self.total_frames) + ', '.join(["%8f" % x for x in (self.running_total / self.denom).tolist()])
print("%s\t%s" % (self.learner_name, logstring))
with open(self.log_path, "a") as f: f.write(logstring + "\n")
if self.denom > 0:
logstring = "(%3.2f sec) h%-8.2f e%-8d s%-8d f%-8d\t" % (time.time() - self._log_time, self.hours, self.epoch, self.update_i + 1, self.total_frames) + ', '.join(["%8f" % x for x in (self.running_total / self.denom).tolist()])
print("%s\t%s" % (self.learner_name, logstring))
with open(self.log_path, "a") as f: f.write(logstring + "\n")
self._reset_inspections()
def _reset_inspections(self):
......
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