defa1283c44653c29b81403f9d9f19fb3df0a27d,keras/optimizers.py,SGD,get_updates,#SGD#Any#Any#Any#,124
Before Change
self.updates = [K.update_add(self.iterations, 1)]
// momentum
self.weights = [K.variable(np.zeros(K.get_value(p).shape)) for p in params]
for p, g, m in zip(params, grads, self.weights):
v = self.momentum * m - lr * g // velocity
self.updates.append(K.update(m, v))
After Change
// momentum
shapes = [x.shape for x in K.batch_get_value(params)]
moments = [K.zeros(shape) for shape in shapes]
self.weights = [self.iterations] + moments
for p, g, m in zip(params, grads, moments):
v = self.momentum * m - lr * g // velocity
self.updates.append(K.update(m, v))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: SGD
Method Name: get_updates
Project Name: chainer/chainercv
Commit Name: d8627f9057fd69b48c758be5468480a3bb04b81e
Time: 2017-05-28
Author: yuyuniitani@gmail.com
File Name: examples/segnet/calc_weight.py
Class Name:
Method Name:
Project Name: keras-team/autokeras
Commit Name: 71432d1890209628e189edf04d7d623160943718
Time: 2019-12-18
Author: 33369174+Davidsirui@users.noreply.github.com
File Name: autokeras/hypermodel/preprocessor.py
Class Name: TextToNgramVector
Method Name: transform