L2 Normalized: Zero vectors without direction

L2 is unicoded by its two-dimensional vectors, so that non-zero vectors fall on the unit sphere.

Thematic shorts • IntroductionCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives 2 first fixes

Try to do it after reading

  • Distinguishing unitization from coordinates standardization
  • Processing of zero-varieties and their gradient boundaries

Suggested first

  • Inner vectors & Parameters
  • Classified loss and gradient

Change the length to one. It doesn't create direction

L2 is unicoded by its two-dimensional vectors, so that non-zero vectors fall on the unit sphere. It is different from the standard deviation for the deflator of each characteristic: the former is treated by the overall length of a single vector and the latter by the statistics of the columns of training data. The two apply to different geometric assumptions.

The vector [3.4] square and 1 after reclassification [0.6,0.8], square, square, square. The vector [0,0] coefficient 0 does not have a definable direction, and direct division produces undefined values. A common interface uses max(norm,eps) as a denominator, with zero vectors remaining, not a legal unit direction.

Small vectors are also noteworthy. Sets x = [0.00000000010], eps =0.000001, and if max agreed, output [0.00100], the parameter is not 1. eps is a stable boundary and does not mean that all exports are strictly unitized. The epsilon placements of the denominator and the peace should be different from those of the different libraries and the formula should be checked.

Normalization changes learning information

Unitation removes the overall length. If vector parameters carry confidence, hotness or the amount of evidence, the signal will be lost if it is unicoded; If the length is an irrelevant measure of training, it may reduce the sorting bias. Unitization cannot be described as more rational in general terms and needs to be matched to mission objectives.

The gradient is not simply divided into fixed parameters, as the parameters themselves depend on input. Normalization is not sensitive to changes in direction and still responds to changes in direction when far from the epsilon border. If the loss is unit-only, the scaling up of the output along the current vector in equal proportion does not change the output, resulting in a lead in the corresponding direction of zero.

Errors compare input parameters distribution, zero vector ratios, and actual parameters after reclassification. If a large output is close to zero, the input, the entire mask pool and the abnormal code should be checked before they are placed directly into the cosine index. The cosine of the zero vector and any vector usually requires specific agreement.

This section refers to the normal e-geometry with PyTorch 2 normalize and Faiss distance rules. Value is a synthetic hand calculation. The training end and index end should adopt the consistent re-entry protocol and epsilon.

Zero vector divided by max(norm,eps), followed by unit vector?

No, it's still a zero vector, it's not given a certain direction.

[3,4] is the same as [6] once it has been normalized?

Similarly, both [0.6,0.8] indicate that the overall length information has been removed.

If you enter a sequence from the whole mask, first define what the empty sequence returns. The silence of a zero-dimension as a general candidate would allow the distance library to give what appears to be a normal ranking, but that was not an indication of a direction with evidence of content.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Faiss — MetricType and distances
  2. PyTorch — normalize

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.