Skip to content

Commit

Permalink
Update 16_tensorboard.py
Browse files Browse the repository at this point in the history
model was on graphic card and example_data was on cpu so was throwing error
  • Loading branch information
preyasgarg authored Jan 18, 2022
1 parent e6dd99c commit b5843ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 16_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def forward(self, x):
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)

############## TENSORBOARD ########################
writer.add_graph(model, example_data.reshape(-1, 28*28))
writer.add_graph(model, example_data.reshape(-1, 28*28).to(device))
#writer.close()
#sys.exit()
###################################################
Expand Down Expand Up @@ -156,4 +156,4 @@ def forward(self, x):
preds_i = class_preds[:, i]
writer.add_pr_curve(str(i), labels_i, preds_i, global_step=0)
writer.close()
###################################################
###################################################

0 comments on commit b5843ae

Please sign in to comment.