Beispiel #1
0
        /// <summary>
        /// Loads the sum of activation * weight for all incoming connections and stimulates the unit activation
        /// </summary>
        public void LoadNetInput()
        {
            var netInput = UnitActivation.UnitType == UnitType.NormalUnit
                ? IncomingConnections.Sum(i => i.Properties.Weight * i.InputUnit.ActivationValue)
                : UnitActivation.NetInput;

            UnitActivation.Stimulate(netInput);
        }
Beispiel #2
0
        public Neuron()
        {
            // The first incoming connection is always the bias/threshold
            var bias = new Connection
            {
                IsBias   = true,
                Receiver = this
            };

            IncomingConnections.Add(bias);
        }