예제 #1
0
        private void ConnectRecurrentAxon(ILSTMCell first, ILSTMCell second, bool selfConnection)
        {
            var axon = new RecurrentSynapse(first, second, RandomWeight());

            (first.Outputs as SynapseCollection <ISynapse>).Add(axon);
            (second.Inputs as SynapseCollection <ISynapse>).Add(axon);
        }
 public RecurrentSynapse(INeuron input, ILSTMCell output, float weight)
 {
     BackpropagateConnection = input.Backpropagate;
     PropagateConnection = output.Propagate;
     ForgetGateConnection = output.ForgetGate;
     OutputGateConnection = output.OutputGate;
     InputGateConnection = output.InputGate;
     Weight = weight;
 }