tqdm显示
Loss 1.2855 (1.1737) Prec@1 15.625 (56.497) Prec@5 100.000 (100.000): 90%|███████████▊ | 38/42 [01:32<00:02, 1.40it/
Loss 2.4410 (1.2062) Prec@1 6.250 (55.208) Prec@5 100.000 (100.000): 90%|████████████▋ | 38/42 [01:33<00:02, 1.40it
Loss 2.4410 (1.2062) Prec@1 6.250 (55.208) Prec@5 100.000 (100.000): 93%|█████████████ | 39/42 [01:33<00:02, 1.38it
Loss 1.3550 (1.2099) Prec@1 6.250 (53.984) Prec@5 100.000 (100.000): 93%|█████████████ | 39/42 [01:34<00:02, 1.38it
Loss 1.3550 (1.2099) Prec@1 6.250 (53.984) Prec@5 100.000 (100.000): 95%|█████████████▎| 40/42 [01:34<00:01, 1.40it
Loss 0.6876 (1.1972) Prec@1 75.000 (54.497) Prec@5 100.000 (100.000): 95%|████████████▍| 40/42 [01:34<00:01, 1.40it/
Loss 0.6876 (1.1972) Prec@1 75.000 (54.497) Prec@5 100.000 (100.000): 98%|████████████▋| 41/42 [01:34<00:00, 1.42it/
Loss 2.5315 (1.2290) Prec@1 84.375 (55.208) Prec@5 100.000 (100.000): 98%|████████████▋| 41/42 [01:35<00:00, 1.42it/
Loss 2.5315 (1.2290) Prec@1 84.375 (55.208) Prec@5 100.000 (100.000): 100%|█████████████| 42/42 [01:35<00:00, 1.43it/
Loss 2.5315 (1.2290) Prec@1 84.375 (55.208) Prec@5 100.000 (100.000): 100%|█████████████| 42/42 [01:36<00:00, 2.29s/it]
刚开始以为是没有写sleep(0.01)
发现写了也没用
后来又添加了更新pbar.update()
也不行,然后在这个前面又添加了
pbar.set_description(output)
终于可以了
二十分钟后记录
发现之前的没有loss等信息,后来又修改为
pbar.set_description('Loss {loss.val:.4f} ({loss.avg:.4f})'
'Prec@1 {top1.val:.3f} ({top1.avg:.3f})'
'Prec@5 {top5.val:.3f} ({top5.avg:.3f})'.format(
loss=losses, top1=top1, top5=top5))
pbar.update()
注意把原代码的/给删除了,否则还是那样