当前位置:网站首页>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
边栏推荐
猜你喜欢

Internship report skywalking distributed link tracking?

OpenMLDB Meetup No.4 会议纪要
![[play with FPGA learning 2 in simple terms ----- design skills (basic grammar)]](/img/50/22f2fa8fd606572b13a18cc889ca2e.png)
[play with FPGA learning 2 in simple terms ----- design skills (basic grammar)]
![[applinking practical case] share in app pictures through applinking](/img/12/5616f1fa55387b81e25e55a98022b9.png)
[applinking practical case] share in app pictures through applinking

Creation and use of unified links in Huawei applinking

Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)

Use Huawei performance management service to configure the sampling rate on demand

TIPC Service and Topology Tracking4

I STM32 development environment, keil5/mdk5.14 installation tutorial (with download link)

Flink two Open, implement Batch Lookup join (attached source)
随机推荐
js中给数组添加元素的方法有哪些
flink二开,实现了个 batch lookup join(附源码)
Logu p3398 hamster looks for sugar (double LCA on the tree to judge whether the two paths in the tree intersect)
The most detailed MySQL installation tutorial
【深入浅出玩转FPGA学习5-----复位设计】
Implement custom drawer component in quick application
Appgallery connect scenario development practice - image storage and sharing
spritejs
二叉树专题--AcWing 1497. 树的遍历(利用后、中序遍历,构建二叉树)
How to use ide to automatically sign and debug Hongmeng application
Is the account above changtou school safe?
Summary of cases of players' disconnection and reconnection in Huawei online battle service
C# 文件与文件夹操作
TIPC messaging3
二叉树专题--【深基16.例7】普通二叉树(简化版)(multiset 求前驱 后继 哨兵法)
Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
TIPC Cluster5
Verilog 和VHDL有符号数和无符号数相关运算
二叉树专题--AcWing 19. 二叉树的下一个节点(找树中节点的后继)
[play with FPGA learning 4 in simple terms ----- talk about state machine design]