How to plot performance graph after CNN training
조회 수: 6 (최근 30일)
이전 댓글 표시
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)
댓글 수: 0
답변 (1개)
Parag
2025년 3월 7일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Recognition, Object Detection, and Semantic Segmentation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!