필터 지우기
필터 지우기

How do Size input and Target correctly during training of Feed Forward Neural Network

조회 수: 1 (최근 30일)
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)

채택된 답변

Greg Heath
Greg Heath 2014년 6월 1일
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

추가 답변 (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