예제 #1
0
        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);
        }
예제 #2
0
 protected override void CreateOption()
 {
     WeightOptimizer = Optimizer.OptimizerBase.CreateInstance(OptimizerType, (Variable as Variable.AffineVariable).OptimizerWeightBuffer, Weight);
 }