SiaNet/Optimizers/BaseOptimizer.cs
/// <summary>
/// Gets the specified optimizer type.
/// </summary>
/// <param name="optimizerType">Type of the optimizer.</param>
/// <returns></returns>
Gets the specified optimizer type.
Gets the specified optimizer type .
internal static BaseOptimizer Get(OptimizerType optimizerType)
        {
            BaseOptimizer opt = null;
            switch (optimizerType)
            {
                case OptimizerType.SGD:
                    opt = new SGD();
                    break;
                case OptimizerType.Adamax:
                    opt = new Adamax();
                    break;
                case OptimizerType.RMSprop:
                    opt = new RMSProp();
                    break;
                case OptimizerType.Adagrad:
                    opt = new Adagrad();
                    break;
                case OptimizerType.Adadelta:
                    opt = new Adadelta();
                    break;
                case OptimizerType.Adam:
                    opt = new Adam();
                    break;
                default:
                    break;
            }
            return opt;
        }
internal static BaseOptimizer Get ( OptimizerType optimizerType ) { BaseOptimizer opt = null ; switch ( optimizerType ) { case OptimizerType . SGD : opt = new SGD ( ) ; break ; case OptimizerType . Adamax : opt = new Adamax ( ) ; break ; case OptimizerType . RMSprop : opt = new RMSProp ( ) ; break ; case OptimizerType . Adagrad : opt = new Adagrad ( ) ; break ; case OptimizerType . Adadelta : opt = new Adadelta ( ) ; break ; case OptimizerType . Adam : opt = new Adam ( ) ; break ; default : break ; } return opt ; }
Gets the specified optimizer type.
Gets the specified optimizer type .
None
optimizerType
OptimizerType
Type of the optimizer.
Type of the optimizer .