How to change plotting options in deep learning networks?

1 回表示 (過去 30 日間)
Fatma Diab
Fatma Diab 2021 年 11 月 11 日
回答済み: Jaynik 2024 年 6 月 28 日
I have trained a deep learning network, and the training progress graph appeared from trainNetwork function. This curve shows training accuracy, smoothed training accuracy, and validation accuracy. I need to remove smoothed training accuracy curve from the graph. Could you please help me? https://ch.mathworks.com/help/deeplearning/ref/trainingoptions.html?fbclid=IwAR0zK3F4pzPV_DqbAkRk_Ou7CmN3viJMXVx-ovnEmLfvc_M8dNWw3vZvMPs

回答 (1 件)

Jaynik
Jaynik 2024 年 6 月 28 日
Hi,
There is no direct way to remove the smoothed training accuracy curve from the graph. If possible, you can upgrade MATLAB and use the "trainnet" function introduced in R2023a. The plots don't provide the smoothed accuracy. Since R2024a, the "trainNetwork" function is not recommended.
Alternately, if it is possible to use custom loops for training the data, you can use the "trainingProgressMonitor" object. It allows for creating animated custom metric plots and record custom metrics during training. Following is an example of using "trainingProgressMonitor":
monitor = trainingProgressMonitor;
addMetrics(monitor, ["TrainingAccuracy", "ValidationAccuracy"]);
% Training loop example
for epoch = 1:numEpochs
% Perform training and validation steps here
% Update custom metrics
recordMetrics(monitor, epoch, ["TrainingAccuracy", trainingAccuracy, "ValidationAccuracy", validationAccuracy]);
end
% Display the training progress monitor
show(monitor);
You can refer the following documentation links to learn about these functions:
Hope this helps!

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by