Hi.
I have created a 3 layer neural network using the code below:
net=newff(input,target,[100 50],{'logsig','logsig'});And I have trained it.
Now I want to use it in c# by making a dll, but matlab compiler does not support sim function for simulation. So I have to split the network to it's layers and compute the result by the code below.
function results=NumRecog(inputs)
load c:\NumberNet.mat;
iw1=NumberNet.IW{1,1};
lw2=NumberNet.LW{2,1};
lw3=NumberNet.LW{3,2};
b1=NumberNet.b{1};
b2=NumberNet.b{2};
b3=NumberNet.b{3};
l1=tansig(iw1*inputs+b1);
l2=tansig(lw2*l1+b2);
results=purelin(lw3*l2+b3);
endsim function returns correct answer. But this code does not.
What is the problem?
Thank You.
Mohsen.