fn
log
→Tensorlog(input: Tensor)Element-wise natural logarithm.
Computes for each entry. The input must be strictly positive; non-positive entries yield -inf or NaN.
Parameters
inputTensorInput tensor.
Returns
TensorElement-wise result with the same shape as input.
Notes
Mathematical definition:
Gradient: .
Examples
>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.log(x)
Tensor([...])