How can I manually perform an elmannet neural network calculation?

1 回表示 (過去 30 日間)
Qinwan Rabbani
Qinwan Rabbani 2016 年 11 月 30 日
コメント済み: Greg Heath 2016 年 12 月 6 日

採用された回答

Greg Heath
Greg Heath 2016 年 11 月 30 日
My guess is
z(t) = B1 + IW * [ x(t); z(t-1); z(t-2)];
y(t) = B2 + LW * z(t);
Hope this helps
Thank you for formally accepting my answer
Greg
  4 件のコメント
Qinwan Rabbani
Qinwan Rabbani 2016 年 12 月 5 日
編集済み: Qinwan Rabbani 2016 年 12 月 5 日
This is the diagram for a 4 layer network with two hidden layers and a time delay of only 1:
This is net.IW:
This is net.LW:
From what I can see, hidden layer 1 and 2 feed back into themselves via "context layers", but not the output layer. The IW matrix only has the forward connections from the input layer to hidden layer 1. In the LW matrix, it looks to me that element 2,1 stores the connections from hidden 1 to hidden 2 and 3,2 has the connections from hidden 2 to output. However, there are separate elements storing the "context weights." 1,1 has connections from hidden 1 to itself and 2,2 has connections from hidden 2 to itself judging by the dimensions being (size of hidden)^2.
The code you've given is giving me errors because of the dimension mismatch since there is a separate set of connections for the recurrent/context weights. Regardless, even if I use the correct weights, what do I normalize the hidden activations to? The solution I referenced in my original question used normalization parameters that only apply to output activation. (I've tested applying them to saved hidden activations, and normalizing them with those parameters does not give me the correct results.)
Greg Heath
Greg Heath 2016 年 12 月 6 日
INCORRECT!
The input layer contains NON-NEURON fan-in units and is never counted when referring to a N-layer ( 1 output + N-1 hidden) neural net.
The equations I have posted are the equations for the DEFAULT 2-LAYER ELMAN net with 1 hidden layer.
As proof, just type in the code from the HELP OR DOC documentation and remove the ending semicolon from the view(net) command.
The diagram you have just shown is a NON-DEFAULT 3-layer ELMAN net with 2 hidden layers.
Hope this helps.
Thank you for formally accepting my answer
Greg

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by