簡體   English   中英

Python tqdm輸出的說明。

[英]Explanation of output of Python tqdm.

我在python中有一個程序,它使用tqdm輸出進度條,如下所示:

  0%|          |   1/782 [00:02<31:00,  2.38s/it, loss=0.763 ]
 17%|█▋        | 134/782 [00:19<01:21,  7.98it/s, loss=0.375 ]
100%|██████████| 782/782 [03:50<00:00,  2.73it/s, loss=0.0193]
100%|█████████▉| 779/782 [03:47<00:00,  4.33it/s, loss=0.0175]
100%|█████████▉| 780/782 [03:48<00:00,  4.08it/s, loss=0.0172]
100%|█████████▉| 781/782 [03:48<00:00,  3.83it/s, loss=0.0195]

讓我們走第2排:

 17%|█▋        | 134/782 [00:19<01:21,  7.98it/s, loss=0.375 ]

按順序排列的字段是:

  • 17%:百分比完成。
  • |█▋ | : 進度條
  • 134/782 :迭代項目總數的項目數。
  • [00:19<01:21, 7.98it/s, loss=0.375 ] :讓我們分別將其分解為下方。
    • 00:19<01:21<<HERE>> Cant'想出來。
    • 7.98it/s :每秒迭代次數
    • loss=0.375 :正如標簽所說,這是損失。

我知道它顯示了進度和統計數據,例如每秒迭代次數,獲得的損失等等。但是我無法准確地說出這個時間格式(例如00:19<01:21 )代表每一行? <符號表示什么?

在源代碼[1]中,在format_meter方法中有關於它的注釋,它引用{elapsed}<{remaining}

[1] https://github.com/tqdm/tqdm/blob/master/tqdm/_tqdm.py

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM