errors in training deep learning network from matlab help system examples
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
Steven Lord
2019-11-20
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!