errors in training deep learning network from matlab help system examples
2 views (last 30 days)
Show older comments
I am try training deep learning network, but the example from matlab help system can not work
clc,clear
[XTrain,YTrain] = japaneseVowelsTrainData;
figure
plot(XTrain{1}')
title("Training Observation 1")
numFeatures = size(XTrain{1},1);
legend("Feature " + string(1:numFeatures),'Location','northeastoutside')
inputSize = 12;
numHiddenUnits = 100;
numClasses = 9;
layers = [ ...
sequenceInputLayer(inputSize)
lstmLayer(numHiddenUnits,'OutputMode','last')
fullyConnectedLayer(numClasses)
softmaxLayer
classificationLayer]
maxEpochs = 100;
miniBatchSize = 27;
options = trainingOptions('adam', ...
'ExecutionEnvironment','cpu', ...
'MaxEpochs',maxEpochs, ...
'MiniBatchSize',miniBatchSize, ...
'GradientThreshold',1, ...
'Verbose',false, ...
'Plots','training-progress');
net = trainNetwork(XTrain,YTrain,layers,options);
matlab give the following results:
Error using trainNetwork (line 170)
Too many input arguments.
0 Comments
Answers (2)
Steven Lord
on 20 Nov 2019
Which release of Deep Learning Toolbox or Neural Network Toolbox are you using?
How does this example appear (or does it appear?) in the documentation included in your installation? Does it call trainNetwork with four inputs as you do in this code? Does trainNetwork list a syntax that accepts four inputs on its documentation page?
Remember that the online documentation is for the most recent release (currently release R2019b) and if you're using an older release you may not have access to all the functionality the examples use. This is especially likely if the examples were introduced in a later release.
0 Comments
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!