fn
rsqrt
→Tensorrsqrt(input: Tensor)Element-wise reciprocal square root.
Computes for each entry. x must be strictly positive.
Parameters
inputTensorInput tensor.
Returns
TensorElement-wise result with the same shape as input.
Notes
Mathematical definition:
Gradient: . Heavily used inside layer / RMS normalization.
Examples
>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.rsqrt(x)
Tensor([...])