Exemple #1
0
 public BackPropagationTrainer(IFeedForwardNetRepository feedForwardNet, IBackPropagationConstants backPropagationConstants, ISquashFunction squashFunction,
                               ITrainingSetRepository trainingSet,
                               IHiddenLayerWeightChangeStrategy hiddenUnitWeightStrategy,
                               IOutputLayerWeightChangeStrategy outputUnitWeightStrategy)
 {
     this.feedForwardNet           = feedForwardNet;
     this.backPropagationConstants = backPropagationConstants;
     this.squashFunction           = squashFunction;
     this.trainingSet = trainingSet;
     this.hiddenUnitWeightStrategy = hiddenUnitWeightStrategy;
     this.outputUnitWeightStrategy = outputUnitWeightStrategy;
 }
Exemple #2
0
        /*public void UpdateWeights(ref IFeedForwardNetLayerRepository currentLayer)
         * {
         *  for (int toNo = 0; toNo < currentLayer.GetToUnitCount(); toNo++)
         *  {
         *      for (int fromNo = 0; fromNo < currentLayer.GetFromUnitCount(); fromNo++)
         *      {
         *          double weightChange = backPropagationConstants.LearningRate * currentLayer.GetToUnitDelta(toNo) +
         *                                currentLayer.GetLayerWeightChange(fromNo, toNo) * backPropagationConstants.Momentum;
         *          currentLayer.SetLayerWeightChange(fromNo, toNo, weightChange);
         *          currentLayer.AddLayerWeight(fromNo, toNo, weightChange);
         *      }
         *      double biasChange = backPropagationConstants.LearningRate * currentLayer.GetToUnitDelta(toNo) + currentLayer.GetLayerBiasChange(toNo) * backPropagationConstants.Momentum;
         *      currentLayer.SetLayerBiasChange(toNo, biasChange);
         *      currentLayer.AddLayerBias(toNo, biasChange);
         *  }
         * }*/

        public OutputUnitWeightChangeStrategyExp(IBackPropagationConstants backPropagationConstants) : base(backPropagationConstants)
        {
            // this.backPropagationConstants = backPropagationConstants;
        }
Exemple #3
0
 public UpdateWeightsAbs(IBackPropagationConstants backPropagationConstants)
 {
     this.backPropagationConstants = backPropagationConstants;
 }