fn
sqrt
→Tensorsqrt(input: Tensor)Element-wise square root.
Computes the non-negative square root of each entry. Negative inputs produce NaN.
Parameters
inputTensorInput tensor.
Returns
TensorElement-wise result with the same shape as input.
Notes
Mathematical definition:
Gradient: . Diverges at x = 0.
Examples
>>> import lucid
>>> x = lucid.tensor([1.0, 2.0, 3.0])
>>> lucid.sqrt(x)
Tensor([...])