Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PyTorch torch.erfc function

PyTorch torch.erfc function

PyTorch torch.erfc function


PyTorch torch reference manual PyTorch torch reference manual

torch.erfc is a PyTorch function for computing the complementary error function element-wise.

Function definition

torch.erfc(input, *, out=None)


Usage examples

Example

import

torch

Complementary error function example

x

=

torch.

tensor

(

[

0

,

0.5

,

1.0

,

2.0

]

,

dtype

=

torch.

float32

)

result

=

torch.

erfc

(

x

)

print

(

result

)

 

tensor([1.0000, 0.4795, 0.1573, 0.0047])


PyTorch torch reference manual PyTorch torch reference manual