# tfc.ops.soft_round_conditional_mean

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/compression/blob/v2.14.1/tensorflow_compression/python/ops/round_ops.py#L111-L130) |

Conditional mean of inputs given noisy soft rounded values.

#### View aliases


**Main aliases**

[`tfc.soft_round_conditional_mean`](https://www.tensorflow.org/api_docs/python/tfc/ops/soft_round_conditional_mean)

<br />

    tfc.ops.soft_round_conditional_mean(
        y, alpha
    )

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>

<br />

<br />

<br />

| ## Args ||
|---|---|
| `y` | [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor). Inputs to this function. |
| `alpha` | Float or [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor). Controls smoothness of the approximation. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The conditional mean, of same shape as `inputs`. ||

<br />