フィルターのクリア

How to get the transfer function equation for the implemented neural network

1 回表示 (過去 30 日間)
jalpa shah
jalpa shah 2016 年 9 月 14 日
回答済み: Greg Heath 2016 年 11 月 9 日
I have implemented neural network of two layers and hidden layer size is 3. for both layers activation function is purelin. When I calculate theoretically output of neural network it is not matching with output provided by neural network of matalab. Plz let me know where i am doing wrong. Thanks

採用された回答

Greg Heath
Greg Heath 2016 年 11 月 9 日
You have to obtain xsettings and tsettings from x and t.
Then apply them to x2 and t2.
Hope this helps.
Thank you for formally accepting my answer
Greg

その他の回答 (1 件)

Greg Heath
Greg Heath 2016 年 9 月 14 日
編集済み: Greg Heath 2016 年 9 月 14 日
I misplaced my turban and crystal ball. Therefore I cannot tell you where you have gone wrong.
OH! It just occurred to me!
1. Why don't you post your code?
2. Include any comments and error messages that result when you try
to run your code.
3. Include the results of running your code on data in the help
and doc documentation. e.g.,
help fitnet
doc fitnet
Thank you for formally accepting my answer
Greg
PS. Have you included
a. the normalization of input and target
b. The denormalization of the output
Hope this helps.
Greg
  6 件のコメント
jalpa shah
jalpa shah 2016 年 11 月 2 日
Hi, thanks for replying. Can u plz tell me how to deactivate the normalization step which is by default as per the link ( http://in.mathworks.com/help/nnet/ug/choose-neural-network-input-output-processing-functions.html). Thanks
jalpa shah
jalpa shah 2016 年 11 月 5 日
Dear Greg, I have tried your tutorial code and pasted the code which i have tried. In code for lines (1), (2) and (3), when I put X and t instead of x2 and t2 then ya from equation and y are matching. But when I put x2 and t2 then yn and ya both are coming as 0.678 from equations and y2 from simulation of net coming as 4.3997. Means y2 output from simulation does not match with ya calculated from equation.
can you please tell me why its happening like this? your help will be appreciated. thanks
x= [9.71771231870987,9.83342660442415,9.97628374728129]
t= [4.39863796358009,4.69563206044186,4.91324004903954]
x2= [9.62398374728130]
t2= [4.09380849773465]
net = fitnet;
rng( 4151941 )
[ net tr y e ] = train( net, x, t );
y2=sim(net,x2);
% THE ANALYTIC I/O RELATIONSHIP
xn = mapminmax(x2); %.....(1)
[ tn, tsettings ] = mapminmax(t2); %....(2)
[p,N]= size(x2); %......(3)
b1 = net.b{1} ; % [ H 1 ]
IW = net.IW{ 1 ,1 }; % [ H I ]
b2 = net.b{2} ; % [ O 1 ]
LW = net.LW{ 2, 1 }; % [ O H ]
whos b1 IW b2 LW
B1 = repmat( b1 , 1, N ) ;
B2 = repmat( b2 , 1, N ) ; % For O > 1
yn = B2 + LW * tanh( B1 + IW * xn );
ya = mapminmax.reverse(yn,tsettings);
end

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by