tqdm
https://github.com/tqdm/tqdm
命名
taqaddum
which can mean "progress,"
abbreviation for "I love you so much" in Spanish
https://github.com/tqdm/tqdm#faq-and-known-issues より
Replace tqdm(zip(a, b)) with zip(tqdm(a), b) or even zip(tqdm(a), tqdm(b))
zipは片方のiterableにtqdmをつければいい
withと一緒にも使える
https://tqdm.github.io/docs/tqdm/#tqdm-objects
unit_scale: 自動でkilo, megaとunitのprefixをつけてくれる
tqdmでメモリリークにハマった話(機械学習)
for x in tqdm(loader):
このような書き方をすると、tqdmがloaderを参照したままになり、メモリが解放されない。
enumerateでラッパーしてからtqdmを噛ませるのが正解。
tqdm(enumerate(loader))
sys.getrefcount()