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


    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: 4

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: NifTK/NiftyNet
Commit Name: c90f426e3fc1174e46dd23bb720afc70417e2897
Time: 2017-09-05
Author: carole.sudre.12@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name:
Method Name: generalised_wasserstein_dice_loss


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: d70ff12e4385eddf5e69b8b4bff612f7c9b9f1a8
Time: 2018-05-22
Author: okuchaiev@nvidia.com
File Name: open_seq2seq/parts/transformer/common.py
Class Name: LayerNormalization
Method Name: call