Closed henrypinkard closed 4 years ago
Could you please print the explicit versions AND exact lines how you import relevant Keras and TensorFlow functions?
In particular, are you sure you don't want to use PlotLossesKerasTF
?
In any case, the https://github.com/stared/livelossplot/blob/master/livelossplot/inputs/generic_keras.py is very minimalistic, and only needs on_epoch_end
in Keras Callbacks.
I checked the currents docs and it should work: https://keras.io/guides/writing_your_own_callbacks/. See also:
import tensorflow as tf
import tensorflow.keras as keras
print(keras.__version__)
print(tf.__version__)
gives
2.3.0-tf
2.2.0
Python 3.6.10
Not sure. I just found out about your library and followed the example on this StackOverflow post. Doesn't matter to me since I got a hacked version working. Just wanted to report for the benefit of others who might be similarly confused
Oh, I see. In your case
from livelossplot import PlotLossesKerasTF
should work. PlotLossesKeras
is for bare Keras, i.e. one imported with import keras
.
Both Keras Callbacks are similar, but not the same - hence some possible issues.
I am happy you solved the problem anyway! :)
Trying to pass in the callback function gives:
AttributeError: 'PlotLossesCallback' object has no attribute '_implements_train_batch_hooks'
Can be fixed with:
latest keras, lateest tensorflow, python3.6