How can we save neural network with best validation loss

3 ビュー (過去 30 日間)
Arjun Desai
Arjun Desai 2018 年 7 月 9 日
編集済み: Arjun Desai 2018 年 7 月 9 日
Currently I am using the trainNetwork command to train my network model. I want to save the model with the best running validation loss. For example, let us say at epoch 10, my validation loss is 0.2 and that is the lowest validation loss up to that point, then I would save that network model. Then, we reach epoch 11, where the validation loss reaches 0.1, we would also save this model (i.e. running best validation loss model).
My network contains batchNormalization layers, and as a result, I cannot use the models saved at checkpoints as the batchNormalization layers' parameters TrainedMean and TrainedVariance are not initialized.
Is there a work around for this? I know that tensorflow/Keras supports saving models with the best validation loss that do contain batchNormalization layers.

回答 (0 件)

カテゴリ

Help Center および File ExchangeCustom Training Loops についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by