d4f070d597c4f061e07e2706838b1e89193cd356,paysage/optimizers.py,StochasticGradientDescent,update,#StochasticGradientDescent#Any#Any#Any#Any#,73

Before Change


                self.grad[key] += model.penalty[key].grad(model.params[key])
        for key in self.grad:
            model.params[key] -= lr * self.grad[key]
        model.enforce_constraints()


class Momentum(Optimizer):
    Momentum

After Change



        self.delta = model.gradient(v_data, v_model)

        for l in self.delta["layers"]:
            be.multiply_dict_inplace(l, lr)

        for l in self.delta["weights"]:
            be.multiply_dict_inplace(l, lr)

        model.parameter_update(self.delta)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: drckf/paysage
Commit Name: d4f070d597c4f061e07e2706838b1e89193cd356
Time: 2017-03-17
Author: charleskennethfisher@gmail.com
File Name: paysage/optimizers.py
Class Name: StochasticGradientDescent
Method Name: update


Project Name: drckf/paysage
Commit Name: d4f070d597c4f061e07e2706838b1e89193cd356
Time: 2017-03-17
Author: charleskennethfisher@gmail.com
File Name: paysage/optimizers.py
Class Name: Momentum
Method Name: update


Project Name: drckf/paysage
Commit Name: f36dfe140795f7b920df08cd863d27a1ae255602
Time: 2017-03-17
Author: charleskennethfisher@gmail.com
File Name: paysage/models/hidden.py
Class Name: Model
Method Name: initialize