您的位置:首页 > 大数据 > 人工智能

keras: Why is the training loss much higher than the testing loss?

2017-10-04 11:52 435 查看


Why is the training loss much higher than the testing loss?

A Keras model has two modes: training and testing. Regularization mechanisms, such as Dropout and L1/L2 weight regularization, are turned off at testing time.

Besides, the training loss is the average of the losses over each batch of training data. Because your model is changing over time, the loss over the first batches of an epoch is generally higher than over the last batches. On the other hand, the testing loss
for an epoch is computed using the model as it is at the end of the epoch, resulting in a lower loss.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐