当前位置:网站首页>不同框架的绘制神经网络结构可视化
不同框架的绘制神经网络结构可视化
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可视化网络
等等来源
边栏推荐
- 2280.Cupboards
- 如何做好客户成功的底层设计|ToB大师课
- 市值1200亿美金,老牌财税巨头Intuit是如何做到的?
- 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")
- Markdown Mermaid Grass (1) Introduction à Mermaid
- 2280.Cupboards
- csdn涨薪技术-Selenium自动化测试全栈总结
- 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
- Day88.七牛云: 房源图片、用户头像上传
- 1. 整合 Servlet
猜你喜欢

数据标准化处理

Rsync remote synchronization

2022 P cylinder filling test exercises and online simulation test

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

R语言GLM广义线性模型:逻辑回归、泊松回归拟合小鼠临床试验数据(剂量和反应)示例和自测题

How to obtain the coordinates of the aircraft passing through both ends of the radar

How does redis implement inventory deduction? How to prevent oversold?

Markdown Mermaid Grass (1) Introduction à Mermaid

Number theory -- detailed proof of Euler function, sieve method for Euler function, Euler theorem and Fermat theorem

easypoi
随机推荐
Class loading mechanism and object creation
2022年T电梯修理考试题库模拟考试平台操作
April 10, 2022 -- take the first step with C -- use C from Net class library call method (not understood)
2788.Cifera
2342
Is it safe for CICC fortune to open an account? Let's talk about CICC fortune
5g NR MBS architecture introduction
return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};
修复一次flutter 无法选中模拟器
redisTemplate
2837. The total number of teams
Why does next() in iterator need to be forcibly converted?
3. 整合 Listener
TcWind 模式設定
如何做好客户成功的底层设计|ToB大师课
03.hello_ rust
Pyinstaller打包pikepdf失败的问题排查
JSP to get the value in the session
蓝桥杯 历届试题 蚂蚁感冒
Day88.七牛云: 房源图片、用户头像上传