这两者有什么不同呢? tqdm可以包装任何可迭代对象。但是我不确定当给定两个参数时tqdm的功能如何。
# train_ids = list
elements = ('a', 'b', 'c')
for count, ele in tqdm(enumerate(elements)):
print(count, i)
# two arguments
for count, ele in tqdm(enumerate(elements), total=len(train_ids)):
print(count, i)
tqdm
需要很多参数。如果您想改回来,请随意。 - user3483203