当前位置:网站首页>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 .
边栏推荐
- C语言双指针——经典题型
- 堆排序详解
- Verrouillage [MySQL]
- poi追加写EXCEL文件
- VMware virtualization cluster
- On the inverse order problem of 01 knapsack problem in one-dimensional state
- [brush questions] top101 must be brushed in the interview of niuke.com
- The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
- 游戏解包的危害及资源加密的重要性
- Sublime text in CONDA environment plt Show cannot pop up the problem of displaying pictures
猜你喜欢
ROS编译 调用第三方动态库(xxx.so)
2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
Sort according to a number in a string in a column of CSV file
【ROS】usb_cam相机标定
【刷题】牛客网面试必刷TOP101
C语言双指针——经典题型
Cisp-pte practice explanation
[MySQL] lock
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
Let the bullets fly for a while
随机推荐
sublime text的编写程序时的Tab和空格缩进问题
Image fusion -- challenges, opportunities and Countermeasures
JS pure function
On the inverse order problem of 01 knapsack problem in one-dimensional state
[2022 广东省赛M] 拉格朗日插值 (多元函数极值 分治NTT)
2022.02.13 - NC004. Print number of loops
egg. JS getting started navigation: installation, use and learning
Online yaml to CSV tool
C language double pointer -- classic question type
2022.02.13 - NC002. sort
JS native implementation shuttle box
JVM performance tuning and practical basic theory - Part 1
【MySQL】日志
torch建立的网络模型使用torchviz显示
Unified ordering background interface product description Chinese garbled
[MySQL] database stored procedure and storage function clearance tutorial (full version)
Cisp-pte practice explanation
gcc动态库fPIC和fpic编译选项差异介绍
C语言深度解剖——C语言关键字
个人电脑好用必备软件(使用过)