The 'speed' displayed by tqdm is the instantaneous speed or the average speed?

As the title says, I wonder the speed displayed in tqdm processing bar is instantaneous or average? enter image description here

Answers 1

  • To display the speed, tqdm uses Exponential Moving Average Smoothing. From the documentation:

    smoothing: float, optional

    Exponential moving average smoothing factor for speed estimates (ignored in GUI mode). Ranges from 0 (average speed) to 1 (current/instantaneous speed) [default: 0.3].

    You can therefore say that it's a mix of the two. As you already read above, you can choose one of these (by setting a 0/1 value) if you want to see the current or the average speed, but my opinion is that the default ratio is just fine.

Related Articles