mindspore.mint.erfinv

mindspore.mint.erfinv(input)[源代码]

逐元素计算输入tensor的逆误差。 逆误差函数在 (-1, 1) 范围内定义为:

erfinv(erf(x))=x
参数:
  • input (Tensor) - 输入tensor。

返回:

Tensor

支持平台:

Ascend

样例:

>>> import mindspore
>>> # When the `input` is int8, int16, int32, int64, uint8, bool, the return value type is float32.
>>> input = mindspore.tensor([0, 0.5, -0.9], mindspore.int64)
>>> mindspore.mint.erfinv(input)
Tensor(shape=[3], dtype=Float32, value= [ 0.00000000e+00,  0.00000000e+00, 0.00000000e+00])
>>> # Otherwise, the return value type is the same as the input type.
>>> input = mindspore.tensor([0, 0.5, -0.9], mindspore.float32)
>>> mindspore.mint.erfinv(input)
Tensor(shape=[3], dtype=Float64, value= [ 0.00000000e+00,  4.76936132e-01, -1.16308689e+00])