我正在尝试使用tqdm的进度条
progress_bar = tqdm(training_generator, position=0, leave=True)
for iter, data in enumerate(progress_bar):
if iter < step - last_epoch * num_iter_per_epoch:
progress_bar.update()
continue然后输出如下所示
[Info] initializing weights...
0%| | 0/787 [00:00<?, ?it/s]bbox_shape 0
Step: 2. Epoch: 0/20. Iteration: 3/787. Cls loss: 7.58472. Reg loss: 15.03549. Total loss: 22.62021: 0%| | 3/787 [00:02<13:05, 1.00s/it]bbox_shape 0
Step: 4. Epoch: 0/20. Iteration: 5/787. Cls loss: 29.50139. Reg loss: 10.72687. Total loss: 40.22825: 1%| | 5/787 [00:03<10:21, 1.26it/s]bbox_shape 0
Step: 7. Epoch: 0/20. Iteration: 8/787. Cls loss: 1.49858. Reg loss: 25.04633. Total loss: 26.54491: 1%| | 8/787 [00:05<08:40, 1.50it/s]bbox_shape 0发布于 2020-11-11 10:29:01
也许可以尝试从命令行运行该程序?与空闲相比,tqdm通常在终端中工作得更好。
https://stackoverflow.com/questions/64779567
复制相似问题