LayerWeightStatistics
python
LayerWeightStatistics(name: str, kind: str, parameters: int, units: int, inputs: int, weight_norm: float, spectral_norm: float, effective_rank: float, bias_norm: float) -> NoneThe shape and spread of one parameterised layer's weights. Needs no observations.
Properties
max_rank
python
max_rank: intThe largest rank the weight could have.
rank_ratio
python
rank_ratio: floatEffective rank as a fraction of max_rank.
Values
bias_norm
python
bias_norm: floatL2 norm of the bias, or 0 when the layer has none.
effective_rank
python
effective_rank: floatEffective rank of the weight viewed as (units, inputs). Units sharing a direction count once.
inputs
python
inputs: intInputs per unit, that is the fan-in. For a convolution that is in_channels * kernel_height * kernel_width.
kind
python
kind: strThe layer's module class name, for example Linear.
name
python
name: strThe layer's path within the model, for example fc.0.
parameters
python
parameters: intWeights plus biases.
spectral_norm
python
spectral_norm: floatLargest singular value of the weight viewed as (units, inputs). Bounds how much the layer can amplify.
units
python
units: intOutput units (channels or features).
weight_norm
python
weight_norm: floatFrobenius norm of the weight tensor.