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 }
public NeuronList Copy(NeuronList connection) { return(new NeuronList(connection, Neuron.Copy(array), array.Length)); }
public NeuronList(NeuronList nextLayer, Neuron[] array, int size = 1) : base(size) { connections = nextLayer; this.array = array; }
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; }