for key in model.penalty:
self.grad[key] += model.penalty[key].grad(model.params[key])
for key in self.grad:
self.delta[key] = self.grad[key] + self.momentum * self.delta[key]
model.params[key] -= lr * self.delta[key]
model.enforce_constraints()
After Change
for l in self.delta["weights"]:
be.multiply_dict_inplace(l, lr)
model.parameter_update(self.delta)
class RMSProp(Optimizer):
RMSProp