/// <summary> /// Initalizes an ANeuron. /// Notes: /// -Initalizes Threshold to a Random Float. /// </summary> /// <param name="passedNumberOfWeights">The Number of Weights for the Neuron.</param> /// <param name="passedActivationFunction">The Activation Function for the Neuron</param> public ANeuron(uint passedNumberOfWeights, IActivationFunction passedActivationFunction) { this._Weights = GenerateWeights(passedNumberOfWeights); this._ActivationFunction = passedActivationFunction; InitalizeWeights(); this._Threshold = new NeuronThreshold(Config.RANDOM.NextFloat()); }
/// Initalizes an ANeuron. /// </summary> /// <param name="passedNumberOfWeights">The Number of Weights for the Neuron.</param> /// <param name="passedThreshold">The Threshold for the Neuron.</param> /// <param name="passedActivationFunction">The Activation Function for the Neuron</param> public ANeuron(uint passedNumberOfWeights, float passedThreshold, IActivationFunction passedActivationFunction) { this._Weights = GenerateWeights(passedNumberOfWeights); this._ActivationFunction = passedActivationFunction; InitalizeWeights(); this._Threshold = passedThreshold; }
public void SetNeuronLayerWeights(INeuronLayerNeuronWeights passedNeuronWeights) { IEnumerator <INeuronWeights> neuronWeightsEnumerator = passedNeuronWeights.Values; uint neuronIndex = 0; while (neuronWeightsEnumerator.MoveNext()) { INeuronWeights current = neuronWeightsEnumerator.Current; INeuron neuron = this._Neurons[(int)neuronIndex++]; neuron.Weights = current; } }
public Neuron(INeuronWeights passedNeuronWeights, INeuronThreshold passedThreshold, INeuronActivationFunction passedActivationFunction) : base(passedNeuronWeights, passedThreshold, passedActivationFunction) { }
public ANeuron(INeuronWeights passedNeuronWeights, INeuronThreshold passedThreshold, INeuronActivationFunction passedActivationFunction) { this.Weights = passedNeuronWeights; this._ActivationFunction = passedActivationFunction; this.Threshold = passedThreshold; }
public ANeuron(INeuronWeights passedNeuronWeights, INeuronActivationFunction passedActivationFunction) { this.Weights = passedNeuronWeights; this._ActivationFunction = passedActivationFunction; this.Threshold = new NeuronThreshold(Config.RANDOM.NextFloat()); }
public ANeuron(uint passedNumberOfWeights, INeuronThreshold passedThreshold, INeuronActivationFunction passedActivationFunction) { this._Weights = GenerateWeights(passedNumberOfWeights); this._ActivationFunction = passedActivationFunction; this._Threshold = passedThreshold; }