当前位置:网站首页>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
边栏推荐
- [IVX junior engineer training course 10 papers to get certificates] 0708 news page production
- 首场“移动云杯”空宣会,期待与开发者一起共创算网新世界!
- CEPH buffer yyds dry inventory
- LeetCode、3无重复最长子序列
- Zak's latest "neural information transmission", with slides and videos
- Bubble Sort Graph
- Review notes of compilation principles
- Recently, three articles in the nature sub Journal of protein and its omics knowledge map have solved the core problems of biology
- 969 interlaced string
- 站在新的角度来看待产业互联网,并且去寻求产业互联网的正确方式和方法
猜你喜欢
Docker安装Oracle_11g
6-3漏洞利用-SSH环境搭建
关于ASP.NET CORE使用DateTime日期类型参数的一个小细节
Learning notes 25 - multi sensor front fusion technology
We should make clear the branch prediction
I'll teach you to visit Amazon RDS for a year and build a MySQL cloud database (only 10 minutes, really fragrant)
Infiltration records of CFS shooting range in the fourth phase of the western regions' Dadu Mansion
[Obsidian] wechat is sent to Obsidian using remotely save S3 compatibility
PLC Analog input analog conversion FB s_ ITR (Mitsubishi FX3U)
Exclusive delivery of secret script move disassembly (the first time)
随机推荐
Keepalived introduction and installation
Global and Chinese markets for food allergens and intolerance tests 2022-2028: Research Report on technology, participants, trends, market size and share
[rust web rokcet Series 2] connect the database and add, delete, modify and check curd
学习笔记3--高精度地图关键技术(上)
关于ASP.NET CORE使用DateTime日期类型参数的一个小细节
【八大排序②】选择排序(选择排序,堆排序)
Just using the way and method of consuming the Internet to land and practice the industrial Internet will not bring long-term development
Iclr2022 | spherenet and g-spherenet: autoregressive flow model for 3D molecular graph representation and molecular geometry generation
GL Studio 5 安装与体验
[eight sorts ②] select sort (select sort, heap sort)
Error creating bean with name ‘stringRedisTemplate‘ defined in class path re
Mitsubishi PLC FX3U pulse axis jog function block (mc_jog)
[IVX junior engineer training course 10 papers to get certificates] 03 events and guessing numbers games
cookie、session、tooken
[eight sorts ④] merge sort, sort not based on comparison (count sort, cardinal sort, bucket sort)
Mathematics - feelings -20220215
学习笔记2--高精度地图定义及价值
Global and Chinese markets for power over Ethernet (POE) solutions 2022-2028: Research Report on technology, participants, trends, market size and share
[IVX junior engineer training course 10 papers] 04 canvas and a group photo of IVX and me
BiLSTM-CRF代码实现