Input data size does not match network inputs size
11 views (last 30 days)
Show older comments
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);
0 Comments
Accepted Answer
KSSV
on 10 May 2021
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 Comments
More Answers (0)
See Also
Categories
Find more on Define Shallow Neural Network Architectures in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!