defa1283c44653c29b81403f9d9f19fb3df0a27d,keras/optimizers.py,Optimizer,set_weights,#Optimizer#Any#,61

Before Change


                            str(len(params)) + " optimizer params vs. " +
                            str(len(weights)) + " provided weights)")
        for p, w in zip(params, weights):
            if K.get_value(p).shape != w.shape:
                raise Exception("Optimizer weight shape " +
                                str(K.get_value(p).shape) +
                                " not compatible with "

After Change


                                str(pv.shape) +
                                " not compatible with "
                                "provided weight shape " + str(w.shape))
            weight_value_tuples.append((p, w))
        K.batch_set_value(weight_value_tuples)

    def get_weights(self):
        """Returns the current weights of the optimizer,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


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: 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