This is my code:
p = input1;
t1 = output1;
net = feedforwardnet(10, 'trainrp');
net.trainParam.epochs = 1000;
net.trainParam.goal = 0.0005;
net = train(net, p, t1);
y1 = sim(net, p);
p = input2;
t2 = tar;
y2 = sim(net, p);
However, I get this error:
error using bsxfun
Non-singleton dimensions of the two input arrays must match each other.
Error in nnMATLAB.pc (line 24)
pi = bsxfun(@minus,pi,settings.xoffset);
Error in nncalc.preCalcData (line 20)
data.Pc = calcMode.pc(net,data.X,data.Xi,data.Q,data.TS,calcHints);
Error in nncalc.setup1 (line 118)
calcData =
nncalc.preCalcData(matlabMode,matlabHints,net,data,doPc,doPd,calcHints.doFlattenTime);
Error in network/sim (line 283)
[calcMode,calcNet,calcData,calcHints,~,resourceText] = nncalc.setup1(calcMode,net,data);
I want to make a neural network which has input1 as input 310 x 24 matrix and output1 as output, 155 x 24 matrix.
Also, I will train the network with input1 & output1
After this training process, I will use input2 as testing data, and I want to get a simulation result using above network which is trained by input1 & output1 .
In summary, I want to train my own network with input1 and output1, and I want to get my simulation result with input2.
I think these errors are based on input size difference between training section and testing section.
How can I solve this problem? Should I run additional process??
I'm looking for your kind answer.
Thank you.