Exemple #1
0
 public void InputGate(float value)
 {
     inputGateValue += value;
     InputGateSynapses.AccountSignal();
     if (InputGateSynapses.CheckCountAndReset())
     {
         inputGateValue = SigmoidActivation.Activate(inputGateValue + cellState);
         Calculate();
     }
 }
Exemple #2
0
 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;
     }
 }
Exemple #3
0
 public void ForgetGate(float value)
 {
     forgetGateValue += value;
     ForgetGateSynapses.AccountSignal();
     if (ForgetGateSynapses.CheckCountAndReset())
     {
         forgetGateValue = SigmoidActivation.Activate(forgetGateValue + cellState);
         Calculate();
     }
 }