public static OptimizerBase CreateInstance(Utility.Types.Optimizer type, List <Components.RNdMatrix> sender, Components.Real[] weight) { OptimizerBase instance = null; switch (type) { case Utility.Types.Optimizer.Adam: instance = new Adam(sender, weight); break; case Utility.Types.Optimizer.AdaSelf: instance = new AdaSelf(sender, weight); break; default: break; } return(instance); }
protected override void CreateOption() { WeightOptimizer = Optimizer.OptimizerBase.CreateInstance(OptimizerType, (Variable as Variable.AffineVariable).OptimizerWeightBuffer, Weight); }