Skip to content
fn

log10

→Tensor
log10(input: Tensor)

Implementing kernel

C++ engine symbols that back this Python API.

Element-wise base-10 logarithm.

Computes log⁡10(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=log⁡10(inputi)\text{out}_i = \log_{10}(\text{input}_i)

Gradient: 1/(xln⁡10)1 / (x \ln 10).

Examples

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