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; }
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; }
public UpdateSulfuras(IUpdateRule next) : base(next, item => item.Name == "Sulfuras, Hand of Ragnaros") { }
public UpdateDefaultImplementation(IUpdateRule next) : base(next, item => true) { }
public UpdateConjuredItem(IUpdateRule next) : base(next, item => item is ConjuredItem) { }
public UpdateAgedBrie(IUpdateRule next) : base(next, item => item.Name == "Aged Brie") { }
protected ChainableUpdateRule(IUpdateRule next, Func <Item, bool> predicate) { _next = next; _predicate = predicate; }