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

Before Change


                output of `get_weights`).
        """
        params = self.weights
        if len(params) != len(weights):
            raise Exception("Provided weight array does not match  weights (" +
                            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) +

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

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: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: f06010e9e5104bacbc219fde90a769151f7f031a
Time: 2018-03-08
Author: yuyantingzero@gmail.com
File Name: perfkitbenchmarker/providers/aws/aws_managed_relational_db.py
Class Name: AwsManagedRelationalDb
Method Name: _Create


Project Name: mindsdb/mindsdb
Commit Name: 067904232ff708597c53891184f3281a1683a2b1
Time: 2021-02-05
Author: stpmax@yandex.ru
File Name: mindsdb/api/mongo/responders/find.py
Class Name: Responce
Method Name: result