You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comparing to metrics that work it seems that in the case of the regression metrics some of the variables (e.g. sum_squared_error) are still attached to the computational graph - which seems to be the cause of the problem. If I add the line,
preds = preds.detach()
to the update() method everything seems to work.
Environment
see colab.
The text was updated successfully, but these errors were encountered:
@pbmstrk actually there are other issues with detaching or keeping attached metrics which are discussed here, so maybe wait for @SkafteNicki to send in a PR for the base class and see if that resolves the issue itself.
@pbmstrk just pushed a commit to PR #4313 that solves the bug (confirmed by running colab model) :]
Basically had to call detach within the self.log code (only Metric objects did not automatically get detached, which is rectified now in the PR)
🐛 Bug
When attempting to log a regression metric object as described here when training for more than one epoch, the following error occurs,
Interestingly, this error only occurs when using regression metrics. For example,
Accuracy()
works without any problems.Boring Model Link
Link
Expected behavior
Logging should work for all metrics.
When comparing to metrics that work it seems that in the case of the regression metrics some of the variables (e.g.
sum_squared_error
) are still attached to the computational graph - which seems to be the cause of the problem. If I add the line,to the
update()
method everything seems to work.Environment
see colab.
The text was updated successfully, but these errors were encountered: