Getting error while running alexnet

조회 수: 4 (최근 30일)
Tan
Tan 2023년 5월 14일
댓글: Walter Roberson 2024년 5월 2일
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'.

답변 (1개)

Walter Roberson
Walter Roberson 2023년 5월 14일
편집: Walter Roberson 2023년 5월 14일
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
mukthi
mukthi 2024년 5월 2일
Even though showing error as unrecognised function or variable 'alexnet'
Walter Roberson
Walter Roberson 2024년 5월 2일
"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."

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by