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