效果图
from tqdm import tqdm
import time
pbar1 = tqdm(total=5, position=0, desc="Epoch", leave=False, colour='green', ncols=100,unit="epoch")
for i in range(5):
pbar2 = tqdm(total=10, position=1, desc="Iteration", leave=False, colour='red', ncols=100,unit="iteration")
for j in range(10):
time.sleep(0.2)
pbar2.update(1)
pbar1.update(1)