48d178cfbb60e5b0004f63b2eca37b2449bb6c67,a2c/a2c.py,Model,__init__,#Model#,26
Before Change
train_loss = pg_loss + vf_coef * vf_loss
self.grads_check = grads = tf.gradients(train_loss, params_pi1)
grads = list(zip(grads, params_pi1))
trainer = tf.train.RMSPropOptimizer(learning_rate=lr, decay=alpha, epsilon=epsilon)
_train = trainer.apply_gradients(grads)
After Change
params = find_trainable_variables("model")
grads = tf.gradients(loss, params)
if max_grad_norm is not None:
grads, _ = tf.clip_by_global_norm(grads, max_grad_norm)
grads = list(zip(grads, params))
trainer = tf.train.RMSPropOptimizer(learning_rate=lr, decay=alpha, epsilon=epsilon)
_train = trainer.apply_gradients(grads)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: chris-chris/pysc2-examples
Commit Name: 48d178cfbb60e5b0004f63b2eca37b2449bb6c67
Time: 2017-10-31
Author: sjhshy@gmail.com
File Name: a2c/a2c.py
Class Name: Model
Method Name: __init__
Project Name: Bihaqo/t3f
Commit Name: fec458e78428cdf828701d5233107aac3664b3cf
Time: 2019-11-21
Author: sasha.v.novikov@gmail.com
File Name: t3f/autodiff.py
Class Name:
Method Name: gradients
Project Name: Bihaqo/t3f
Commit Name: fec458e78428cdf828701d5233107aac3664b3cf
Time: 2019-11-21
Author: sasha.v.novikov@gmail.com
File Name: t3f/autodiff.py
Class Name:
Method Name: hessian_vector_product
Project Name: marcoancona/DeepExplain
Commit Name: 83796ff9a1dcae49dd13f3ce67157f756d28803e
Time: 2017-11-02
Author: marco.ancona@inf.ethz.ch
File Name: example_tf.py
Class Name: DeepExplain
Method Name: explain