当前位置:网站首页>The network model established by torch is displayed by torch viz
The network model established by torch is displayed by torch viz
2022-07-06 08:33:00 【MAR-Sky】
torchviz.make_dot
MyConvNet = VGG() # It can be a network
x = torch.randn(4, 3, 256, 256).requires_grad_(True) # Define the input value of a network
y = MyConvNet(x) # Get the predicted value of the network
MyConvNetVis = make_dot(y, params=dict(list(MyConvNet.named_parameters()) + [('x', x)]))
MyConvNetVis.format = "png"
# Specify the folder where the file is generated
MyConvNetVis.directory = "data"
# Generate the file
MyConvNetVis.view()
We need to pay attention to , Input format It is the same as the input channel format defined by the network ;
rely on graphviz library
I see many things on the Internet that need to be downloaded graphviz Of zip or mis file , Also configure path; And then use python Proceed again pip After installation and restart, I don't know what the principle is . Personal attempts only require Install in the environment in use graphviz library You can use .
边栏推荐
- Roguelike游戏成破解重灾区,如何破局?
- Circular reference of ES6 module
- tree树的精准查询
- On the day of resignation, jd.com deleted the database and ran away, and the programmer was sentenced
- 【MySQL】锁
- Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products
- [MySQL] lock
- Vocabulary notes for postgraduate entrance examination (3)
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- win10系统中的截图,win+prtSc保存位置
猜你喜欢
Sublime text in CONDA environment plt Show cannot pop up the problem of displaying pictures
Pointer advanced --- pointer array, array pointer
Leetcode question brushing (5.28) hash table
Online yaml to CSV tool
Ruffian Heng embedded bimonthly, issue 49
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Restful API design specification
C语言深度解剖——C语言关键字
同一局域网的手机和电脑相互访问,IIS设置
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
随机推荐
logback1.3. X configuration details and Practice
Online yaml to CSV tool
CISP-PTE实操练习讲解
PC easy to use essential software (used)
软件卸载时遇到trying to use is on a network resource that is unavailable
Day29-t77 & t1726-2022-02-13-don't answer by yourself
leetcode刷题 (5.29) 哈希表
[2022 Guangdong saim] Lagrange interpolation (multivariate function extreme value divide and conquer NTT)
704 二分查找
leetcode刷题 (5.28) 哈希表
生成器参数传入参数
IOT -- interpreting the four tier architecture of the Internet of things
JS inheritance method
Sublime text in CONDA environment plt Show cannot pop up the problem of displaying pictures
How to conduct interface test? What are the precautions? Nanny level interpretation
Screenshot in win10 system, win+prtsc save location
【MySQL】鎖
All the ArrayList knowledge you want to know is here
指针进阶---指针数组,数组指针
角色动画(Character Animation)的现状与趋势