fn
log2
→Tensorlog2(input: Tensor)Element-wise base-2 logarithm.
Computes for each entry. The input must be strictly positive.
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.log2(x)
Tensor([...])