comments + remove self

Signed-off-by: Stephen L. <lrq3000@gmail.com>
This commit is contained in:
Stephen L 2015-11-25 23:43:01 +01:00
parent 9fc5a16434
commit d5a8a76f06
1 changed files with 3 additions and 1 deletions

View File

@ -398,11 +398,13 @@ class tqdm(object):
# to the maximum iteration rate seen so far. # to the maximum iteration rate seen so far.
if dynamic_miniters and delta_t: if dynamic_miniters and delta_t:
if mininterval: if mininterval:
# weight delta_it with ema to try to converge
# miniters towards the timeframe of mininterval
miniters = smoothing * delta_it * mininterval \ miniters = smoothing * delta_it * mininterval \
/ delta_t + (1 - smoothing) * miniters / delta_t + (1 - smoothing) * miniters
else: else:
miniters = smoothing * delta_it + \ miniters = smoothing * delta_it + \
(1 - self.smoothing) * self.miniters (1 - smoothing) * miniters
# Store old values for next call # Store old values for next call
last_print_n = n last_print_n = n