public StochasticGradientDescent(IContainsFlat network,
                                         IMLDataSet training, IGenerateRandom theRandom) :
            base(TrainingImplementationType.Iterative)
        {
            Training   = training;
            UpdateRule = new AdamUpdate();

            if (!(training is BatchDataSet))
            {
                BatchSize = 25;
            }

            _method           = network;
            _flat             = network.Flat;
            _layerDelta       = new double[_flat.LayerOutput.Length];
            _gradients        = new double[_flat.Weights.Length];
            _errorCalculation = new ErrorCalculation();
            _rnd         = theRandom;
            LearningRate = 0.001;
            Momentum     = 0.9;
        }
Exemplo n.º 2
0
 public UpdateBackStagePass(IUpdateRule next)
     : base(next, item => item.Name == "Backstage passes to a TAFKAL80ETC concert")
 {
 }
 public ItemGroup(IEnumerable <Item> items, IUpdateRule rule)
 {
     Items = items;
     Rule  = rule;
 }
Exemplo n.º 4
0
 public UpdateSulfuras(IUpdateRule next)
     : base(next, item => item.Name == "Sulfuras, Hand of Ragnaros")
 {
 }
Exemplo n.º 5
0
 public UpdateDefaultImplementation(IUpdateRule next) : base(next, item => true)
 {
 }
 public UpdateConjuredItem(IUpdateRule next)
     : base(next, item => item is ConjuredItem)
 {
 }
Exemplo n.º 7
0
 public UpdateAgedBrie(IUpdateRule next) : base(next, item => item.Name == "Aged Brie")
 {
 }
Exemplo n.º 8
0
 protected ChainableUpdateRule(IUpdateRule next, Func <Item, bool> predicate)
 {
     _next      = next;
     _predicate = predicate;
 }