MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / __init__

Method __init__

mla/neuralnet/optimizers.py:72–78  ·  view source on GitHub ↗
(self, learning_rate=0.01, momentum=0.9, decay=0.0, nesterov=False)

Source from the content-addressed store, hash-verified

70
71class SGD(Optimizer):
72 def __init__(self, learning_rate=0.01, momentum=0.9, decay=0.0, nesterov=False):
73 self.nesterov = nesterov
74 self.decay = decay
75 self.momentum = momentum
76 self.lr = learning_rate
77 self.iteration = 0
78 self.velocity = None
79
80 def update(self, network):
81 lr = self.lr * (1.0 / (1.0 + self.decay * self.iteration))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected