exp¶
- nvtripy.exp(input: Tensor) Tensor[source]¶
Computes the elementwise exponential of the elements of the input tensor:
\(\text{exp}(x_{i}) = e^{x_{i}}\)
- INPUT REQUIREMENTS:
- OUTPUT GUARANTEES:
return[0].dtype==input.dtype
Example
1input = tp.arange(3, dtype=tp.float32) 2output = tp.exp(input)
Local Variables¶>>> input tensor([0, 1, 2], dtype=float32, loc=gpu:0, shape=(3,)) >>> output tensor([1, 2.71828, 7.38906], dtype=float32, loc=gpu:0, shape=(3,))