Closed mjkvaak closed 4 years ago
plot_extrema=False
? (To see if it is a problem with plotting extrema or everything).I was tracking only accuracy
:
model.compile(optimizer = RMSprop(),
loss = 'categorical_crossentropy',
metrics = ['accuracy'])
I haven't tried plot_extrema=False
(if it is not a default option). I can try this later and let you know what's the result. It seems that this problem is not only together with ReduceLROnPlateau()
but also happened with LearningRateScheduler()
.
Hi again, sorry for the delayed answer. I experimented with plot_extrema=False
in PlotKerasLosses()
and can confirm that now everything works as it should.
@mjkvaak thank you for testing that.
I think there is an issue with metrics containing an underscore.
@sebastienlange - could you look it, since you introduced https://github.com/stared/livelossplot/commit/6e7892c54851241055fa0f335e159ef6c3d6fe43 ?
Hi, sorry for the late reply. Indeed, I can reproduce it, at least partially. I'll take more time soon to try figure it out.
@mjkvaak Does it work at 0.4.1?
@stared Nope, the same KeyError: 'lr'
still persists at version 0.4.1 :/.
@mjkvaak So, I tried to fix that with 96c4085252c60ec7a54251c7bbb02692057a0251. I don't have the full code, so it is not tested.
But if you uninstall and install livelossplot for this repo (update does not work, as it is still 0.4.1
), it may help. I would be grateful for feedback on that.
It is a quick fix - in general, the extrema stuff need to be rewritten. But for now, it should work.
The new release 0.5.0 should solve the problem. Metrics grouping was rewritten thoughtfully and is now much more configurable.
@mjkvaak and @sebastienlange - let me know it if works now.
I'm training a CNN model and I wanted to both a) be able to reduce the optimizer learning rate when it hits a plateau with ReduceLROnPlateau() and b) visually monitor the losses with livelossplot's PlotKerasLosses(). This combination in callbacks gives me a KeyError: 'lr'. When dropping either one of the functions the training works as it should. Hence my guess is that there must be a compatibility issue with the two.
Keras = 2.2.4 livelossplot = 0.3.4
Here's some code:
And here's the error I get: