Shortcuts

torch.expm1

torch.expm1(input, *, out=None) → Tensor

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

yi=exi1y_{i} = e^{x_{i}} - 1
Parameters

input (Tensor) – the input tensor.

Keyword Arguments

out (Tensor, optional) – the output tensor.

Example:

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

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