fn
log1p
→Tensorlog1p(input: Tensor)Element-wise natural logarithm of 1 + x.
Numerically accurate for small x where log(1 + x) loses precision.
Parameters
inputTensorInput tensor.
Returns
TensorElement-wise result with the same shape as input.
Notes
Mathematical definition:
Gradient: . Preferred over log(1 + x) near zero.
Examples
>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.log1p(x)
Tensor([...])