Keras + TensorFlow Realtime training chart

前端 未结 2 1085
误落风尘
误落风尘 2021-02-04 04:54

I have the following code running inside a Jupyter notebook:

# Visualize training history
from keras.models import Sequential
from keras.layers import Dense
impo         


        
2条回答
  •  滥情空心
    2021-02-04 05:26

    There is livelossplot Python package for live training loss plots in Jupyter Notebook for Keras (disclaimer: I am the author).

    from livelossplot import PlotLossesKeras
    
    model.fit(X_train, Y_train,
              epochs=10,
              validation_data=(X_test, Y_test),
              callbacks=[PlotLossesKeras()],
              verbose=0)
    

    To see how does it work, look at its source, especially this file: https://github.com/stared/livelossplot/blob/master/livelossplot/outputs/matplotlib_plot.py (from IPython.display import clear_output and clear_output(wait=True)).

    A fair disclaimer: it does interfere with Keras output.

提交回复
热议问题