当前位置:网站首页>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 .
边栏推荐
- leetcode刷题 (5.31) 字符串
- MySQL learning record 10getting started with JDBC
- Fibonacci sequence
- Configuring OSPF load sharing for Huawei devices
- Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
- C language custom type: struct
- Huawei cloud OBS file upload and download tool class
- egg. JS getting started navigation: installation, use and learning
- C language double pointer -- classic question type
- Wincc7.5 download and installation tutorial (win10 system)
猜你喜欢
Image,cv2读取图片的numpy数组的转换和尺寸resize变化
Restful API design specification
PC easy to use essential software (used)
Use Alibaba icon in uniapp
Hungry for 4 years + Ali for 2 years: some conclusions and Thoughts on the road of research and development
同一局域网的手机和电脑相互访问,IIS设置
Mobile phones and computers on the same LAN access each other, IIS settings
tree树的精准查询
深度剖析C语言数据在内存中的存储
Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
随机推荐
Deep learning: derivation of shallow neural networks and deep neural networks
Synchronized solves problems caused by sharing
Deep analysis of C language data storage in memory
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
MySQL learning record 07 index (simple understanding)
Image, CV2 read the conversion and size resize change of numpy array of pictures
China dihydrolaurenol market forecast and investment strategy report (2022 Edition)
Roguelike游戏成破解重灾区,如何破局?
Leetcode question brushing (5.28) hash table
电脑F1-F12用途
移位运算符
Leetcode question brushing (5.31) string
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
poi追加写EXCEL文件
sublime text中conda环境中plt.show无法弹出显示图片的问题
Use br to back up tidb cluster data to S3 compatible storage
MySQL learning record 10getting started with JDBC
JVM performance tuning and practical basic theory - Part 1
化不掉的钟薛高,逃不出网红产品的生命周期
2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers