torchliter.engine.buffersBufferBaseBuffer base class.
BufferBase.__init____init__(*args, **kwargs)
BufferBase.load_state_dictload_state_dict(state_dict)
BufferBase.resetreset()
BufferBase.state_dictstate_dict()
BufferBase.updateupdate(x: Any)
SequenceContainerSequence container Ingests new values and extends self.value
SequenceContainer.__init____init__(*args, **kwargs)
SequenceContainer.load_state_dictload_state_dict(state_dict)
SequenceContainer.resetreset()
SequenceContainer.state_dictstate_dict()
SequenceContainer.updateupdate(sequence: Union[List, Tuple])
ExponentialMovingAverageExponential Moving Average of a series of Tensors.
update rule: EMA[x[t]] := (1 - alpha) * EMA[x[t-1]] + alpha * x[t] diff: delta[x[t]] := x[t] - EMA[x[t-1]]
ExponentialMovingAverage.__init____init__(alpha: float = 0.01, **kwargs: Any)
ExponentialMovingAverage.load_state_dictload_state_dict(state_dict)
ExponentialMovingAverage.resetreset()
ExponentialMovingAverage.state_dictstate_dict()
ExponentialMovingAverage.updateupdate(x)
ScalarSummaryStatisticsStore the scalars and compute statistics.
The streaming scalars are stored in a list of any length. This is supposed to use in evals where the length is eval datasets.
Available statistics: - mean - median - std - max - min
ScalarSummaryStatistics.__init____init__(**kwargs)
ScalarSummaryStatistics.load_state_dictload_state_dict(state_dict)
ScalarSummaryStatistics.resetreset()
ScalarSummaryStatistics.state_dictstate_dict()
ScalarSummaryStatistics.updateupdate(x: float)
ScalarSmootherRolling average of a stream of scalars.
The streaming scalars are stored in a deque of certain length (maxlen). The statistics are computed within the current deque.
Available statistics: - mean - median - std - max - min
ScalarSmoother.__init____init__(window_size: int, **kwargs)
ScalarSmoother.load_state_dictload_state_dict(state_dict)
ScalarSmoother.resetreset()
ScalarSmoother.state_dictstate_dict()
ScalarSmoother.updateupdate(x: float)
VectorSmootherExponential moving average of n-dim vector:
vector = alpha * new_vector + (1 - alpha) * vector
Additional features: l_p normalization
VectorSmoother.__init____init__(
alpha: float,
n_dim: int,
init_value: float,
eps: float = 1e-08,
normalize: bool = True,
p: float = 1.0,
device: str = 'cpu',
dtype: torch.dtype = torch.float32,
**kwargs
)
VectorSmoother.load_state_dictload_state_dict(state_dict)
VectorSmoother.lp_normlp_norm(p: float)
VectorSmoother.lp_normalizedlp_normalized(p: float)
VectorSmoother.resetreset()
VectorSmoother.state_dictstate_dict()
VectorSmoother.updateupdate(x: torch.Tensor)