How to return history of validation loss in Keras

后端 未结 10 928
忘掉有多难
忘掉有多难 2020-12-02 16:37

Using Anaconda Python 2.7 Windows 10.

I am training a language model using the Keras exmaple:

print(\'Build model...\')
model = Sequential()
model.ad         


        
10条回答
  •  余生分开走
    2020-12-02 17:37

    Just an example started from

    history = model.fit(X, Y, validation_split=0.33, nb_epoch=150, batch_size=10, verbose=0)
    

    You can use

    print(history.history.keys())
    

    to list all data in history.

    Then, you can print the history of validation loss like this:

    print(history.history['val_loss'])
    

提交回复
热议问题