defa1283c44653c29b81403f9d9f19fb3df0a27d,keras/optimizers.py,RMSprop,get_updates,#RMSprop#Any#Any#Any#,178
Before Change
def get_updates(self, params, constraints, loss):
grads = self.get_gradients(loss, params)
// accumulators
self.weights = [K.variable(np.zeros(K.get_value(p).shape)) for p in params]
self.updates = []
for p, g, a in zip(params, grads, self.weights):
// update accumulator
After Change
def get_updates(self, params, constraints, loss):
grads = self.get_gradients(loss, params)
shapes = [x.shape for x in K.batch_get_value(params)]
accumulators = [K.zeros(shape) for shape in shapes]
self.weights = accumulators
self.updates = []
for p, g, a in zip(params, grads, accumulators):
// update accumulator
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 23
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: RMSprop
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: RMSprop
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: Adagrad
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: SGD
Method Name: get_updates