tf-example-models
tf-example-models copied to clipboard
Questions about the prior issues
Hi there,
I am confused about the part of applying prior to the computed variances. Would you by any chance explain it? Thanks ;) Link
# applying prior to the computed variances
variances_ *= tf.expand_dims(gamma_sum, 1)
variances_ += (2.0 * beta)
variances_ /= tf.expand_dims(gamma_sum + (2.0 * (alpha + 1.0)), 1)
Also, does the log_shit
means the normalization here?
log_weighted = log_components + tf.expand_dims(tf.log(weights), 1)
log_shift = tf.expand_dims(tf.reduce_max(log_weighted, 0), 0)
exp_log_shifted = tf.exp(log_weighted - log_shift)
In addition, at line 82:
log_likelihood = tf.reduce_sum(tf.log(exp_log_shifted_sum)) + tf.reduce_sum(log_shift)
Why added above mentioned maximum value of each component log_shift
?