Dead ReLU Fraction

~8 mincode completion

Implement dead_relu_fraction(Z) returning the fraction of dead units as a float.

Where this shows up

~8 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 dead_relu_fraction(Z):
    """
    Share of ReLU units that output 0 for the whole batch.

    Args:
        Z: pre-activations, shape (batch, units)

    Returns:
        float: dead units / total units
    """
    # 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.