Regenerating training verbose table from saved traininfo

hi,
i trying to regenerate verbose table as shown below from the traininfo that i saved earlier after finish running the model.
However, when i treid to tabulate the data from traininfo using struct2table i get the following table which is completely different from original verbose table that we got after finish training the model in matlab.
Hope someone could share some help on contructing the same verbose table as the shown in the first figure. Thank you very much.

 採用された回答

yanqi liu
yanqi liu 2021 年 12 月 13 日

0 投票

yes,sir,if you want save the command information,may be use
diary(log);
diary on;
run your code
diary off;
finally,you will get log file,it save the command information

7 件のコメント

Teo
Teo 2021 年 12 月 13 日
do you mean the run the following code before training of the model begin? Currently i already train the model and save the traininfo only. not sure how to tabulate back the data same the the one in first figure.
yanqi liu
yanqi liu 2021 年 12 月 13 日
yes,sir
if already run over,may be use traininfo to plot and view data
but its element is use for per training iteration,so i think it display not the same as the command
Teo
Teo 2021 年 12 月 13 日
yea @yanqi liu, it is ok per iteration but the problem is the tabulated data is just in array format instead of the data itself as in the figure 2 above.
yanqi liu
yanqi liu 2021 年 12 月 13 日
s = fields(traininfo);
for i = 1:length(s)
eval(sprintf('traininfo.%s=traininfo.%s(:);', strtrim(s{i}),strtrim(s{i})));
end
T = struct2table(traininfo);
Teo
Teo 2021 年 12 月 13 日
Thanks @yanqi liu, your code really help solve my the issue i facing. Just curious when i tabulate the data may i know why some iteration having a 'NaN' value for both validation loss and validation accuracy?
yanqi liu
yanqi liu 2021 年 12 月 13 日
yes,sir,the loss NaN is common during train steps
may be the input data、learn rate and so on
for more information,may be check
https://stackoverflow.com/questions/56218256/nan-values-in-loss-in-keras-model#:~:text=If%20you%20are%20getting%20NaN%20values%20in%20loss%2C,function%20domain%2C%20then%20determine%20what%20those%20inputs%20are.
Teo
Teo 2021 年 12 月 13 日
Thank you very much @yanqi liu for your explaination. It helps a lot.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

製品

リリース

R2021a

質問済み:

Teo
2021 年 12 月 10 日

コメント済み:

Teo
2021 年 12 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by