Getting error while running alexnet

12 vues (au cours des 30 derniers jours)
Tan
Tan le 14 Mai 2023
net =alexnet('Weights','none');
lys = net.Layers();
lys(end-3:end)
getting error:
Unrecognized method, property, or field 'Layers' for class 'nnet.cnn.layer.Layer'.

Réponses (1)

Walter Roberson
Walter Roberson le 14 Mai 2023
Modifié(e) : Walter Roberson le 14 Mai 2023
When you call alexnet() with 'Weights', 'none' then the result you get back is a Layer array, not a DagNetwork or LayerGraph. The list of layers that you are trying to get is just the same as net itself in this case.
You need the .Layers() if you load in the regular pre-trained alexnet
  11 commentaires
mukthi
mukthi le 2 Mai 2024
Even though showing error as unrecognised function or variable 'alexnet'
Walter Roberson
Walter Roberson le 2 Mai 2024
"This function requires Deep Learning Toolbox™ Model for AlexNet Network support package. If this support package is not installed, the function provides a download link. Alternatively, see Deep Learning Toolbox Model for AlexNet Network."

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by