How to get the Class Names from a dlNetwork?
Show older comments
Hi All,
I am moving my code from 2023b, to 2024b, and I want to make use of dlNetworks, and the trainnet function in general, to take advantage of the better performance. Most of the code has been fine, except for the move away from classify to minibatchpredict and scores2label.This is my current code, with a series network implementation:
yPred = classify(Model, xAll);
However, classify itself doesn't work with dlNetworks, and as such I have to move on to something like this, according to the documentation:
yPred = predict(Model, cell2mat(xAll)');
Predictions = scores2label(yPred,classNames);
The issue with this is that I have to explicitly save my classNames down, which I don't have to do in the seriesnetwork implementation, although I am aware that it is saved as a private property.
I am just asking is there a way that I can do something similar, where I don't have to save the classnames themselves? Otherwise it seems that seriesnetworks might be a better implementation.
Thanks in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!