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}}\)
- Parameters:
input (Tensor) – [dtype=T1] The input tensor.
- Returns:
[dtype=T1] A new tensor.
- Return type:
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,))