python tqdm进度条

from tqdm import tqdm




with tqdm(total=100,
            desc='Train Epoch     #{}'.format(1),
            disable=False) as t:

        t.set_postfix({'loss': 1,
                          'accuracy': 100. * 0.1})
        t.update(1)


输出:

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

你可能感兴趣的:(python,tqdm)