Unrecognized function or variable 'featureInputLayer'.

I am using Deep Learning Toolbox in 2020a and getting the error message 'Unrecognized function or variable 'featureInputLayer'.'
Do I need to upgrade to something?

6 Comments

Same thing happened to me, I really hope this problem can be solved
What version of MATLAB are you using?
See my original answer. You must be using at least R2020b to access this function.
Please am getting similar error, can I get a solution for it?
A solution was given.

Sign in to comment.

 Accepted Answer

Cris LaPierre
Cris LaPierre on 20 May 2021
Edited: Cris LaPierre on 25 May 2021
This function was introduced in R2020b. You can see what release a function was introduced in at the bottom of the documentation page. You must be using the indicated version or newer to have access to that function.

8 Comments

Thank you very much. It was very helpful.
I am using the version of R2022a and it still doesn't work.
What do you mean by 'doesn't work'? What error message are you getting?
Do you have the Deep Learning Toolbox installed? Run the command ver in your command window and see if it is listed.
If not and you have access to it through your license, use the Add-Ons explorer to install this toolbox.
Same thing happened to me which really frustrating, always says unrecognized function ('featureInputLayer') and I have deep learning toolbox installed but I couldn't find this function at all which already ruined my whole code.
Show us the exact command you're using to call featureInputLayer (so we can make sure you're calling it with the correct syntax) and the full and exact text of the error message you recieve (all the text displayed in red in the Command Window.) Also let's confirm which release of Deep Learning Toolbox you're using: what does this command show when you run it in your MATLAB session?
ver nnet
------------------------------------------------------------------------------------------------- MATLAB Version: 24.1.0.2633879 (R2024a) Update 4 MATLAB License Number: 40912989 Operating System: Linux 5.15.0-1062-aws #68~20.04.1-Ubuntu SMP Wed May 1 15:24:09 UTC 2024 x86_64 Java Version: Java 1.8.0_292-b10 with AdoptOpenJDK OpenJDK 64-Bit Server VM mixed mode ------------------------------------------------------------------------------------------------- Deep Learning Toolbox Version 24.1 (R2024a)
Here is the commands of this part, Please note that all the arguments have been defined previously:
[layers, options] = network_design(50, ...
number_of_classes, validation_data, number_of_feature, ...
16)
layers = [featureInputLayer(number_of_feature, 'Normalization', 'zscore')
fullyConnectedLayer(hidden_layer)
batchNormalizationLayer
reluLayer
fullyConnectedLayer(number_of_classes)
softmaxLayer
classificationLayer];
options = trainingOptions ('adam', ...
'MiniBatchSize',mini_batch_size, ...
'Shuffle', 'every-epoch', ...
'ValidationData', validation_data, ...
'Plots', 'training-progress', ...
'Verbose', false);
And here is the command window error: Unrecognized function or variable 'featureInputLayer' .
And for the deep learning toolbox version thing:
Deep Learning Toolbox version 14.0 (R2020a)
The toolbox info is showing you only have R2020a installed. So, see the original answer.
I have to install R2020b and this function will work then, thank you for your quick response. appreciate it

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2020a

Asked:

on 20 May 2021

Commented:

on 22 Apr 2025

Community Treasure Hunt

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

Start Hunting!