nnf_normalize {torch} | R Documentation |
Normalize
Description
Performs normalization of inputs over specified dimension.
Usage
nnf_normalize(input, p = 2, dim = 2, eps = 1e-12, out = NULL)
Arguments
input |
input tensor of any shape |
p |
(float) the exponent value in the norm formulation. Default: 2 |
dim |
(int) the dimension to reduce. Default: 1 |
eps |
(float) small value to avoid division by zero. Default: 1e-12 |
out |
(Tensor, optional) the output tensor. If |
Details
For a tensor input
of sizes , each
-element vector
along dimension
dim
is transformed as
With the default arguments it uses the Euclidean norm over vectors along
dimension for normalization.
[Package torch version 0.13.0 Index]