erfinv

paddle. erfinv ( x: Tensor, name: str | None = None ) Tensor [source]

The inverse error function of x. Please refer to erf

\[erfinv(erf(x)) = x.\]
Parameters
  • x (Tensor) – An N-D Tensor, the data type is float16, bfloat16, float32, float64, uint8, int8, int16, int32, int64.

  • name (str|None, optional) – Name for the operation (optional, default is None). For more information, please refer to Name.

Returns

out (Tensor), an N-D Tensor, the shape and data type is the same with input

(integer types are autocasted into float32).

Example

>>> import paddle

>>> x = paddle.to_tensor([0, 0.5, -1.], dtype="float32")
>>> out = paddle.erfinv(x)
>>> out
Tensor(shape=[3], dtype=float32, place=Place(cpu), stop_gradient=True,
[ 0.       , 0.47693631, -inf.     ])