bias

Calibrator that returns the bias of all collected tensors.

Classes

BiasCalibrator

Bias calibrator, tracks the bias of all tensors collected.

class BiasCalibrator

Bases: _Calibrator

Bias calibrator, tracks the bias of all tensors collected.

__init__(method='mean', axis=None)

Initialize.

Parameters:
  • method (str)

  • axis (int | tuple[int, ...] | None)

collect(x)

Compute bias of input tensor along axis.

Parameters:

x (Tensor)

compute_bias()

Return the bias of all tensors collected.

compute_dynamic_bias(inputs)

Compute dynamic bias based on current inputs.

reset()

Reset the bias calibrator.