16b7d06575fb72f3a0c9d09f38efc17066daf473,elephas/optimizers.py,Adadelta,get_updates,#Adadelta#Any#Any#Any#,154

Before Change



    def get_updates(self, params, constraints, grads):
        accumulators = [shared_zeros(p.get_value().shape) for p in params]
        delta_accumulators = [shared_zeros(p.get_value().shape) for p in params]
        self.updates = []

        for p, g, a, d_a, c in zip(params, grads, accumulators,
                                   delta_accumulators, constraints):
            new_a = self.rho * a + (1 - self.rho) * g ** 2  // update accumulator
            self.updates.append((a, new_a))

            // use the new accumulator and the *old* delta_accumulator
            update = g * T.sqrt(d_a + self.epsilon) / T.sqrt(new_a +
                                                             self.epsilon)

            new_p = p - self.lr * update
            self.updates.append((p, c(new_p)))  // apply constraints

            // update delta_accumulator
            new_d_a = self.rho * d_a + (1 - self.rho) * update ** 2
            self.updates.append((d_a, new_d_a))
        return new_p

    def get_config(self):

After Change



    def get_updates(self, params, constraints, grads):
        accumulators = [np.zeros_like(p) for p in params]
        delta_accumulators = [np.zeros_like(p) for p in params]
        new_weights = []

        for p, g, a, d_a, c in zip(params, grads, accumulators,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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


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


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