Commit c1da1ae5 authored by Jacob Buckman's avatar Jacob Buckman
Browse files

Fixed minor bug in STEVE which sometimes prevented resuming experiments.

parent f789dcf5
...@@ -155,9 +155,10 @@ class Learner(object): ...@@ -155,9 +155,10 @@ class Learner(object):
self.resume_from_checkpoint(epoch) self.resume_from_checkpoint(epoch)
def _log(self): 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()]) if self.denom > 0:
print("%s\t%s" % (self.learner_name, logstring)) 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()])
with open(self.log_path, "a") as f: f.write(logstring + "\n") print("%s\t%s" % (self.learner_name, logstring))
with open(self.log_path, "a") as f: f.write(logstring + "\n")
self._reset_inspections() self._reset_inspections()
def _reset_inspections(self): 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