Skip to content
Snippets Groups Projects
Commit 5b4da676 authored by Bas Nijholt's avatar Bas Nijholt
Browse files

fix bug in doubling of _scale

parent 940342e7
No related branches found
No related tags found
No related merge requests found
...@@ -197,9 +197,14 @@ class Learner1D(BaseLearner): ...@@ -197,9 +197,14 @@ class Learner1D(BaseLearner):
pass pass
# If the scale has doubled, recompute all losses. # If the scale has doubled, recompute all losses.
if self._scale > self._oldscale * 2: # Can only happen when `real`.
losses = {key: self.interval_loss(*key) for key in losses} if real:
self._oldscale = self._scale if self._scale > self._oldscale * 2:
self.real_losses = {key: self.interval_loss(*key)
for key in self.real_losses}
self.losses = {key: self.interval_loss(*key)
for key in self.losses}
self._oldscale = self._scale
def add_point(self, x, y): def add_point(self, x, y):
super().add_point(x, y) super().add_point(x, y)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment