当前位置:网站首页>不同框架的绘制神经网络结构可视化
不同框架的绘制神经网络结构可视化
2022-06-28 20:03:00 【seven_不是赛文】
一、keras
1,在keras中使用keras.summary(),或者plot_model()
eg:plot_model(model,to_file="model.png",show_shapes=True,show_layer_names=True,rankdir='TB')
plt.figure(figsize=(10,10))
img = plt.imread("model.png")
plt.imshow(img)
plt.axis('off')
plt.show()

二、PyTorch
输出网络结构:
MyConvNet = ConvNet()
print(MyConvNet)
# 输出结果:
ConvNet(
(conv1): Sequential(
(0): Conv2d(1, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): ReLU()
(2): AvgPool2d(kernel_size=2, stride=2, padding=0)
)
(conv2): Sequential(
(0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
(1): ReLU()
(2): MaxPool2d(kernel_size=2, stride=2, padding=0, dilation=1, ceil_mode=False)
)
(fc): Sequential(
(0): Linear(in_features=1568, out_features=128, bias=True)
(1): ReLU()
(2): Linear(in_features=128, out_features=64, bias=True)
(3): ReLU()
)
(out): Linear(in_features=64, out_features=10, bias=True)
)
1,通过HiddenLayer可视化网络
2,通过PyTorchViz可视化网络
等等来源
边栏推荐
- Pyinstaller打包pikepdf失败的问题排查
- Markdown mermaid種草(1)_ mermaid簡介
- Configuration du mode tcwind
- 类加载机制与对象的创建
- rsync远程同步
- 怎么理解云原生数据库的快速迭代?
- Ali open source (easyexcel)
- Quaternion quaternion and Euler angle Transformation in Ros
- easypoi
- R language GLM generalized linear model: logistic regression, Poisson regression fitting mouse clinical trial data (dose and response) examples and self-test questions
猜你喜欢

2022焊工(初级)特种作业证考试题库及答案

How strong a mathematical foundation does deep learning need?

2022 t elevator repair test question bank simulation test platform operation

【Go语言刷题篇】Go从0到入门5:Map综合复习、条件语句、循环语句练习

SQL server2019 create a new SQL server authentication user name and log in

电子科大(申恒涛团队)&京东AI(梅涛团队)提出用于视频问答的结构化双流注意网络,性能SOTA!优于基于双视频表示的方法!...

2022 welder (elementary) special operation certificate examination question bank and answers
![return new int[]{i + 1, mid + 1}; return {i + 1, mid + 1};](/img/6a/45a4494276deba72ef9833818229f5.png)
return new int[]{i + 1, mid + 1}; return {i + 1, mid + 1};

Number theory -- detailed proof of Euler function, sieve method for Euler function, Euler theorem and Fermat theorem
![return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};](/img/6a/45a4494276deba72ef9833818229f5.png)
return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};
随机推荐
【学习笔记】主成分分析法介绍
Server configuration estimation of core IOT Bluetooth AOA positioning system
UESTC (shenhengtao team) & JD AI (Mei Tao team) proposed a structured dual stream attention network for video Q & A, with performance SOTA! Better than the method based on dual video representation
Rsync remote synchronization
Employee salary management system
Echart: category text position adjustment of horizontal histogram
How to analyze the relationship between enterprise digital transformation and data asset management?
输入和输出字符型数据
3. 整合 Listener
2342
C#应用程序界面开发基础——窗体控制
Racher add / delete node
The severity code indicates that the project file line prohibits the display of status errors. C1047 object or library file ".Lib" is different from other objects (such as "x64\release\main.obj")
方 差 分 析
类加载机制与对象的创建
[algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“
关键字long
Class loading mechanism and object creation
Head, tail view file
SQL server2019 create a new SQL server authentication user name and log in