Input data size does not match network inputs size
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
KSSV
le 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Define Shallow Neural Network Architectures dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!