public void FeedForward(FeedForwardState state)
        {
            double[] weightedSums = state.WeightedSums;

            Array.Clear(weightedSums, 0, weightedSums.Length);
            Sum(biasWeights, weightedSums);
            WeightedInputSum(state.Inputs, inputWeights, weightedSums);
            OutputFromActivation(weightedSums, state.Outputs);
        }
예제 #2
0
 public void FeedForward()
 {
     for (int i = 0; i < states.Count; i++)
     {
         Layer layer = Network.Layers[i];
         if (layer is RecurrentLayer)
         {
             RecurrentState state = (RecurrentState)states[i];
             ((RecurrentLayer)layer).FeedForward(state);
         }
         else
         {
             FeedForwardState state = (FeedForwardState)states[i];
             ((FeedForwardLayer)layer).FeedForward(state);
         }
     }
 }