BaseOptimizer is a base for all optimizers.
Creates a new base optimizer object.
BaseOptimizer.new(optimizerName: string): BaseOptimizerObject
Returns a modified cost function derivatives.
BaseOptimizer:calculate(learningRate: number, costFunctionDerivatives: matrix): matrix
learningRate: The learning rate used by a model.
costFunctionDerivatives: The cost function derivatives calculated by a model.
Gets the optimizer’s name from the base optimizer.
BaseOptimizer:getOptimizerName()
Sets a calculate function for the base optimizer.
BaseOptimizer:setCalculateFunction(calculateFunction: Function)
Sets a value scheduler for the learning rate.
BaseOptimizer:setLearningRateScheduler(LearningRateValueScheduler: ValueSchedulerObject)
Gets the value scheduler for the learning rate.
BaseOptimizer:getLearningRateScheduler(): ValueSchedulerObject
Gets the optimizer’s internal parameters from the base optimizer.
BaseOptimizer:getOptimizerInternalParameters(doNotDeepCopy: boolean): {}
Sets the optimizer’s internal parameters from the base optimizer.
BaseOptimizer:setOptimizerInternalParameters(optimizerInternalParameters: {}, doNotDeepCopy: boolean)
optimizerInternalParameters: A matrix/table containing optimizer internal parameters that will be used by the base optimizer.
doNotDeepCopy: Set whether or not to deep copy the optimizer internal parameters.
Reset optimizer’s stored values (excluding the parameters).
BaseOptimizer:reset()