Rate this Page

torch.exp#

torch.exp(input,*,out=None)Tensor#

Returns a new tensor with the exponential of the elementsof the input tensorinput.

yi=exiy_{i} = e^{x_{i}}
Parameters:

input (Tensor) – the input tensor.

Keyword Arguments:

out (Tensor,optional) – the output tensor.

Example:

>>>torch.exp(torch.tensor([0,math.log(2.)]))tensor([ 1.,  2.])