当前位置:网站首页>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
边栏推荐
- Binary tree topic -- p1030 [noip2001 popularization group] find the first order
- Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)
- Complement (Mathematical Simulation
- C# 文件与文件夹操作
- 二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
- 【深入浅出玩转FPGA学习3-----基本语法】
- sqlite 修改列类型
- 如何使用IDE自动签名调试鸿蒙应用
- Special topic of binary tree -- [deep base 16. Example 7] ordinary binary tree (simplified version) (multiset seeks the precursor and subsequent sentry Art)
- 华为应用市场应用统计数据问题大揭秘
猜你喜欢

二叉树专题--AcWing 3384. 二叉树遍历(已知先序遍历 边建树 边输出中序遍历)

QT学习日记8——资源文件添加

flink二开,实现了个 batch lookup join(附源码)

【快应用】text组件里的文字很多,旁边的div样式会被拉伸如何解决

华为游戏初始化init失败,返回错误码907135000
![[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?](/img/66/674a06d8e45a31ae879b81554ef373.png)
[AGC] how to solve the problem that the local display of event analysis data is inconsistent with that in AGC panel?

Flick two open, realized a batch lookup join (with source code)

【深入浅出玩转FPGA学习3-----基本语法】

Jsp webshell Free from killing - The Foundation of JSP
![Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)](/img/c2/bb85b681af0f78b380b1d179c7ea49.png)
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
随机推荐
【深入浅出玩转FPGA学习4----漫谈状态机设计】
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
首份中国企业敏捷实践白皮书发布| 附完整下载
[in simple terms, play with FPGA learning 3 ----- basic grammar]
实验电镜距离测量之Matlab处理
STM32单片机编程学习
[applinking practical case] share in app pictures through applinking
二叉树专题--P1030 [NOIP2001 普及组] 求先序排列
TIPC介绍1
[paid promotion] collection of frequently asked questions, recommended list FAQ
JSP webshell free -- webshell free
Indexer in C #
V2x SIM dataset (Shanghai Jiaotong University & New York University)
PCL extracts a subset from a point cloud
二叉树专题--AcWing 47. 二叉树中和为某一值的路径(前序遍历)
[quick application] win7 system cannot run and debug projects using Huawei ide
二叉树专题--AcWing 18. 重建二叉树(利用前、中序遍历,构建二叉树)
Flick two open, realized a batch lookup join (with source code)
洛谷 P5536 【XR-3】核心城市(贪心 + 树形 dp 寻找树的中心)
Leetcode 182 Find duplicate email (2022.07.01)