Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Neural Networks weights and bias help
Replies: 10   Last Post: Dec 20, 2012 4:54 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Greg Heath

Posts: 6,167
Registered: 12/7/04
Re: Neural Networks weights and bias help
Posted: Aug 13, 2010 8:20 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.