He Initialization: which scale should be retained after ReLU
ReLU Cuts negative input to zero so that the output average is usually no longer zero.
Learning objectives and first steps2 objectives 2 first fixes
Try to do it after reading
- Indication with a second order. ReLU Initialization
- Compute Volume Layer Real fan_in
Suggested first
- Vector and Matrix Operations
- Counts and chain rules
After the negative side was cut off, what did you get from the next floor
ReLU Cuts negative input to zero so that the output average is usually no longer zero. In the discussion of initialization, therefore, care should be taken to distinguish the margin from the second order. If each layer is treated as a zero-average variable, the square of the mean may be missing in the deduction. The common scale for initialization of He is derived from signal transmission analysis under symmetric pre-activation, independent weights, etc.
In this approximation, the second order after ReLU is about half the amount of the second order. To compensate for this factor, the weight margin is 2 fan_in. If fan_in = 18, difference 1/9 and standard deviation 1/3. 3 x 3 volume, 2 input channels without grouping, with 2 x 3 x 3 = 18; The input channel number 2 cannot be considered as fan_in.
For a uniform distribution, the bound is √(6/fan_in), here about 0.577350, not standard deviation 0.333333. Specify distribution and parameter conversion separately. Leaky ReLU's negative slope also changes the compensation factor; ordinary ReLU scaling may not match the derivation.
A numeric check may pre-activate an artificial construction symmetry [−2,−1,1,2]. The original second order is 2.5, ReLU output [0,0,1,2], and the second order is 1.25, which is half. An output mean value of 0.75 and a variance of 0.6875; It's obviously not 1.25. This example is a direct illustration of why the second-order rule is not called a square at every step.
The input of the real layer may be asymmetric, be relevant or have been normalized to provide only a reasonable starting point. The weight of the training process changes and the initial distribution is no longer as it is. The later gradient was observed to be unstable and learning rates, reclassification, loss scaling and data anomalies were still checked and not all problems could be attributed to initialization.
This example only validates the average statistics and distribution parameters of a limited pool. The original paper on the conditions for initialization should be viewed separately from the results; The course note does not support the conclusion that "any activation is best with He".
If the fan dimension is actually used at a given level as a baseline for scaling, it also needs to be clarified which side of the distribution is prioritized. The model option for initializing API is an algorithmic configuration that does not record distribution names without missing the number of connections.
Review with standard Python
x=[-2.,-1.,1.,2.]y=[max(0.,v) for v in x]assert sum(v*v for v in y)/4==1.25assert sum(v*v for v in y)/4-(sum(y)/4)**2==.6875Only fixed arithmeticals and indexes are validated above and no framework training is called.
The second order of output for ReLU is half, and the difference is half?
No, output mean usually changes. The difference is equal to the second-step equality deflator square, and this example can see the difference directly.
3x3 depth volume, each group only connects to one input channel, fan_in what?
By this connection structure of 9; If you misuse the full input channel number, the initialization range is set to be inconsistent.
Sources and reconciliations
Definitions, methods and interfaces are available.
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.