log

tripy.log(input: Tensor) Tensor[source]

Computes the elementwise natural logarithm (base e) of the elements of the input tensor.

Parameters:

input (Tensor) – [dtype=T1] The input tensor.

Returns:

[dtype=T1] A new tensor of the same shape as the input tensor.

Return type:

Tensor

TYPE CONSTRAINTS:
Example
Example
1input = tp.arange(1, 3, dtype=tp.float32)
2output = tp.log(input)
>>> input
tensor([1.0000, 2.0000], dtype=float32, loc=gpu:0, shape=(2,))
>>> output
tensor([0.0000, 0.6931], dtype=float32, loc=gpu:0, shape=(2,))