public void SetIncomingWeights(List <double[]> weights) { for (int i = 0; i < weights.Count; i++) { IncomingWeights.SetRow(i, weights[i]); } }
public override Vector <double> CalculateOutput(Vector <double> signal) { LastSignal = signal; LastOutput = IncomingWeights.Multiply(signal); // weighted input if (HasBias) { LastOutput = LastOutput.Add(BiasWeights); // weighted input with bias } LastOutput.MapInplace(Activation.Calc); // neuron activations (neuron outputs) return(LastOutput.Clone()); }
public void SetIncomingWeightsForNeuron(int neuronIndex, double[] weights) { IncomingWeights.SetRow(neuronIndex, weights); }
private void RandomizeConnectionWeights(double maxAbsValue) { IncomingWeights.MapInplace(x => MathHelper.RandomExceptZero(maxAbsValue)); }
private void SetConnectionWeights(double value) { IncomingWeights.MapInplace(x => value); }