5c42053fcd6821eb39eded56526cfe5f2070418a,sandbox/rocky/tf/optimizers/conjugate_gradient_optimizer.py,ConjugateGradientOptimizer,update_opt,#ConjugateGradientOptimizer#Any#Any#Any#Any#Any#Any#,166

Before Change



        params = target.get_params(trainable=True)
        grads = tf.gradients(loss, xs=params)
        for idx, (grad, param) in enumerate(zip(grads, params)):
            if grad is None:
                grads[idx] = tf.zeros_like(param)
        flat_grad = tensor_utils.flatten_tensor_variables(grads)

        self._hvp_approach.update_opt(f=constraint_term, target=target, inputs=inputs + extra_inputs,
                                      reg_coeff=self._reg_coeff)

After Change



            self.opt_fun = ext.lazydict(
                f_Hx_plain=lambda: tensor_utils.compile_function(
                    inputs=inputs + xs,
                    outputs=Hx_plain(),
                    log_name="f_Hx_plain",
                ),
            )

    def build_eval(self, inputs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rlworkgroup/garage
Commit Name: 5c42053fcd6821eb39eded56526cfe5f2070418a
Time: 2018-05-25
Author: 35857569+gonzaiva@users.noreply.github.com
File Name: sandbox/rocky/tf/optimizers/conjugate_gradient_optimizer.py
Class Name: ConjugateGradientOptimizer
Method Name: update_opt


Project Name: ufal/npfl114
Commit Name: b34f36f02fe135e9d9a65bce4c300cf617273f3d
Time: 2018-04-09
Author: houskape@gmail.com
File Name: labs/06/3d_recognition.py
Class Name: Network
Method Name: construct


Project Name: rlworkgroup/garage
Commit Name: 5c42053fcd6821eb39eded56526cfe5f2070418a
Time: 2018-05-25
Author: 35857569+gonzaiva@users.noreply.github.com
File Name: sandbox/rocky/tf/optimizers/conjugate_gradient_optimizer.py
Class Name: ConjugateGradientOptimizer
Method Name: update_opt


Project Name: lengstrom/fast-style-transfer
Commit Name: 31bfc7c1ce9dac771dbd5e2edf2d5e789d8b1aaa
Time: 2016-12-23
Author: jonathan.e.m.bocker@gmail.com
File Name: evaluate.py
Class Name:
Method Name: from_pipe