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







边栏推荐
- cookie、session、tooken
- How does schedulerx help users solve the problem of distributed task scheduling?
- Global and Chinese markets for supply chain strategy and operation consulting 2022-2028: Research Report on technology, participants, trends, market size and share
- Entrepreneurship is a little risky. Read the data and do a business analysis
- A problem about function template specialization
- Global and Chinese market of safety detection systems 2022-2028: Research Report on technology, participants, trends, market size and share
- [IVX junior engineer training course 10 papers to get certificates] 03 events and guessing numbers games
- How to reflect and solve the problem of bird flight? Why are planes afraid of birds?
- [IVX junior engineer training course 10 papers] 06 database and services
- Error creating bean with name ‘stringRedisTemplate‘ defined in class path re
猜你喜欢

SAP ui5 beginner tutorial XXI - trial version of custom formatter of SAP ui5
![[IVX junior engineer training course 10 papers to get certificates] 03 events and guessing numbers games](/img/69/44219af52baef20cedec3870147589.jpg)
[IVX junior engineer training course 10 papers to get certificates] 03 events and guessing numbers games

GL Studio 5 安装与体验

I'll teach you to visit Amazon RDS for a year and build a MySQL cloud database (only 10 minutes, really fragrant)

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

Minimize the error

PLC Analog input analog conversion FB s_ ITR (Mitsubishi FX3U)

浅浅了解Servlet
![[eight sorts ②] select sort (select sort, heap sort)](/img/4b/da0d08230391d6ee48cd8cfd2f7240.png)
[eight sorts ②] select sort (select sort, heap sort)
![[conference resources] the Third International Conference on Automation Science and Engineering in 2022 (jcase 2022)](/img/a6/a2afdf9e18255c9171f61bf074998b.png)
[conference resources] the Third International Conference on Automation Science and Engineering in 2022 (jcase 2022)
随机推荐
游戏思考15:全区全服和分区分服的思考
Global and Chinese markets for context and location-based services 2022-2028: Research Report on technology, participants, trends, market size and share
What are the differences between software testers with a monthly salary of 7K and 25K? Leaders look up to you when they master it
GL Studio 5 installation and experience
Learn C language from scratch day 025 (maze)
Bubble Sort Graph
ACM tutorial - quick sort (regular + tail recursion + random benchmark)
站在新的角度来看待产业互联网,并且去寻求产业互联网的正确方式和方法
[rust web rokcet Series 1] Hello, world and get, post, put, delete
Variables and constants of go language foundation
教你白嫖Amazon rds一年并搭建MySQL云数据库(只需10分钟,真香)
Ubuntu20.04 PostgreSQL 14 installation configuration record
Since I understand the idea of dynamic planning, I have opened the door to a new world
8.8.4-PointersOnC-20220215
A problem about function template specialization
Excel PivotTable
Global and Chinese market of wireless charging magnetic discs 2022-2028: Research Report on technology, participants, trends, market size and share
Leetcode 45 Jumping game II (2022.02.14)
[IVX junior engineer training course 10 papers to get certificates] 01 learn about IVX and complete the New Year greeting card
Deb file installation