Shortcuts

torch.exp

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

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

yi=exiy_{i} = e^{x_{i}}
Parameters
  • input (Tensor) – the input tensor.

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

Example:

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources