当前位置:网站首页>torch建立的网络模型使用torchviz显示
torch建立的网络模型使用torchviz显示
2022-07-06 08:27:00 【MAR-Sky】
torchviz.make_dot
MyConvNet = VGG() # 可以是建立的网络
x = torch.randn(4, 3, 256, 256).requires_grad_(True) # 定义一个网络的输入值
y = MyConvNet(x) # 获取网络的预测值
MyConvNetVis = make_dot(y, params=dict(list(MyConvNet.named_parameters()) + [('x', x)]))
MyConvNetVis.format = "png"
# 指定文件生成的文件夹
MyConvNetVis.directory = "data"
# 生成文件
MyConvNetVis.view()
需要注意,输入的格式和网络定义的输入通道格式一样;
依赖graphviz库
网上看到许多需要下载graphviz的zip或mis文件,还配置path;然后用python再进行pip安装后并重启的不知道是什么原理。个人尝试只需要在使用的环境安装graphviz库后就能够使用。
边栏推荐
- 从表中名称映射关系修改视频名称
- MySQL learning record 11jdbcstatement object, SQL injection problem and Preparedstatement object
- C language - bit segment
- Personalized online cloud database hybrid optimization system | SIGMOD 2022 selected papers interpretation
- 按位逻辑运算符
- String to leading 0
- Day29-t77 & t1726-2022-02-13-don't answer by yourself
- VMware 虚拟化集群
- Pyqt5 development tips - obtain Manhattan distance between coordinates
- Hungry for 4 years + Ali for 2 years: some conclusions and Thoughts on the road of research and development
猜你喜欢
![[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]](/img/ae/4e616882f6d68acdf8e885843e68a3.jpg)
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]

Chinese Remainder Theorem (Sun Tzu theorem) principle and template code

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

【ROS】usb_cam相机标定

C language custom type: struct

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
![Verrouillage [MySQL]](/img/ce/9f8089da60d9b3a3f92a5e4eebfc13.png)
Verrouillage [MySQL]

PLT in Matplotlib tight_ layout()

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

Unified ordering background interface product description Chinese garbled
随机推荐
JS inheritance method
VMware virtualization cluster
从 SQL 文件迁移数据到 TiDB
2022.02.13 - NC003. Design LRU cache structure
Use Alibaba icon in uniapp
Hill sort c language
On the inverse order problem of 01 knapsack problem in one-dimensional state
游戏解包的危害及资源加密的重要性
2022.02.13 - NC002. sort
Roguelike游戏成破解重灾区,如何破局?
Research Report on supply and demand and development prospects of China's high purity aluminum market (2022 Edition)
3. File operation 3-with
Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products
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
Upgrade tidb operator
指针进阶---指针数组,数组指针
[research materials] 2021 live broadcast annual data report of e-commerce - Download attached
[MySQL] log
1204 character deletion operation (2)
【MySQL】鎖