Input data size does not match network inputs size
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
KSSV
am 10 Mai 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Define Shallow Neural Network Architectures finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!