当前位置:网站首页>Convolutional neural network (including code and corresponding diagram)
Convolutional neural network (including code and corresponding diagram)
2022-07-02 01:20:00 【Xiaoshuai acridine】
List of articles
1. Related calculation problems in Convolutional Neural Networks
(1) Simple two-dimensional convolution

(2) Add fill (padding)
notes : Image below ph Is set in the code padding Twice the value 
(3) Add fill (padding) And stride (stride)

Convolution kernel and filter (fliter) There is a difference , Convolution kernel is a two-dimensional concept , The filter is composed of one or more convolution kernels .
2. Learn the construction of convolutional neural network through an example

Build the neural network in the figure above through the following code
class ConvNet(nn.Module):
def __init__(self):
super(ConvNet, self).__init__()
self.layer1 = nn.Sequential(
nn.Conv2d(1, 32, kernel_size=5, stride=1, padding=2),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.layer2 = nn.Sequential(
nn.Conv2d(32, 64, kernel_size=5, stride=1, padding=2),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2, stride=2))
self.drop_out = nn.Dropout()
self.fc1 = nn.Linear(7 * 7 * 64, 1000)
self.fc2 = nn.Linear(1000, 10)
def forward(self, x):
out = self.layer1(x)
out = self.layer2(out)
out = out.reshape(out.size(0), -1)
out = self.drop_out(out)
out = self.fc1(out)
out = self.fc2(out)
return out
3. Convolution neural network related content








Filling and stride in convolution layer
When the convolution kernel is relatively large or the image is too small after multiple convolutions, consider filling operation to alleviate 


When the input picture size is relatively large , Under the small convolution kernel, it needs many layers of calculation to realize 





8-5+1+4=8
8-3+1+2=8
8 / 2 = 4
(8-3+0+3)/3=2
(8-5+2+4)/4=2
Multiple input multiple output channels in convolution layer 







边栏推荐
- 学习笔记25--多传感器前融合技术
- The concept and application of Cartland number
- 关于ASP.NET CORE使用DateTime日期类型参数的一个小细节
- [IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production
- Altium designer measure distance (ctrl+m)
- 【八大排序②】选择排序(选择排序,堆排序)
- 6-2漏洞利用-ftp不可避免的问题
- Mitsubishi PLC FX3U pulse axis jog function block (mc_jog)
- I'll teach you to visit Amazon RDS for a year and build a MySQL cloud database (only 10 minutes, really fragrant)
- Look at the industrial Internet from a new perspective and seek the correct ways and methods of industrial Internet
猜你喜欢

Exclusive delivery of secret script move disassembly (the first time)
![[IVX junior engineer training course 10 papers] 06 database and services](/img/68/967566fc2f1d0b93ecd78bdb208b64.jpg)
[IVX junior engineer training course 10 papers] 06 database and services
![[eight sorts ②] select sort (select sort, heap sort)](/img/4b/da0d08230391d6ee48cd8cfd2f7240.png)
[eight sorts ②] select sort (select sort, heap sort)

Learning note 24 - multi sensor post fusion technology

SQL injection for Web Security (2)

Edge extraction edges based on Halcon learning_ image. Hdev routine

Hcip day 14 (MPLS protocol)

How to compress video size while adding watermark with one click?

【疾病检测】基于BP神经网络实现肺癌检测系统含GUI界面

Study note 2 -- definition and value of high-precision map
随机推荐
[JS download files through url]
[Obsidian] wechat is sent to Obsidian using remotely save S3 compatibility
笔者更加愿意将产业互联网看成是一个比消费互联网要丰富得多的概念
cookie、session、tooken
UDS bootloader of s32kxxx bootloader
学习笔记3--高精度地图关键技术(上)
6-3 vulnerability exploitation SSH environment construction
LeetCode、3无重复最长子序列
Keepalived introduction and installation
The first "mobile cloud Cup" empty publicity meeting, looking forward to working with developers to create a new world of computing!
什么是商业养老保险?商业养老保险安全靠谱吗?
[conference resources] the Third International Conference on Automation Science and Engineering in 2022 (jcase 2022)
How to reflect and solve the problem of bird flight? Why are planes afraid of birds?
Basic usage of three JS high-order functions --filter---map---reduce
Day 13 of hcip (relevant contents of BGP agreement)
Global and Chinese markets for maritime services 2022-2028: Research Report on technology, participants, trends, market size and share
站在新的角度来看待产业互联网,并且去寻求产业互联网的正确方式和方法
Two TVs
Leetcode 45 Jumping game II (2022.02.14)
Study note 2 -- definition and value of high-precision map