Skip to content

Commit

Permalink
restore layer info in tensor board
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart committed Jul 11, 2023
1 parent c3c21ed commit ed18edb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bird_cloud_gnn/gnn_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,13 @@ def fit_and_evaluate(

epoch_values["Loss/test"] = test_loss
epoch_values["Accuracy/test"] = num_correct / num_total
# to visualise distribution of tensors
# epoch_values["Layer/conv1"] = self.conv1.weight.detach()

for i, pg in enumerate(optimizer.param_groups):
epoch_values[f"LearningRate/ParGrp{i}"] = pg["lr"]
# epoch_values["Layer/conv3"] = self.conv3.weight.detach()
# to visualise distribution of tensors
for i, layer in enumerate(self.layers):
if not isinstance(layer, (nn.ReLU, nn.LeakyReLU, nn.ELU)):
epoch_values[f"Layer/conv{i}"] = layer.weight.detach()
if self.num_classes == 2:
epoch_values["FalseNegativeRate/test"] = num_false_negative / num_total
epoch_values["FalsePositiveRate/test"] = num_false_positive / num_total
Expand Down

0 comments on commit ed18edb

Please sign in to comment.