Getting this error" Invalid training data. Sequence responses must have the same sequence length as the corresponding predictors."

1 次查看(过去 30 天)
XTrain=xlsread('C:\Users\Subhodip\Desktop\Sumana\Input.xlsx',1,'A1:E1024');
YTrain=xlsread('C:\Users\Subhodip\Desktop\Sumana\Input.xlsx',1,'F1:F1024');
Xtest=xlsread('C:\Users\Subhodip\Desktop\Sumana\Sample1.xlsx',1,'A1:E1024');
Ytest=xlsread('C:\Users\Subhodip\Desktop\Sumana\Sample1.xlsx',1,'F1:F1024');
inputSize=5;
numResponses=1;
numHiddenUnits=100;
layers=[sequenceInputLayer(inputSize)
lstmLayer(numHiddenUnits)
fullyConnectedLayer(numResponses)
regressionLayer];
opts=trainingOptions('adam',...
'MaxEpochs',1000,...
'GradientThreshold',0.01,...
'InitialLearnRate',0.0001);
net=trainNetwork(XTrain,YTrain,layers,opts);

回答(0 个)

类别

Help CenterFile 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!

Translated by