How to plot performance graph after CNN training

3 Ansichten (letzte 30 Tage)
Satyabrata Nath
Satyabrata Nath am 23 Mär. 2017
Beantwortet: Parag am 7 Mär. 2025
I am new in deep learning and unable to plot performance graph after training my CNN architecture . My code is as follows :-
opts = trainingOptions('sgdm',
'Momentum', 0.9,
'InitialLearnRate', 0.001,
'LearnRateSchedule', 'piecewise',
'LearnRateDropFactor', 0.1,
'LearnRateDropPeriod', 8,
'L2Regularization', 0.004,
'MaxEpochs', 40,
'MiniBatchSize', 128,
'Verbose', true);
cifar10Net = trainNetwork(trainingImages, trainingLabels, layers, opts);
YTest = classify(cifar10Net, testImages);
accuracy = sum(YTest == testLabels)/numel(testLabels)

Antworten (1)

Parag
Parag am 7 Mär. 2025
Hi, the current code does not include instructions to plot the performance graph (training progress, accuracy, loss, etc.). However, MATLAB automatically displays the training progress plot by default when using the "trainingOptions" function with the "Plots" property set to "training-progress."
Modify the trainingOptions to include the Plots parameter:
Please refer to MATLAB code for the same
opts = trainingOptions('sgdm', ...
'Momentum', 0.9, ...
'InitialLearnRate', 0.001, ...
'LearnRateSchedule', 'piecewise', ...
'LearnRateDropFactor', 0.1, ...
'LearnRateDropPeriod', 8, ...
'L2Regularization', 0.004, ...
'MaxEpochs', 40, ...
'MiniBatchSize', 128, ...
'Verbose', true, ...
'Plots', 'training-progress'); % Enable performance graph
This will display a real-time training progress plot, including accuracy, loss, and learning rate changes during training.

Kategorien

Mehr zu Recognition, Object Detection, and Semantic Segmentation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by