Skip to content
fn

lp_normalize_op

→TensorImplPtr
int lp_normalize_op(const int & x, double ord, int axis, double eps)

Public free-function entry point for Lp normalisation.

Thin wrapper that delegates to LpNormalizeBackward::forward. This is the symbol the pybind11 binding layer forwards to from lucid.nn.functional.normalize.

See Also

LpNormalizeBackward : Autograd node implementing the forward + backward.

Parameters

xTensorImplPtr
Input tensor of any shape.
orddouble
Norm order pp.
axisint
Axis along which to compute the norm (negative allowed).
epsdouble
Minimum allowed denominator.

Returns

TensorImplPtr

Normalised output, same shape as x.