AdaGrad¶
-
class
AdaGrad(lr: float = 0.001, epsilon: float = 1e-08)¶ Bases:
bluebird.optimizers.optimizer.OptimizerAdaptive gradient descent.
Example:
optim = AdaGrad(lr=0.005) net.build(optimizer=optim, loss=CategoricalCrossEntropy())
-
__init__(lr: float = 0.001, epsilon: float = 1e-08) → None¶ Initializes the object.
- Parameters
lr (float, optional) – learning rate, defaults to 0.001
epsilon (float, otpional) – small value to prevent division by zero, best not to touch it, defaults to 1e-8
Methods
__init__([lr, epsilon])Initializes the object.
build(net)Called before training, optimizer needs the model to be able to iterate over params.
step()Traning step.
-
build(net: NeuralNet) → None¶ Called before training, optimizer needs the model to be able to iterate over params.
This function is called douring build in your model.
- Parameters
net (
NeuralNet) – your model
-
step() → None¶ Traning step.
This function is run during each of your training steps, it updates the model
-