torch.exp()

2022-08-18 14:25:14 浏览数 (2)

torch.exp(input, out=None) → Tensor

Returns a new tensor with the exponential of the elements of the input tensor input.

Parameters

  • input (Tensor) – the input tensor.
  • out (Tensor, optional) – the output tensor.

Example:

代码语言:javascript复制
>>> torch.exp(torch.tensor([0, math.log(2.)]))
tensor([ 1.,  2.])

0 人点赞