NestovMomentum¶
-
class
NestovMomentum(lr: float = 0.001)¶ Bases:
bluebird.optimizers.optimizer.OptimizerNestrov momentum.
Stohastic Gradient Descent with momentum, Gradient accelerates and converges faster than with regular SGD.
Example:
optim = NestrovMomentum(lr=0.005) net.build(optimizer=optim)
-
__init__(lr: float = 0.001) → None¶ Initializes the object.
- Parameters
lr (float, optional) – learning rate, defaults to 0.001
Methods
__init__([lr])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
-