Skip to content

Commit 5214c24

Browse files
committed
Windows log filename bugfix
1 parent 747f2e0 commit 5214c24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

train.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,10 @@ def restore_parts(path, model):
952952

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

0 commit comments

Comments
 (0)