コード例 #1
0
 public void SetIncomingWeights(List <double[]> weights)
 {
     for (int i = 0; i < weights.Count; i++)
     {
         IncomingWeights.SetRow(i, weights[i]);
     }
 }
コード例 #2
0
        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());
        }
コード例 #3
0
 public void SetIncomingWeightsForNeuron(int neuronIndex, double[] weights)
 {
     IncomingWeights.SetRow(neuronIndex, weights);
 }
コード例 #4
0
 private void RandomizeConnectionWeights(double maxAbsValue)
 {
     IncomingWeights.MapInplace(x => MathHelper.RandomExceptZero(maxAbsValue));
 }
コード例 #5
0
 private void SetConnectionWeights(double value)
 {
     IncomingWeights.MapInplace(x => value);
 }