Skip to content

Commit

Permalink
Windows log filename bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
engiecat committed Mar 10, 2018
1 parent 747f2e0 commit 5214c24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,10 @@ def restore_parts(path, model):

# Setup summary writer for tensorboard
if log_event_path is None:
log_event_path = "log/run-test" + str(datetime.now()).replace(" ", "_")
if platform.system() == "Windows":
log_event_path = "log/run-test" + str(datetime.now()).replace(" ", "_").replace(":","_")
else:
log_event_path = "log/run-test" + str(datetime.now()).replace(" ", "_")
print("Los event path: {}".format(log_event_path))
writer = SummaryWriter(log_dir=log_event_path)

Expand Down

0 comments on commit 5214c24

Please sign in to comment.