LayerActivationStatistics
LayerActivationStatistics(name: str, producer: str, units: int, dead: int, near_dead: int | None, effective_rank: float, mean_absolute: float) -> NoneHow one activation layer behaves over a batch of real observations.
Properties
dead_fraction
dead_fraction: floatDead units as a fraction of all units.
near_dead_fraction
near_dead_fraction: float | NoneNear-dead units as a fraction of all units, or None where near-dead has no meaning.
rank_ratio
rank_ratio: floatEffective rank as a fraction of the units, that is how much of the layer's width is actually in use.
Values
dead
dead: intUnits whose output never changed across the batch. A ReLU stuck at zero, or a saturated tanh, counts here.
effective_rank
effective_rank: floatEffective rank of the activations (see mrkwatkins.oakemu_rl.framework.diagnostics.rank.effective_rank).
mean_absolute
mean_absolute: floatMean absolute activation, for scale.
name
name: strThe activation module's path within the model, for example conv.1.
near_dead
near_dead: int | NoneUnits active (output above zero) on fewer than the threshold fraction of inputs. None for a bounded activation, where it has no meaning.
producer
producer: strThe layer feeding the activation, for example Conv2d(8, 32, kernel_size=(5, 5), stride=(2, 2)).
units
units: intUnits measured. Channels for a convolutional output, features for a linear one.