Undefined function or variable 'sequenceInputLayer' when following Matlab Example with all extensions installed
5 次查看(过去 30 天)
显示 更早的评论
I'm trying to follow the Time Series Forecasting Using Deep Learning example from the Neural Network Toolbox.
I'm fairly certain that I have the correct packages installed. Image of my add-ons manager is below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191418/image.png)
Following the example line for line, I get stock on the following command:
layers = [ ...
sequenceInputLayer(inputSize)
lstmLayer(numHiddenUnits)
fullyConnectedLayer(numResponses)
regressionLayer];
Matlab produces the following error:
Undefined function or variable 'sequenceInputLayer'.
Error in ForecastModel (line 27)
sequenceInputLayer(inputSize)
I cannot figure out why the function does not work as it is part of the installed Neural Network Toolbox. Do I need to do anything special to activate this toolbox within the current project or is there any other advice on how to get past this error?
2 个评论
Geoff Hayes
2018-6-22
James - which version of MATLAB are you using? According to sequenceInputLayer this function was introduced in r2017b. If your version is older than this, then this function will not exist.
采纳的回答
Siwan Yang
2018-6-22
Hello James,
As Geoff mentioned, the ‘sequenceInputLayer’ function is introduced since R2017b, so if you could upgrade to MATLAB R2017b or above version, this issue no longer exists.
For more information regarding this function please see: https://www.mathworks.com/help/nnet/ref/nnet.cnn.layer.sequenceinputlayer.html?searchHighlight=sequenceInputLayer
Thanks, Siwan
更多回答(1 个)
Husnain Iqbal
2019-1-27
James Cameron, kindly guide me about the solution. I've same issue i.e. Undefined function or variable 'sequenceInputLayer'.
2 个评论
Steven Lord
2019-1-28
As Siwan Yang said, this function was introduced in release R2017b. If you're using a release that's older than that, you will not be able to use this function.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!