Short description: NormalizeL2 operation performs L2 normalization of the 1st input tensor in slices specified by the 2nd input.
data- input tensor to be normalized. Type of elements is any floating point type. Required.
axes- scalar or 1D tensor with axis indices for the
datainput along which L2 reduction is calculated. Required.
datainput and normalized slices defined by
Each element in the output is the result of division of corresponding element from the
data input tensor by the result of L2 reduction along dimensions specified by the
output[i0, i1, ..., iN] = x[i0, i1, ..., iN] / sqrt(eps_mode(sum[j0,..., jN](x[j0, ..., jN]**2), eps))
i0, ..., iN run through all valid indices for the 1st input and summation
sum[j0, ..., jN] have
jk = ik for those dimensions
k that are not in the set of indices specified by the
axes input of the operation. One of the corner cases is when
axes is an empty list, then we divide each input element by itself resulting value 1 for all non-zero elements. Another corner case is where
axes input contains all dimensions from
data tensor, which means that a single L2 reduction value is calculated for entire input tensor and each input element is divided by that value.
eps_mode selects how the reduction value and
eps are combined. It can be
add depending on
eps_mode attribute value.