16b7d06575fb72f3a0c9d09f38efc17066daf473,elephas/optimizers.py,SGD,get_updates,#SGD#Any#Any#Any#,63

Before Change


        self.updates = [(self.iterations, self.iterations + 1.)]

        for p, g, c in zip(params, grads, constraints):
            m = shared_zeros(p.get_value().shape)  // momentum
            v = self.momentum * m - lr * g  // velocity
            self.updates.append((m, v))

After Change


    def get_updates(self, params, constraints, grads):
        lr = self.lr * (1.0 / (1.0 + self.decay * self.iterations))
        self.updates = [(self.iterations, self.iterations + 1.)]
        new_weights = []

        for p, g, c in zip(params, grads, constraints):
            m = np.zeros_like(p)  // momentum
            v = self.momentum * m - lr * g  // velocity
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: maxpumperla/elephas
Commit Name: 16b7d06575fb72f3a0c9d09f38efc17066daf473
Time: 2015-11-16
Author: max.pumperla@googlemail.com
File Name: elephas/optimizers.py
Class Name: SGD
Method Name: get_updates


Project Name: keras-team/keras
Commit Name: defa1283c44653c29b81403f9d9f19fb3df0a27d
Time: 2016-07-21
Author: francois.chollet@gmail.com
File Name: keras/optimizers.py
Class Name: Optimizer
Method Name: set_weights


Project Name: keras-team/keras
Commit Name: defa1283c44653c29b81403f9d9f19fb3df0a27d
Time: 2016-07-21
Author: francois.chollet@gmail.com
File Name: keras/optimizers.py
Class Name: SGD
Method Name: get_updates