Chain rule: multiply along path and add at convergence

The same hidden expression can be used for both forecasting and auxiliary constraints.

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

  • Calculating local lead by calculation path
  • Distinguishing Multiplication Paths with Shared Parameters

Suggested first

  • Vector and Matrix Operations
  • Counts and chain rules

Why did a shared value get two gradients

The same hidden expression can be used for both forecasting and auxiliary constraints. The loss of sensitivity to it in reverse transmission comes from all use locations; The omission of a path allows the model to optimize another target. This limits the input, the parameters to the real number of metrics, the function is minimal at the current point, and the normal number of guides is discussed, and does not involve discrete samples or random estimates.

Sets the medium u = w2, output L = u+3w. At w = 2, the square branch was given 4 and the linear branch was given 6 and the loss was 10. (b) The local lead is 2 w = 4 along the square path; The straight path is three. The two converge at w, with a total gradient of 7. The gradient does not multiply the two numbers, nor is it even. If the support weight is changed to 0.1, the direct path contribution is 0.3 and the total gradient is 4.3.

Continue to remove another chain a = 2 w, b = a2, L = b. At w = 2, a = 4, local lead dL / da = 8, da / dw = 2, and therefore the total lead number is 16. There's no fork here. Multiply along the path. Two examples are taken together to show that “multiply” and “plus” occur at different locations in the calculation of the map, rather than two optional formulas.

The starting point for the reverse is a clear target. If the program returns a vector, it must specify how the output will constitute the target or provide the upstream weight. (a) Directly sum up multitask losses, which is equivalent to clarifying the current factors for each task; Different reclassifications still change the scales of the paths. The total gradient for shared parameters is small and may also come from two sets-offs, and cannot be judged separately from each task.

Errors can be listed several times by hand for each variable, and then for each usage a local guide for writing. Frame automatically handles shared references, but the midway detach, converts the lengths to normal numbers, and the error copy parameters may change the relationship. The relationships cannot be tested by looking at forward values only, since the branch of the gradient can still provide the same forward results.

7 and 16 of this case can be reviewed through a central difference: 0.00001 is obtained at about 2 and the calculation function difference is divided by twice the length of the step. When it is far from the point of view, the two should be matched within the floating-point tolerance. The numerical difference is a partial diagnosis that does not establish the correct business definition of loss or the splitting of data.

What does the two shared paths mean by 3 and −3 respectively?

Only the first step of the contribution of the current overall objective to this parameter is offset; The lead for each is still not zero, and changing the weight of the task will change the conclusion.

Can you update one path and calculate the other?

That would put the two gradients at different parameter points, which would no longer be the same step of the normal gradient. The full gradient is accumulated and updated as agreed.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. CS231n — Backpropagation, Intuitions
  2. PyTorch — The Fundamentals of Autograd

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.