d1ac7b831ad36cd0e4bdd7980819f83208345148,gpflow/expectations.py,,_expectation,#Any#Any#Any#Any#Any#,92

Before Change


        else:
            lengthscales = tf.zeros((D,), dtype=settings.tf_float) + kern.lengthscales

        vec = tf.expand_dims(Xmu, 2) - tf.expand_dims(tf.transpose(Z), 0)  // NxDxM
        chols = tf.cholesky(tf.expand_dims(tf.matrix_diag(lengthscales ** 2), 0) + Xcov)
        Lvec = tf.matrix_triangular_solve(chols, vec)
        q = tf.reduce_sum(Lvec ** 2, [1])

After Change



        chol_L_plus_Xcov = tf.cholesky(tf.matrix_diag(lengthscales ** 2) + Xcov)  // NxDxD

        all_diffs = tf.transpose(Z) - tf.expand_dims(Xmu, 2)  // NxDxM
        exponent_mahalanobis = tf.matrix_triangular_solve(chol_L_plus_Xcov, all_diffs, lower=True)  // NxDxM
        exponent_mahalanobis = tf.reduce_sum(tf.square(exponent_mahalanobis), 1)  // NxM
        exponent_mahalanobis = tf.exp(-0.5 * exponent_mahalanobis)  // NxM

        sqrt_det_L = tf.reduce_prod(lengthscales)
        sqrt_det_L_plus_Xcov = tf.exp(tf.reduce_sum(tf.log(tf.matrix_diag_part(chol_L_plus_Xcov)), axis=1))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 4

Instances


Project Name: GPflow/GPflow
Commit Name: d1ac7b831ad36cd0e4bdd7980819f83208345148
Time: 2018-02-07
Author: alex.ialongo@gmail.com
File Name: gpflow/expectations.py
Class Name:
Method Name: _expectation


Project Name: keras-team/keras
Commit Name: 48c1c96ac4cfec5580a5feb7eb7ef7c25c6db234
Time: 2018-10-29
Author: gabrieldemarmiesse@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: ctc_label_dense_to_sparse


Project Name: OpenNMT/OpenNMT-py
Commit Name: eedcc15de5aafccb54fcdf3d5b5e4a7ca25cfae2
Time: 2017-09-06
Author: nasa4836@gmail.com
File Name: onmt/Models.py
Class Name: Encoder
Method Name: forward


Project Name: chainer/chainercv
Commit Name: 5173f180d75df1e751689d37692e729f45e416a6
Time: 2017-05-18
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/faster_rcnn/region_proposal_network.py
Class Name: RegionProposalNetwork
Method Name: __call__


Project Name: tsurumeso/waifu2x-chainer
Commit Name: ea3d444d36853e38c0361d5091aa3b3f1aef5e0a
Time: 2017-01-01
Author: nstm101339@gmail.com
File Name: lib/pairwise_transform.py
Class Name:
Method Name: pairwise_transform


Project Name: OpenNMT/OpenNMT-py
Commit Name: 9b8950626fa11a68da7d0555ceb0b793ae26ec69
Time: 2017-09-07
Author: wjbianjason@163.com
File Name: onmt/Models.py
Class Name: Encoder
Method Name: forward