tfc.ops.soft_round_conditional_mean

Conditional mean of inputs given noisy soft rounded values.

Computes g(z) = E[Y | s(Y) + U = z] where s is the soft-rounding function, U is uniform between -0.5 and 0.5 and Y is considered uniform when truncated to the interval [z-0.5, z+0.5].

This is described in Sec. 4.1. in the paper

"Universally Quantized Neural Compression"
Eirikur Agustsson & Lucas Theis
https://arxiv.org/abs/2006.09952

y tf.Tensor. Inputs to this function.
alpha Float or tf.Tensor. Controls smoothness of the approximation.

The conditional mean, of same shape as inputs.