Feature Input layer error MATLAB 2021a

7 ビュー (過去 30 日間)
Dushyant Sahoo
Dushyant Sahoo 2021 年 10 月 22 日
コメント済み: Chunru 2021 年 10 月 23 日
I am running the below code on MATLAB 2021a in Ubuntu 20.04.
numFeatures = 21;
numClasses = 3;
layers = [
featureInputLayer(numFeatures,'Name','input')
fullyConnectedLayer(numClasses, 'Name','fc')
softmaxLayer('Name','sm')
classificationLayer('Name','classification')]
I am not sure why I am getting the below error
Unable to resolve the name nnet.internal.cnn.layer.FeatureInput.
Error in featureInputLayer (line 99)
internalLayer = nnet.internal.cnn.layer.FeatureInput(...
It was working fine in MATLAB2020b. Any help is greatly appreciated.

回答 (1 件)

Chunru
Chunru 2021 年 10 月 23 日
編集済み: Chunru 2021 年 10 月 23 日
featureInputLayer is Introduced in R2020b.
Try:
which featureInputLayer
/MATLAB/toolbox/nnet/cnn/featureInputLayer.m
numFeatures = 21;
numClasses = 3;
layers = [
featureInputLayer(numFeatures,'Name','input')
fullyConnectedLayer(numClasses, 'Name','fc')
softmaxLayer('Name','sm')
classificationLayer('Name','classification')]
layers =
4×1 Layer array with layers: 1 'input' Feature Input 21 features 2 'fc' Fully Connected 3 fully connected layer 3 'sm' Softmax softmax 4 'classification' Classification Output crossentropyex
  4 件のコメント
Dushyant Sahoo
Dushyant Sahoo 2021 年 10 月 23 日
編集済み: Dushyant Sahoo 2021 年 10 月 23 日
How does that help? There seems to be a problem in inbuilt function "featureInputLayer" which is a read only file. I am not sure how to correct the problem. Everything appears to work in MATLAB2020b but not in 2021a.
Chunru
Chunru 2021 年 10 月 23 日
Running inside the .m file allows you to step through the program and locate where things go wrong. Without your machine, that is the most we can suggest. Next thing you can try is to reinstall matlab.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by