Skip to content

Commit 4c7ba46

Browse files
committedMar 14, 2023
If we call without the epoch value, we can't log to tensorboard (we have no absolute reference to where we are at the training process).
1 parent 5e31e00 commit 4c7ba46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ def validate(
10431043

10441044
batch_time_m.update(time.time() - end)
10451045
end = time.time()
1046-
if should_log_to_tensorboard(args):
1046+
if should_log_to_tensorboard(args) and epoch is not None:
10471047
#by the updates
10481048
tensorboard_writer.add_scalar('val/loss', losses_m.val, epoch*last_idx+batch_idx)
10491049
tensorboard_writer.add_scalar('val/acc1', top1_m.val, epoch*last_idx+batch_idx)

0 commit comments

Comments
 (0)
Failed to load comments.