12e358abe9e762d6231b969b9f376e3765625446,paysage/optimizers.py,ADAM,update,#ADAM#Any#Any#Any#Any#,265

Before Change



    def update(self, model, v_data, v_model, epoch):
        self.scheduler.increment(epoch)
        lr = self.scheduler.get_lr() * self.stepsize

        grad = model.gradient(v_data, v_model)
        self.memory.update(grad)
        self.delta = self.memory.normalize(self.memory.mean_gradient,
                                           unbiased=True)

        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)


// ----- ALIASES ----- //

After Change



    def update(self, model, v_data, v_model, epoch):
        self.scheduler.increment(epoch)
        lr_ = partial(be.tmul_,
                      be.float_scalar(self.scheduler.get_lr() * self.stepsize))

        grad = model.gradient(v_data, v_model)
        self.memory.update(grad)
        self.delta = self.memory.normalize(self.memory.mean_gradient,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


Project Name: drckf/paysage
Commit Name: 12e358abe9e762d6231b969b9f376e3765625446
Time: 2017-04-05
Author: charleskennethfisher@gmail.com
File Name: paysage/optimizers.py
Class Name: ADAM
Method Name: update


Project Name: drckf/paysage
Commit Name: 12e358abe9e762d6231b969b9f376e3765625446
Time: 2017-04-05
Author: charleskennethfisher@gmail.com
File Name: paysage/optimizers.py
Class Name: ADAM
Method Name: update


Project Name: drckf/paysage
Commit Name: 64c9109d1423ee7288926a1d8743fe6cbd7a0022
Time: 2017-04-05
Author: charleskennethfisher@gmail.com
File Name: paysage/optimizers.py
Class Name: Momentum
Method Name: update


Project Name: drckf/paysage
Commit Name: 12e358abe9e762d6231b969b9f376e3765625446
Time: 2017-04-05
Author: charleskennethfisher@gmail.com
File Name: paysage/optimizers.py
Class Name: RMSProp
Method Name: update