📄 leaky_esn.m
字号:
function internalState = leaky_esn(totalstate , esn , varargin )
% Update internal state using the leaky integrator neuron model.
%% input arguments:
% totalstate: the previous totalstate, vector of size
% (esn.nInternalUnits + esn.nInputUnits + esn.nOutputUnits) x 1
% esn: the ESN structure
%
% output:
% internalState: the updated internal state, size esn.nInternalUnits x 1
%
% Created June 7, 2006, H.Jaeger
% Revision 1, June 23, 2007, H.Jaeger (include esn.feedbackScaling)
% Revision 2, July 1, 2007, H.Jaeger (change from uniform timeConstant to
% neuron-specific timeConstants
previousInternalState = totalstate(1:esn.nInternalUnits, 1);
internalState = (1 - esn.leakage * esn.timeConstants) .* previousInternalState + esn.timeConstants .* ...
feval(esn.reservoirActivationFunction ,...
[ esn.internalWeights, esn.inputWeights, esn.feedbackWeights * diag(esn.feedbackScaling )] * totalstate) ;
%%%% add noise to the Esn
internalState = internalState + esn.noiseLevel * (rand(esn.nInternalUnits,1) - 0.5) ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -