Exemplo n.º 1
0
        public void Fire(NeuronList connections)
        {
            //Default neruon: (float)Math.Tanh(value + bias);
            float Activ = (float)(SIGMOID_HEIGHT / (1.0 + Math.Exp(-Value)) - SIGMOID_OFFSET);//Activator(Value);//Value < 0 ? 0 : Value;//fastTanh(Value);//

            for (int i = connections.array.Length - 1; i >= 0; i--)
            {
                connections.array[i].Value += Activ * weights[i];
            }

            //value = 0; // We're done here. BUT we can't erase the values until we back prop
        }
Exemplo n.º 2
0
 public NeuronList Copy(NeuronList connection)
 {
     return(new NeuronList(connection, Neuron.Copy(array), array.Length));
 }
Exemplo n.º 3
0
 public NeuronList(NeuronList nextLayer, Neuron[] array, int size = 1) : base(size)
 {
     connections = nextLayer;
     this.array  = array;
 }
Exemplo n.º 4
0
        public static readonly float SLOPE_MOD = -0.9f; // negative flips the slope, 0.9 makes our slope lossy and come to a conclusion. 10% loss every change.
        //private static readonly float ACC_THRESHOLD = 1f;

        public NeuronList(NeuronList nextLayer, int size = 1) : base(size)
        {
            connections = nextLayer;
        }