|View source on GitHub|
Compute the log of the exponentially weighted moving mean of the exp.
tfp.stats.assign_log_moving_mean_exp( log_value, moving_log_mean_exp, zero_debias_count=None, decay=0.99, name=None )
log_value is a draw from a stationary random variable, this function
log(E[exp(log_value)]), i.e., a weighted log-sum-exp. More
moving_log_mean_exp, is updated by
using the following identity:
moving_log_mean_exp = = log(decay exp(moving_log_mean_exp) + (1 - decay) exp(log_value)) = log(exp(moving_log_mean_exp + log(decay)) + exp(log_value + log1p(-decay))) = moving_log_mean_exp + log( exp(moving_log_mean_exp - moving_log_mean_exp + log(decay)) + exp(log_value - moving_log_mean_exp + log1p(-decay))) = moving_log_mean_exp + log_sum_exp([log(decay), log_value - moving_log_mean_exp + log1p(-decay)]).
In addition to numerical stability, this formulation is advantageous because
moving_log_mean_exp can be updated in a lock-free manner, i.e., using
assign_add. (Note: the updates are not thread-safe; it's just that the
update to the tf.Variable is presumed efficient due to being lock-free.)
Tensorrepresenting a new (streaming) observation. Same shape as
Variablerepresenting the log of the exponentially weighted moving mean of the exp. Same shape as
tf.Variablerepresenting the number of times this function has been called on streaming input (not the number of reduced values used in this functions computation). When not
None(the default) the returned values for
moving_varianceare "zero debiased", i.e., corrected for their presumed all zeros intialization. Note: the
moving_variancealways store the unbiased calculation, regardless of setting this argument. To obtain unbiased calculations from these
tfp.stats.moving_mean_variance_zero_debiased. Default value:
None(i.e., no zero debiasing calculation is made).
Tensorrepresenting the moving mean decay. Typically close to
0.99. Default value:
strprepended to op names created by this function. Default value:
moving_log_mean_exp: A reference to the input 'Variable' tensor with the
log_value-updated log of the exponentially weighted moving mean of exp.
moving_log_mean_expdoes not have float type