Skip to content

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) -> None

The shape and spread of one parameterised layer's weights. Needs no observations.

Source

Properties ​

max_rank ​

python
max_rank: int

The largest rank the weight could have.

Source

rank_ratio ​

python
rank_ratio: float

Effective rank as a fraction of max_rank.

Source

Values ​

bias_norm ​

python
bias_norm: float

L2 norm of the bias, or 0 when the layer has none.

Source

effective_rank ​

python
effective_rank: float

Effective rank of the weight viewed as (units, inputs). Units sharing a direction count once.

Source

inputs ​

python
inputs: int

Inputs per unit, that is the fan-in. For a convolution that is in_channels * kernel_height * kernel_width.

Source

kind ​

python
kind: str

The layer's module class name, for example Linear.

Source

name ​

python
name: str

The layer's path within the model, for example fc.0.

Source

parameters ​

python
parameters: int

Weights plus biases.

Source

spectral_norm ​

python
spectral_norm: float

Largest singular value of the weight viewed as (units, inputs). Bounds how much the layer can amplify.

Source

units ​

python
units: int

Output units (channels or features).

Source

weight_norm ​

python
weight_norm: float

Frobenius norm of the weight tensor.

Source