python tqdm进度条

柔光的暖阳◎ 2022-05-15 02:14 393阅读 0赞
  1. from tqdm import tqdm
  2. with tqdm(total=100,
  3. desc='Train Epoch #{}'.format(1),
  4. disable=False) as t:
  5. t.set_postfix({
  6. 'loss': 1,
  7. 'accuracy': 100. * 0.1})
  8. t.update(1)

输出:

  1. Train Epoch #1: 1%|█ | 1/100 [00:00<00:00, 2551.28it/s, loss=1, accuracy=10]

发表评论

表情:
评论列表 (有 0 条评论,393人围观)

还没有评论,来说两句吧...

相关阅读