Skip to content

Commit 6963772

Browse files
Merge pull request huggingface#13 from preyasgarg/patch-2
Update 16_tensorboard.py
2 parents fbb6f59 + b5843ae commit 6963772

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

16_tensorboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def forward(self, x):
8080
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
8181

8282
############## TENSORBOARD ########################
83-
writer.add_graph(model, example_data.reshape(-1, 28*28))
83+
writer.add_graph(model, example_data.reshape(-1, 28*28).to(device))
8484
#writer.close()
8585
#sys.exit()
8686
###################################################
@@ -156,4 +156,4 @@ def forward(self, x):
156156
preds_i = class_preds[:, i]
157157
writer.add_pr_curve(str(i), labels_i, preds_i, global_step=0)
158158
writer.close()
159-
###################################################
159+
###################################################

0 commit comments

Comments
 (0)