Module Learnin Rate

operalib.learningrate implements the learning rate for (Stochastic) gradient descent algorithms

class operalib.learningrate.Constant(eta=1)[source]

Constant learning rate.

t \mapsto eta

Attributes:
eta : float default 1.

Methods

__call__(step) Return learning rate at time t.
get_rate(step) Return learning rate at time t.
get_rate(step)[source]

Return learning rate at time t.

Returns:
self.eta / t ** self.power : float
class operalib.learningrate.InvScaling(eta=1, power=0.5)[source]

Inverse scaling learnin rate.

t \mapsto eta0 * t^{-power}

Parameters:
eta0 : float, default 1.
power : float, default 1.
Returns:
InvScaling : Callable

Methods

__call__(step) Return learning rate at time t.
get_rate(step) Return learning rate at time t.
get_rate(step)[source]

Return learning rate at time t.

Returns:
self.eta / t ** self.power : float