fb43d1f4a64b77f8b64134460b0c77cb5f79e185,t3f/autodiff.py,,gradients,#Any#Any#Any#Any#,30
Before Change
right = decompositions.orthogonalize_tt_cores(left, left_to_right=False)
deltas = [right.tt_cores[0]] + [tf.zeros_like(cc) for cc in right.tt_cores[1:]]
x_projection = riemannian.deltas_to_tangent_space(deltas, x, left, right)
cores_grad = tf.gradients(func(x_projection), deltas)
deltas = _enforce_gauge_conditions(cores_grad, left)
return riemannian.deltas_to_tangent_space(deltas, x, left, right)
After Change
with tf.name_scope(name, values=x.tt_cores):
left = decompositions.orthogonalize_tt_cores(x)
right = decompositions.orthogonalize_tt_cores(left, left_to_right=False)
deltas = [right.tt_cores[0]]
deltas += [tf.zeros_like(cc) for cc in right.tt_cores[1:]]
x_projection = riemannian.deltas_to_tangent_space(deltas, x, left, right)
function_value = func(x_projection)
if debug:
assert_op = _is_invariant_to_input_transforms(function_value, func(right))
else:
assert_op = None
with tf.control_dependencies([assert_op]):
cores_grad = tf.gradients(function_value, deltas)
deltas = _enforce_gauge_conditions(cores_grad, left)
return riemannian.deltas_to_tangent_space(deltas, x, left, right)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: Bihaqo/t3f
Commit Name: fb43d1f4a64b77f8b64134460b0c77cb5f79e185
Time: 2018-10-31
Author: sasha.v.novikov@gmail.com
File Name: t3f/autodiff.py
Class Name:
Method Name: gradients
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: HyperGAN/HyperGAN
Commit Name: 1c51cecde6aba5e6aa61158dd441326da5bb79a4
Time: 2018-06-18
Author: martyn@255bits.com
File Name: hypergan/trainers/evolution_trainer.py
Class Name: EvolutionTrainer
Method Name: _create