Skip to content

Commit

Permalink
optimizer metrics should be mean of all available values
Browse files Browse the repository at this point in the history
  • Loading branch information
grantbuster committed Nov 12, 2024
1 parent 7d9af46 commit 5689f64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sup3r/models/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ def get_optimizer_state(cls, optimizer):
state = {'learning_rate': lr}
for var in optimizer.variables:
name = var.name
var = var.numpy().flatten()[0] # collapse single value ndarrays
var = var.numpy().flatten().mean() # collapse ndarrays
state[name] = float(var)
return state

Expand Down

0 comments on commit 5689f64

Please sign in to comment.