How to return history of validation loss in Keras

后端 未结 10 920
忘掉有多难
忘掉有多难 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:21

    It's been solved.

    The losses only save to the History over the epochs. I was running iterations instead of using the Keras built in epochs option.

    so instead of doing 4 iterations I now have

    model.fit(......, nb_epoch = 4)
    

    Now it returns the loss for each epoch run:

    print(hist.history)
    {'loss': [1.4358016599558268, 1.399221191623641, 1.381293383180471, h1.3758836857303727]}
    

提交回复
热议问题