Mr.Khiros
Junior Member level 3
- Joined
- Aug 25, 2013
- Messages
- 26
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 176
I trained a NN with matlab using the following code :
Now i'm tring to use the weights & bias calculated by matlab in order to use them to creat a NN in other programming languages, so i used the NN parameters to calculate the output as 'sim function' do :
By this way i do not the same result ?
PHP:
p = [-1 -1 2 2; 0 5 0 5];
t = [-1 -1 1 1];
net = newff(p,t,3);
net = train(net,p,t);
y = sim(net,p)
Now i'm tring to use the weights & bias calculated by matlab in order to use them to creat a NN in other programming languages, so i used the NN parameters to calculate the output as 'sim function' do :
PHP:
input = [-1;0]
y1 = tansig(netsum(dotprod(net.IW{1} , input) , net.b{1}));
Results = purelin(netsum(dotprod(net.LW{2} ,y1) ,net.b{2}))
Y = sim(net,[-1;0])
By this way i do not the same result ?