Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Neural Networks weights and bias help
Replies: 18   Last Post: Jan 22, 2016 9:11 AM

 Messages: [ Previous | Next ]
 Greg Heath Posts: 6,387 Registered: 12/7/04
Re: Neural Networks weights and bias help
Posted: Aug 13, 2010 8:20 PM

On Aug 13, 10:47 am, "hasan batuk" <kapadokya...@yahoo.com> wrote:
> Hi, i am trying to learn NN toolbox. I tried to creat a networks that multiply the number by 3 and gives as output. For simplicity, i made the transfer function also linear. It works well but i tried to reach the same result by using the bias and weight values.
> x ->  input
> y-> output
>
> a= [ (w1*x + b1) * w2 ]+b2
>
> but it ends up with same as the input value. I am really confused about it. it looks very simple but i couldnt find what i miss. Thanks for your time. the code is below
>
> P=[1:4:200]; % training set
> T=P*3;       % target set
>
> net=newff(P,T,1);
> net.layers{1}.transferFcn = 'purelin';   % making transfer func. as linear

Can include this in the previous command.

> net=train(net,P,T);
>
> y=sim(net,101)   % giving a number say 101 as an input to system and taking 303 as output as expected.
>
> % trying to reach same result by using weight and bias values. it ends up with 101, not 303.
>
> a1=(net.iw{1,1}*101)+net.b{1};  % output of first layer
>
> a2=(net.lw{2,1}*a1)+net.b{2}    % output of second layer

help newff

Carefully read the explanations of IPF and OPF

Hope this helps.

Greg

Date Subject Author
8/13/10 hasan batuk
8/13/10 Greg Heath
8/15/10 hasan batuk
8/15/10 Greg Heath
8/16/10 hasan batuk
8/17/10 Greg Heath
8/17/10 hasan batuk
8/17/10 Greg Heath
12/12/12 Renan
12/13/12 Greg Heath
12/20/12 Murugan Solaiyappan
1/20/16 Vikas
1/20/16 Greg Heath
1/21/16 Vikas
1/22/16 Greg Heath
1/22/16 Vikas
1/22/16 Vikas
1/22/16 Vikas
1/22/16 Greg Heath