当前位置:网站首页>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 .
边栏推荐
- Precise query of tree tree
- 704 二分查找
- sublime text中conda环境中plt.show无法弹出显示图片的问题
- Process of obtaining the electronic version of academic qualifications of xuexin.com
- 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
- sublime text的编写程序时的Tab和空格缩进问题
- Modify the video name from the name mapping relationship in the table
- On the inverse order problem of 01 knapsack problem in one-dimensional state
- 角色动画(Character Animation)的现状与趋势
- C language double pointer -- classic question type
猜你喜欢

synchronized 解决共享带来的问题

sublime text的编写程序时的Tab和空格缩进问题
![[brush questions] top101 must be brushed in the interview of niuke.com](/img/55/5ca957e65d48e19dbac8043e89e7d9.png)
[brush questions] top101 must be brushed in the interview of niuke.com

pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof

pytorch训练好的模型在加载和保存过程中的问题

角色动画(Character Animation)的现状与趋势

深度剖析C语言数据在内存中的存储
![[MySQL] lock](/img/ce/9f8089da60d9b3a3f92a5e4eebfc13.png)
[MySQL] lock

Synchronized solves problems caused by sharing

What is CSRF (Cross Site Request Forgery)?
随机推荐
Grayscale upgrade tidb operator
Circular reference of ES6 module
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
【刷题】牛客网面试必刷TOP101
Fibonacci sequence
Golang force buckle leetcode 1020 Number of enclaves
Permutation and combination function
Leetcode skimming (5.29) hash table
VMware virtualization cluster
pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof
gcc动态库fPIC和fpic编译选项差异介绍
704 二分查找
C语言深度解剖——C语言关键字
Char to leading 0
[cloud native] teach you how to build ferry open source work order system
2022.02.13 - NC004. Print number of loops
JVM performance tuning and practical basic theory - Part 1
@JsonBackReference和@JsonManagedReference(解决对象中存在双向引用导致的无限递归)
torch建立的网络模型使用torchviz显示
sys. argv