training-progress plots not available
8 次查看(过去 30 天)
显示 更早的评论
Hi all,
I'm training a dlnetwork and want to plot the accuracy, FScore and Loss as it trains. However only Loss is showing as follows:

My training options are as follows:
options = trainingOptions("sgdm",...
LearnRateSchedule="piecewise",...
LearnRateDropPeriod=6,...
LearnRateDropFactor=0.1,...
Momentum=0.9,...
InitialLearnRate=1e-2,...
L2Regularization=0.005,...
ValidationData=dsVal,...
MaxEpochs=18,...
MiniBatchSize=4,...
Metrics = ["accuracy","fscore"], ...
Shuffle="every-epoch",...
CheckpointPath=tempdir,...
VerboseFrequency=10,...
ValidationPatience=4, ...
Plots="training-progress");
3 个评论
colordepth
2025-4-15
Please share the values of the metrics recorded in your 'info' variable. I wonder if they are being stored as NaN for some reason.
tHistory = info.TrainingHistory; % This table contains the recorded training metrics.
disp(tHistory.TrainingAccuracy);
I cannot imagine why it would contain NaN values, or why the accuracy would not be calculated at each training iteration. This may be worth an investigation though, please share the output of the above commands.
回答(1 个)
Adarsh
2025-5-2
I understand that you are following the “https://uk.mathworks.com/help/deeplearning/ug/semantic-segmentation-using-deep-learning.html”
Example to train a segmentation model in MATLAB and facing issues with the “Metric” attribute in the “trainingOptions” object.
However, in a segmentation model, the outputs are pixel-wise results other than just class-based probabilities that are expected in a general classification problem.
From what I found in the documentation, “accuracyMetric” is designed for general classification tasks not for pixel-wise classification tasks, So when the output of the model is passed for calculation of accuracy it receives an pixel-wise array of 3 channel outputs rather than a single array of class-based probabilities, hence due to this inconsistency the Accuracy and F1-Score plots are empty.
For this reason, the metrics for segmentation models is computed in a different manner which is shown in the example that you are following.
In the example, “semanticseg” function is used to run the inference and it returns a “pixelLabelDatastore” object which is then passed to “evaluateSemanticSegmentation” function for the computation of the Metrics required.
The “evaluateSemanticSegmentation” returns the metrics such as “accuracy”, “bfscore”, “global-accuracy”, “iou” and “weighted-iou”.
For more information, you can refer to the following documentation links:
- https://www.mathworks.com/help/releases/R2024b/deeplearning/ref/deep.metric.accuracymetric.html
- https://www.mathworks.com/help/releases/R2024b/vision/ref/semanticsegmentationmetrics.html
- https://www.mathworks.com/help/releases/R2024b/vision/ref/pixellabeldatastore.html
- https://www.mathworks.com/help/releases/R2024b/vision/ref/evaluatesemanticsegmentation.html
I hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!