Input data size does not match network inputs size

8 次查看(过去 30 天)
I want to create a ff neural network with 3 inputs (x,y,z) and 1 output. I use 200 samples so the inputs Px,Py,Pz are 1x200 each (I combined them in a 3x200 matrix) and the Target is 1x200.
When I run it I get
Error using network/train (line 340)
Input data size does not match net.inputs{1}.size.
Error in function_approach (line 19)
net1 = train(net,P, T);
Can anyone help me with that?
net=newff([-1 1], [1,10,1], {'tansig','tansig','purelin'},'traingd');
new_net = train(net,P, T);

采纳的回答

KSSV
KSSV 2021-5-10
Replace the line:
net=newff([-1 1], [130,150,1], {'tansig','tansig','purelin'},'traingd');
with:
PR = [min(P,[],2) max(P,[],2)] ;
net=newff(PR, [130,150,1], {'tansig','tansig','purelin'},'traingd');

更多回答(0 个)

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by