当前位置:网站首页>[deep learning] fully connected network
[deep learning] fully connected network
2022-07-26 14:06:00 【clusters of stars ¹ ⁸⁹⁵】
1. Fully connected network
All connected neural networks (Fully Connected Netural Network,FCN) Or multi-layer perceptron (Multi-Layer Perception, MLP), It is an artificial neural network structure with relatively simple connection mode , It belongs to a kind of feedforward neural network , As long as there is an input layer 、 Hidden layer and output layer , And there can be multiple neurons in each hidden layer .MLP Network is a multifunctional learning method that can be applied to almost all tasks , Including classification 、 Return to , Even unsupervised learning .
2. How to realize full connection
As we all know, full connection is that each parameter of the input layer participates in the calculation of each parameter of the output layer . But how exactly is it achieved ?
In conclusion : It is realized by convolution with the same size and the same number of channels as the input layer .
for instance :

- Two dimensional characteristic graph of convolution output of full connection (feature map) Into a one-dimensional vector , in other words : The last two rows of small balls are two fully connected layers , At the end of the last layer of convolution , Another pooling operation is performed , Output 20 individual 12x12 Image (20 Refers to the thickness of the last layer ), Then it passes through a full connection layer and becomes 1x100 Vector ( The number of neurons in the first full connective layer is 100)
How to do it ?
- This operation is actually done with 100 individual 20x12x12 The convolution kernel of , For each input feature map , All use a kernel convolution with the same size as the image for convolution , In this way, the whole picture becomes a number , If the thickness is 20 That's it 20 After the convolution of the two kernels, add and sum . In this way, the height of a picture can be condensed into a number .
- But there are too many parameters for full connection , You think this picture has 20 individual 12x12x100 Parameters , Any layer in front , Suppose the convolution kernel is 7*7 Of , The thickness is 64, That's just 7x7x64, So now the trend is to try to avoid full connection , At present, one of the mainstream methods is global average pooling (GlobalAveragePooling). That's the last floor feature map( The output of the last layer of convolution ), Directly find the average . You can train as many layers as there are categories , These ten numbers are the corresponding probability .
3. Full connection code implementation
import torch.nn as nn
fc1 = nn.Linear(320, 50) # Input 320 dimension , Output 50 Dimension's fully connected network
Reference material :
- https://blog.csdn.net/gongliming_/article/details/89634243
边栏推荐
- Solve the problem that JUnit of idea console cannot be input with scanner
- Research on technology subject division method based on patent multi-attribute fusion
- Pytoch learning notes (II) the use of neural networks
- UE4 智能指针和弱指针
- See you tomorrow at the industrial session of cloud intelligence technology forum!
- 基于多特征的技术融合关系预测及其价值评估
- 敏捷开发与DevOps的对比
- 基于多任务深度学习的实体和事件联合抽取模型
- Comparison between agile development and Devops
- Research on Chinese medicine assisted diagnosis and treatment scheme integrating multiple natural language processing tasks -- taking diabetes as an example
猜你喜欢
![[shaders realize overlay to re cover cross dressing effect _shader effect Chapter 9]](/img/f3/48ca9e1e8889afc0993084d6416575.png)
[shaders realize overlay to re cover cross dressing effect _shader effect Chapter 9]

DP sword finger offer II 100. sum of minimum paths in triangle
![[dark horse morning post] many apps under bytek have been taken off the shelves; The leakage of deoxidizer in three squirrels caused pregnant women to eat by mistake; CBA claimed 406million yuan from](/img/f6/03e39799db36c33a58127359aa2794.png)
[dark horse morning post] many apps under bytek have been taken off the shelves; The leakage of deoxidizer in three squirrels caused pregnant women to eat by mistake; CBA claimed 406million yuan from

Pytorch学习笔记(一)安装与常用函数的使用

大脑带来的启发:深度神经网络优化中突触整合原理介绍

Jzoffer51- reverse pairs in the array (merge sort solution)

Disease knowledge discovery based on spo semantic triples

Polymorphic case - making drinks

In 2022, we "sent away" so many Internet products in only one month

C language_ Structure pointer variable introduction
随机推荐
DP sword finger offer II 100. sum of minimum paths in triangle
Intercept the coordinate points (four point coordinates of the face frame) face image from the marked XML file and save it in the specified folder
Cavans realizes Static Rolling barrage
Leetcode148 sort linked list (merge method applied to merge)
Inspiration from brain: introduction to synaptic integration principle in deep neural network optimization
~6. ccf 2021-09-1 数组推导
大脑带来的启发:深度神经网络优化中突触整合原理介绍
404 pages and routing hooks
搞懂MySQL的数据类型中长度含义
基于SPO语义三元组的疾病知识发现
基于多任务深度学习的实体和事件联合抽取模型
消息的订阅和发布
.net6与英雄联盟邂逅之——根据官方LCU API制作游戏助手
C语言_结构体指针变量引入
gdb常用命令
GDB common commands
Digital collections accelerate the breaking of the circle and help the industry find new opportunities
Leetcode question type priority queue (TOPK question)
Integer internal cache
Subscription and publication of messages