当前位置:网站首页>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
边栏推荐
- 【快应用】Win7系统使用华为IDE无法运行和调试项目
- Static variables in static function
- sqlite 修改列类型
- Primary key policy problem
- Luogu p1892 [boi2003] Gang (and search for variant anti set)
- Special topic of binary tree -- [deep base 16. Example 7] ordinary binary tree (simplified version) (multiset seeks the precursor and subsequent sentry Art)
- How to use ide to automatically sign and debug Hongmeng application
- 洛谷 P1892 [BOI2003]团伙(并查集变种 反集)
- 【ARK UI】HarmonyOS ETS的启动页的实现
- V2x SIM dataset (Shanghai Jiaotong University & New York University)
猜你喜欢

从攻击面视角,看信创零信任方案实践

二叉树专题--AcWing 19. 二叉树的下一个节点(找树中节点的后继)

华为游戏初始化init失败,返回错误码907135000

【AGC】如何解决事件分析数据本地和AGC面板中显示不一致的问题?

Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)

Internship report skywalking distributed link tracking?

二叉树专题--洛谷 P1229 遍历问题(乘法原理 已知前、后序遍历求中序遍历个数)

TIPC Cluster5

软件产品管理系统有哪些?12个最佳产品管理工具盘点

【深入浅出玩转FPGA学习4----漫谈状态机设计】
随机推荐
Array splitting (regular thinking
洛谷 P1892 [BOI2003]团伙(并查集变种 反集)
华为应用市场应用统计数据问题大揭秘
Nodejs+express+mysql simple blog building
【付费推广】常见问题合集,推荐榜单FAQ
【深入浅出玩转FPGA学习4----漫谈状态机设计】
[ark UI] implementation of the startup page of harmonios ETS
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
2022 love analysis · panoramic report of digital manufacturers of state-owned enterprises
MTK full dump抓取
Common methods of JS array
[play with FPGA learning 4 in simple terms ----- talk about state machine design]
Huawei game failed to initialize init with error code 907135000
一.STM32的开发环境,keil5/MDK5.14安装教程(附下载链接)
Learn open62541 -- [66] UA_ Generation method of string
TIPC protocol
Binary tree topic -- Luogu p3884 [jloi2009] binary tree problem (DFS for binary tree depth BFS for binary tree width Dijkstra for shortest path)
【AppLinking实战案例】通过AppLinking分享应用内图片
JVM garbage collector
快应用中实现自定义抽屉组件