fn

log10

Tensor
log10(input: Tensor)
source

Element-wise base-10 logarithm.

Computes log10(x)\log_{10}(x) for each entry. The input must be strictly positive.

Parameters

inputTensor
Input tensor.

Returns

Tensor

Element-wise result with the same shape as input.

Notes

Mathematical definition:

outi=log10(inputi)\text{out}_i = \log_{10}(\text{input}_i)

Gradient: 1/(xln10)1 / (x \ln 10).

Examples

>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.log10(x)
Tensor([...])