<!--
This file is generated by a tool. Do not edit directly.
For open-source contributions the docs will be updated automatically.
-->

*Last updated: 2023-03-16.*

<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tf_quant_finance.math.qmc.utils.tent_transform" />
<meta itemprop="path" content="Stable" />
</div>

# tf_quant_finance.math.qmc.utils.tent_transform

<!-- Insert buttons and diff -->

<table class="tfo-notebook-buttons tfo-api" align="left">
</table>

<a target="_blank" href="https://github.com/paolodelia99/tf-quant-finance/blob/main/tf_quant_finance/math/qmc/utils.py">View source</a>



Returns the tent transform of a given `Tensor`.

```python
tf_quant_finance.math.qmc.utils.tent_transform(
    value
)
```



<!-- Placeholder for "Used in" -->

#### Examples

```python
import tensorflow as tf
import tf_quant_finance as tff

# Example: Commputing the tent transform of a given vector.

tff.math.qmc.utils.tent_transform(tf.constant([0, .2, .4, .6, .8, 1]))
# ==> tf.Tensor([0, .4, .8, .8, .4, 0.], shape=(4,), dtype=float32)
```

#### Args:


* <b>`value`</b>: Scalar `Tensor` of real values in the `[0, 1)` range.


#### Returns:

`Tensor` with the same `shape` as `value` equal to `2 ** value` if `value`
is less than `0.5` or `2 * (1 - value)` otherwise.
