Skip to content
DeepForgeby svx
All problems
EasyDeep Learningdl-055

He Init Variance

Problem

Return the He/Kaiming normal initialization variance 2 / fan_in, which keeps activations well-scaled in ReLU networks.

The signature is he_variance(fan_in).

Hint

He variance is the square of the He standard deviation.

Test cases

case 1
in: [2]
expected: 1
case 2
in: [100]
expected: 0.02
case 3
in: [128]
expected: 0.015625
case 4
in: [512]
expected: 0.00390625
Starter codePython
def he_variance(fan_in):
    # Your code here
    pass

4 test cases · run your code against them in the editor