Skip to content

Commit 27336ee

Browse files
committed
train: Reduce batch size of tensorboard graph writer
1 parent 943a5dd commit 27336ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# 4. Tensorboard
3131
writer = torch.utils.tensorboard.SummaryWriter(os.path.join('runs', config['model']))
32-
writer.add_graph(model, trainloader.__iter__().__next__()[0].to(device))
32+
writer.add_graph(model, trainloader.__iter__().__next__()[0][:2].to(device))
3333

3434
# 5. Train and evaluate
3535
log_loss = tqdm.tqdm(total=0, position=2, bar_format='{desc}', leave=False)

0 commit comments

Comments
 (0)