He and Glorot Initialization Scales

~10 mincode completion

Implement init_scales(n_in, n_out, sigma_w, depth) returning the array [he_std, glorot_std, gain, gain ** depth].

Where this shows up

~10 min

8 employers weight this skill

4 frontier labs, 2 big tech firms, 1 autonomy company, 1 enterprise vendor. Top match scores 93.

Python
import numpy as np


def init_scales(n_in, n_out, sigma_w, depth):
    """
    Initialization scales and the signal gain they imply.

    Args:
        n_in:    inputs to each unit
        n_out:   units in the layer
        sigma_w: standard deviation the weights are actually drawn with
        depth:   number of identical ReLU layers stacked

    Returns:
        array [he_std, glorot_std, gain, gain ** depth]
    """
    # YOUR CODE HERE
    pass
Loading docs…

The AI Mentor needs an account

It reads your code and the failing tests and nudges you toward the fix without handing you the answer. Free accounts get it on every problem you're working on today.