How do Size input and Target correctly during training of Feed Forward Neural Network
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
udoInyang inyang
le 1 Juin 2014
Commenté : udoInyang inyang
le 1 Juin 2014
I have a input data set consisting of 12 columns and 108 rows. The target data set consist of 1 column and 108 rows. While training my Neural Network the error message "Targets are incorrectly sized for network. Matrix must have 12 columns" is flagged. Please how do I solve this problem.
Note I am using R2008b version.
Here is my code
load RainData_Cal_Inputs.dat load RData_Cal_target yinputs= RainData_Cal_Inputs ytarget= RData_Cal_target;
[y11,PS] = mapminmax(yinputs)
[y22,PS] = mapminmax(ytarget);
y22=y22'
%Network traning and validation
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.trainParam.epochs = 200;
net = newff(y11,y22,12); net =init(net); net.trainParam.showCommandLine=true view(net) YY = sim(net,y11);
net = train(net,y11,y22)
0 commentaires
Réponse acceptée
Greg Heath
le 1 Juin 2014
Transpose your matrices so that
[ I N ] = size(input) %[ 12 108 ]
[ O N ] = size(target) %[ 1 108 ]
Then search
greg newff
Hope this helps.
Thank you for formally accepting my answer
Greg
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!