当前位置:网站首页>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 .
边栏推荐
- How to conduct interface test? What are the precautions? Nanny level interpretation
- C language custom type: struct
- IOT -- interpreting the four tier architecture of the Internet of things
- MySQL learning records 12jdbc operation transactions
- Mobile phones and computers on the same LAN access each other, IIS settings
- 角色动画(Character Animation)的现状与趋势
- Cisp-pte practice explanation
- C语言双指针——经典题型
- egg. JS project deployment online server
- Deep learning: derivation of shallow neural networks and deep neural networks
猜你喜欢

Configuring OSPF load sharing for Huawei devices

synchronized 解决共享带来的问题

Roguelike游戏成破解重灾区,如何破局?

2022 Inner Mongolia latest construction tower crane (construction special operation) simulation examination question bank and answers

ROS编译 调用第三方动态库(xxx.so)

Fibonacci sequence

2022.02.13 - NC004. Print number of loops

Deep analysis of C language pointer

C语言双指针——经典题型

Mobile phones and computers on the same LAN access each other, IIS settings
随机推荐
sys. argv
根据csv文件某一列字符串中某个数字排序
IOT -- interpreting the four tier architecture of the Internet of things
poi追加写EXCEL文件
Sort according to a number in a string in a column of CSV file
Fibonacci sequence
Use br to back up tidb cluster data to S3 compatible storage
LDAP應用篇(4)Jenkins接入
【Nvidia开发板】常见问题集 (不定时更新)
Let the bullets fly for a while
String to leading 0
MySQL learning record 07 index (simple understanding)
VMware 虚拟化集群
【刷题】牛客网面试必刷TOP101
JVM 快速入门
2022.02.13 - NC002. sort
Chrome浏览器的crash问题
ROS编译 调用第三方动态库(xxx.so)
JVM performance tuning and practical basic theory - Part 1
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]