arguments of "newp" command of neural network
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Mudasir Ahmed
il 7 Giu 2015
Commentato: Walter Roberson
il 7 Giu 2015
hi
i hope all are fit and fine. i want to ask a question related the command of neural network "newp". i want to train the weights and bias of 3 input AND gate. but i feel little bit difficulty in initialization of newp command. means how we select first argument of newp and also suggest me how to write it according to the problem. kindly help me in this regard.
Regards, Mudasir
clear
clc
net.IW{1,1}=[0 0 0]
net.b{1}=0
p=[0 1 0 1 0 1 0 1;0 0 1 1 0 0 1 1;0 0 0 0 1 1 1 1]
net=newp([1 8;1 3],1)
t=[0 0 0 0 0 0 0 1]
net.trainParam.epochs=5
net=train(net,p,t)
net.IW{1,1}
net.b{1}
a=sim(net,p)
error=[a(1)-t(1) a(2)-t(2) a(3)-t(3) a(4)-t(4) a(5)-t(5) a(6)-t(6) a(7)-t(7) a(8)-t(8)]
0 Commenti
Risposta accettata
Walter Roberson
il 7 Giu 2015
newp() was replaced as of r2010b which is why you cannot find it documented. Use the replacement. http://www.mathworks.com/help/releases/R2012a/toolbox/nnet/ref/perceptron.html
2 Commenti
Walter Roberson
il 7 Giu 2015
It says at the top it was obsoleted. There is no point in trying to figure out how it works.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Define Shallow Neural Network Architectures in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!