public void InputGate(float value) { inputGateValue += value; InputGateSynapses.AccountSignal(); if (InputGateSynapses.CheckCountAndReset()) { inputGateValue = SigmoidActivation.Activate(inputGateValue + cellState); Calculate(); } }
private void Calculate() { if (Inputs.Zeroed() && InputGateSynapses.Zeroed() && ForgetGateSynapses.Zeroed() && OutputGateSypanses.Zeroed()) { cellState = (inputGateValue * _value) + (forgetGateValue * cellState); outputGateValue = SigmoidActivation.Activate(outputGateValue + cellState); _value = TanHActivation.Activate(cellState) * outputGateValue; _lastValue = _value; } }
public void ForgetGate(float value) { forgetGateValue += value; ForgetGateSynapses.AccountSignal(); if (ForgetGateSynapses.CheckCountAndReset()) { forgetGateValue = SigmoidActivation.Activate(forgetGateValue + cellState); Calculate(); } }