so it doesnt log every iteration by default
@@ -367,6 +367,7 @@ def add_tensorboard_handler(tensorboard_folder, engine, every_iteration=False):
writer.add_scalar(
key, engine.state.epoch_history[key][-1], engine.state.epoch)
+ if every_iteration:
@engine.on(Events.ITERATION_COMPLETED)
def log_iteration_to_tensorboard(engine):
writer = SummaryWriter(tensorboard_folder)
