9bfa8654504677788c2d6369eaaa0f211a21138a,GPflow/densities.py,,multivariate_normal,#Any#Any#Any#,38

Before Change


    alpha = tf.user_ops.triangular_solve(L, d, "lower")
    num_col = 1 if x.ndim==1 else x.shape[1]
    //TODO: this call to get_diag relies on x being a numpy object (ie. having a shape)
    return - 0.5 * x.size * np.log(2 * np.pi) - num_col * tf.reduce_sum(tf.log(tf.user_ops.get_diag(L))) - 0.5 * tf.reduce_sum(tf.square(alpha))

After Change


    alpha = tf.user_ops.triangular_solve(L, d, "lower")
    num_col = 1 if tf.rank(x)==1 else tf.shape(x)[1]
    //TODO: this call to get_diag relies on x being a numpy object (ie. having a shape)
    ret =  - 0.5 * tf.cast(tf.size(x), tf.float64) * np.log(2 * np.pi) 
    ret += - tf.cast(num_col, tf.float64) * tf.reduce_sum(tf.log(tf.user_ops.get_diag(L)))
    ret += - 0.5 * tf.reduce_sum(tf.square(alpha))
    return ret

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: GPflow/GPflow
Commit Name: 9bfa8654504677788c2d6369eaaa0f211a21138a
Time: 2016-02-15
Author: james.hensman@gmail.com
File Name: GPflow/densities.py
Class Name:
Method Name: multivariate_normal


Project Name: GPflow/GPflow
Commit Name: 9bfa8654504677788c2d6369eaaa0f211a21138a
Time: 2016-02-15
Author: james.hensman@gmail.com
File Name: GPflow/densities.py
Class Name:
Method Name: multivariate_normal


Project Name: tensorflow/ranking
Commit Name: 515b80c9737f5e522d357c6d8d030d73327dd439
Time: 2020-01-13
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/metrics_impl.py
Class Name:
Method Name: _per_example_weights_to_per_list_weights


Project Name: tensorflow/cleverhans
Commit Name: 4887ef8baecbf5315ec0f235e56a4f93cd05aad7
Time: 2018-10-04
Author: nottombrown@gmail.com
File Name: cleverhans/attacks_tf.py
Class Name:
Method Name: spm