Prevent from calling compute
#2904
Replies: 1 comment
-
I understand that the automatic call to metric = YourMetric(...)
for batch in dataloader:
metric.update(preds, targets) # just update state
final_result = metric.compute() # call compute once after epoch This approach avoids repeated calls to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The
metric(preds, targets)
will callcompute
automatically. But I do not want it becausecompute
is time-consuming in my problem. So I only want to call it at the end of the evaluation epoch.Beta Was this translation helpful? Give feedback.
All reactions