What formula do you use for your smoothing algorithm?
The exponential moving average formula aligns with the one used in TensorBoard.
Refer to this explanation on Stack OverFlow for details on the equivalent Python implementation. The source code to TensorBoard's smoothing algorithm (as of this writing) can be found here.