d1ac7b831ad36cd0e4bdd7980819f83208345148,gpflow/expectations.py,,_expectation,#Any#Any#Any#Any#Any#,92
Before Change
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])
chol_diags = tf.matrix_diag_part(chols) // N x D
half_log_dets = (tf.reduce_sum(tf.log(chol_diags), 1)
- tf.reduce_sum(tf.log(lengthscales))) // N,
After Change
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))
determinants = sqrt_det_L / sqrt_det_L_plus_Xcov // N
return kern.variance * (determinants[:, None] * exponent_mahalanobis)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: GPflow/GPflow
Commit Name: 122f4ae6f400f0c43f3fc6a85481264809e678f5
Time: 2016-05-27
Author: james.hensman@gmail.com
File Name: GPflow/kernels.py
Class Name: PeriodicKernel
Method Name: K
Project Name: keras-team/keras
Commit Name: 3aa807a0c89279b065818a3db95e3755cdf614e1
Time: 2016-02-24
Author: farizrahman4u@gmail.com
File Name: keras/activations.py
Class Name:
Method Name: softmax