Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2018 03:24
Show Gist options
  • Select an option

  • Save anonymous/ce75a862eaa0a010e5810bcad5c90db2 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/ce75a862eaa0a010e5810bcad5c90db2 to your computer and use it in GitHub Desktop.
by amoshyc
from tqdm import tqdm
from time import sleep
n_steps = 100
msg = {'loss': 1, 'acc': 0.0}
with tqdm(total=n_steps, postfix=msg, ascii=True) as pbar:
for i in range(n_steps):
sleep(1)
msg['loss'] -= 0.01
msg['acc'] += 0.01
pbar.set_postfix(msg)
pbar.update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment