How to see the training progress in CNN?

10 ビュー (過去 30 日間)
Stu
Stu 2018 年 3 月 27 日
コメント済み: Mibang 2023 年 12 月 22 日
When the CNN training is running, how to make it show the training progress (the table with iteration no., training accuracy, loss etc.). I asked for the second output through "info" in the trainNetwork function which gave me a summary at the end. But I want to see it while the training is going on.

採用された回答

Javier Pinzón
Javier Pinzón 2018 年 4 月 6 日
編集済み: Javier Pinzón 2018 年 4 月 6 日
Hello Stu,
In the trainingOptions, you need tu put the option 'Verbose', true, ... , in that way you can see the progress, and set your VerboseFrequency, also, if you are using the 2017b, you can also plot your progress, using the option 'Plots','training-progress', ...
So, a full example may be:
opts = trainingOptions('sgdm', ...
'InitialLearnRate', 0.01, ...
'L2Regularization', 0.004, ...
'Shuffle', 'every-epoch', ...
'MaxEpochs', 20, ...
'MiniBatchSize', 69, ...
'Verbose', true, ...
'VerboseFrequency', 320, ...
'ValidationData',ValidationDS, ...
'ValidationFrequency',160, ...
'ValidationPatience',Inf, ...
'Plots','training-progress', ...
'ExecutionEnvironment', 'auto', ...
'CheckpointPath','data\epoch');
Also I recommend you yo use a MiniBatchSize multiple of your total amount of images of your training dataset, and the VerboseFrequency, be set as TotalImage/MiniBatchSize in that way you will see what happens at the end of every epoch, as in the example, there are a total of 22080 images, and I set 69 as the batch size, so, to see it in every epoch, i said that i wanted to see every 320 iterations the table (320 iter = 1 Epoch).
Hope it may help you.
Regards, Javier
  1 件のコメント
Mibang
Mibang 2023 年 12 月 22 日
Great, thanks, I also took your answer for my work.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by