tensorboard.smooth

tensorboard.smooth(values, weight)

Smooth values the way TensorBoard’s Scalars dashboard does.

An exponential moving average, divided by 1 - weight ** n after the n-th finite value so that it starts at the first value rather than near zero. A value that is not finite is kept where it is and left out of the average.

Parameters

Name Type Description Default
values numpy.ndarray The values, in step order. required
weight float The smoothing weight, from 0 (none) up to but not including 1. required

Returns

Name Type Description
numpy.ndarray The smoothed values, as many as values.