stared / livelossplot

Live training loss plot in Jupyter Notebook for Keras, PyTorch and others
https://p.migdal.pl/livelossplot
MIT License
1.29k stars 143 forks source link

No attribute '_implements_train_batch_hooks' #100

Closed PepijnBoers closed 4 years ago

PepijnBoers commented 4 years ago

I came across an attribute error, when running a simple fit function that has always worked with livelossplot.

My code:

from livelossplot import PlotLossesKeras
model.fit(X_images, y_images, validation_data=(X_val_images, y_val_images), epochs = 50, callbacks=[PlotLossesKeras()])

This gave the following error: AttributeError: 'PlotLossesCallback' object has no attribute '_implements_train_batch_hooks'

Code runs fine without the callback.

PepijnBoers commented 4 years ago

Error caused by using Tensorflow version 2. Issue resolved in Google Colab by running following code before importing Tensorflow:

%tensorflow_version 1.x

TheCrazyT commented 4 years ago

are there any plans on making this work with version 2 of tensorflow?