当前位置:网站首页>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 







边栏推荐
- CTF daily question day45 sensor
- Look at the industrial Internet from a new perspective and seek the correct ways and methods of industrial Internet
- [conference resources] the Third International Conference on Automation Science and Engineering in 2022 (jcase 2022)
- Global and Chinese markets of edge AI software 2022-2028: Research Report on technology, participants, trends, market size and share
- 学习笔记3--高精度地图关键技术(上)
- Learning note 3 -- Key Technologies of high-precision map (Part 1)
- Luogu p1775 stone merger (weakened version)
- Cat Party (Easy Edition)
- Data visualization in medical and healthcare applications
- [dynamic planning] interval dp:p3205 Chorus
猜你喜欢

The concept and application of Cartland number

Hcip day 14 (MPLS protocol)

Since I understand the idea of dynamic planning, I have opened the door to a new world

Entrepreneurship is a little risky. Read the data and do a business analysis

Single chip microcomputer -- hlk-w801 transplant NES simulator (III)
![[Obsidian] wechat is sent to Obsidian using remotely save S3 compatibility](/img/8b/e51867cfe9d200ac385e1d1f01e4b3.jpg)
[Obsidian] wechat is sent to Obsidian using remotely save S3 compatibility

【八大排序①】插入排序(直接插入排序、希尔排序)

969 interlaced string
![[IVX junior engineer training course 10 papers] 02 numerical binding and adaptive website production](/img/b7/aecb815ca9545981563a1e16cfa19e.jpg)
[IVX junior engineer training course 10 papers] 02 numerical binding and adaptive website production

Learning note 24 - multi sensor post fusion technology
随机推荐
About asp Net core uses a small detail of datetime date type parameter
Mitsubishi PLC FX3U pulse axis jog function block (mc_jog)
[IVX junior engineer training course 10 papers] 02 numerical binding and adaptive website production
BiLSTM-CRF代码实现
We should make clear the branch prediction
cookie、session、tooken
关于ASP.NET CORE使用DateTime日期类型参数的一个小细节
The author is more willing to regard industrial Internet as a concept much richer than consumer Internet
Datawhale 社区黑板报(第1期)
Global and Chinese market of ancillary software 2022-2028: Research Report on technology, participants, trends, market size and share
How does schedulerx help users solve the problem of distributed task scheduling?
Global and Chinese markets for maritime services 2022-2028: Research Report on technology, participants, trends, market size and share
游戏思考15:全区全服和分区分服的思考
Global and Chinese markets for freight and logistics 2022-2028: Research Report on technology, participants, trends, market size and share
LeetCode、3无重复最长子序列
Global and Chinese markets for distributed generation and energy storage in telecommunications networks 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of wireless chipsets 2022-2028: Research Report on technology, participants, trends, market size and share
【八大排序②】选择排序(选择排序,堆排序)
【疾病检测】基于BP神经网络实现肺癌检测系统含GUI界面
Since I understand the idea of dynamic planning, I have opened the door to a new world