当前位置:网站首页>Multi line display and single line display of tqdm
Multi line display and single line display of tqdm
2022-07-02 11:12:00 【lanmy_ dl】
introduce
from tqdm import tqdm
pbar = tqdm(total=n_batches)
Single line display
shortcoming , Can't see the process of change , Because it will cover ; advantage , Save screen , It's comfortable to see
for Cyclic data retrieval process
pbar.set_description('Train loss: %.3f / loss %.3f' % (train_loss / (i + 1), loss.item()))
pbar.update()
pbar.close()
like
Multi line display
Don't shut down close() Multi line display
for Cyclic data retrieval process
pbar.set_description('Train loss: %.3f / loss %.3f' % (train_loss / (i + 1), loss.item()))
pbar.update()
Supplement the complete cycle
The above cycle is train It takes each data to train the cycle , This is often the case
for i,(img, label) in enumerate(train_loader):
pbar.set_description('Train loss: %.3f / loss %.3f' % (train_loss / (i + 1), loss.item()))
pbar.update()
pbar.close() # If a single line shows that this line does not
边栏推荐
- 【AGC】如何解决事件分析数据本地和AGC面板中显示不一致的问题?
- 洛谷 P4281 [AHOI2008]紧急集合 / 聚会(树上倍增 LCA)
- [quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched
- Binary tree topic -- p1030 [noip2001 popularization group] find the first order
- Regular and common formulas
- How to transfer event objects and user-defined parameters simultaneously in Huawei express applications
- The most detailed MySQL installation tutorial
- TIPC协议
- Creation and use of unified links in Huawei applinking
- 2022 love analysis · panoramic report of digital manufacturers of state-owned enterprises
猜你喜欢
【深入浅出玩转FPGA学习2----设计技巧(基本语法)】
I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
TIPC messaging3
Thanos Receiver
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
QT学习日记8——资源文件添加
[AGC] build service 3 - authentication service example
V2X-Sim数据集(上海交大&纽约大学)
QT learning diary 7 - qmainwindow
TIPC Service and Topology Tracking4
随机推荐
C# 文件与文件夹操作
主键策略问题
Logu p3398 hamster looks for sugar (double LCA on the tree to judge whether the two paths in the tree intersect)
Primary key policy problem
如何使用IDE自动签名调试鸿蒙应用
sql left join 主表限制条件写在on后面和写在where后面的区别
二叉树专题--AcWing 19. 二叉树的下一个节点(找树中节点的后继)
二叉树专题--AcWing 3540. 二叉搜索树建树(实用板子 构建二叉搜索树 并输出前、中、后序遍历)
TIPC messaging3
三.芯片啟動和時鐘系統
洛谷 P3398 仓鼠找 sugar(树上倍增 lca 判断树中两条路径是否相交 结论)
【AGC】构建服务3-认证服务示例
flink二開,實現了個 batch lookup join(附源碼)
Huawei game failed to initialize init with error code 907135000
I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)
[play with FPGA learning 4 in simple terms ----- talk about state machine design]
Overview of integrated learning
二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)
TIPC Cluster5
Openmldb meetup No.4 meeting minutes