Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MATLAB neural network implementation

Status
Not open for further replies.

etileyli

Newbie level 5
Joined
May 28, 2008
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,341
Hi all!!

I have a problem on implementing a neural network in MATLAB with using addition and multiplication.

I'm trying to implement the network below,

p = [1 3];
t = [2 4];
net = newff(p,t,1);
net = train(net, p,t);
______________________________
after running the code above, I fetch the weights and biases with

input_weights = net.IW;
layer_weights = net.LW;
biases = net.b;

write a function " try_neural" with resulting weights

function [net_out] = try_neural(in_1)
w_1_1 = -1.47057806618821; b_1 = 0.0252873414230115;
L1_out = tansig(in_1*w_1_1 + b_1);
wo_1 = -1.11163638238458; b_o = 0.00535792495355342;
net_out = L1_out*wo_1 + b_o;

then run the line : result = try_neural (1);

I'm getting different results with
result = sim(net,1);

Most probably I'm missing something very basic and simple but I can't figure out the source of error. (I'm using MATLAB 2010b)

Thanks in advance!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top