mindspore.ops.Erfc
- class mindspore.ops.Erfc(*args, **kwargs)[source]
Computes the complementary error function of input_x element-wise.
\[erfc(x) = 1 - \frac{2} {\sqrt{\pi}} \int\limits_0^{x} e^{-t^{2}} dt\]- Inputs:
input_x (Tensor) - The input tensor. The data type must be float16 or float32.
- Outputs:
Tensor, has the same shape and dtype as the input_x.
- Raises
TypeError – If dtype of input_x is neither float16 nor float32.
- Supported Platforms:
Ascend
GPU
Examples
>>> input_x = Tensor(np.array([-1, 0, 1, 2, 3]), mindspore.float32) >>> erfc = ops.Erfc() >>> output = erfc(input_x) >>> print(output) [1.8427168e+00 1.0000000e+00 1.5728319e-01 4.6912432e-03 2.2351742e-05]