aa5f9ddfdf0447c7a53f4e2676a1c866189315cd,kfac/python/ops/curvature_matrix_vector_products.py,CurvatureMatrixVectorProductComputer,_total_loss,#CurvatureMatrixVectorProductComputer#,74

Before Change



  @property
  def _total_loss(self):
    return tf.add_n(tuple(loss.evaluate() for loss in self._losses))

  // Jacobian multiplication functions:
  def _multiply_jacobian(self, vecs):
    Multiply vecs by the Jacobian of losses.

After Change



  @property
  def _total_loss(self):
    vals = []
    for loss in self._losses:
      with tf.colocate_with(self._loss_colocation_ops[loss]):
        vals.append(loss.evaluate())
    return tf.add_n(tuple(vals))

  // Jacobian multiplication functions:
  def _multiply_jacobian(self, vecs):
    Multiply vecs by the Jacobian of losses.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/kfac
Commit Name: aa5f9ddfdf0447c7a53f4e2676a1c866189315cd
Time: 2019-02-01
Author: jamesmartens@google.com
File Name: kfac/python/ops/curvature_matrix_vector_products.py
Class Name: CurvatureMatrixVectorProductComputer
Method Name: _total_loss


Project Name: GPflow/GPflow
Commit Name: 6bd507a7ff7ae7e87ad5403a0048a2b17e94ac67
Time: 2017-09-18
Author: art.art.v@gmail.com
File Name: gpflow/params.py
Class Name: Parameterized
Method Name: _build_prior


Project Name: tensorflow/tpu
Commit Name: 9f66664f055e7943d157ba94b7bd5b0bc5b3d54e
Time: 2018-07-30
Author: brennan.saeta@gmail.com
File Name: models/experimental/deeplab/model.py
Class Name:
Method Name: loss_fn