Professional Documents
Culture Documents
Difference Between Conv and FC Layers
Difference Between Conv and FC Layers
1. Overview
In this tutorial, we’ll talk about the two most popular types of layers in neural networks (/cs/hidden-layers-neural-network), the Convolutional
(Conv) and the Fully-Connected (FC) layer. Both of them constitute the basis of almost every neural network for many tasks, from action recognition and
language translation to speech recognition and cancer detection.
First, we’ll introduce the topic, and then we’ll define each type of layer separately. Finally, we’ll compare the two types of layers, illustrating their
differences.
67
One wayfrom
UnbeatablefarestoSingapore
RM
*
atourbiggestsaleyet?
GottaScoot! Booknow
&
In the figure below, we can see what the neurons in the example FC layer look like: (https://ads.freestar.com/?
utm_campaign=branding&utm_medium=banner&utm_source=baeldung.com&utm_content=baeldung_leaderboard_
mid_1)
In an FC layer with input and outputs, we have weights since each pair of input and output neurons correspond to a weight .
259
RM * Booknow
atourbiggestsaleyet? *Taxesincluded.Terms&travelperiodsapply.
GottaScoot!
(https://ads.freestar.com/?
utm_campaign=branding&utm_medium=banner&utm_source=baeldung.com&utm_content=baeldung_leaderboard_
mid_2)
4. Differences
The basic difference between the two types of layers is the density of the connections. The FC layers are densely connected, meaning that every
neuron in the output is connected to every input neuron. On the other hand, in a Conv layer, the neurons are not densely connected but are connected
only to neighboring neurons within the width of the convolutional kernel. So, if the input is an image and the number of neurons is large, a Conv layer is
more suitable.
A second main difference between them is weight sharing. In an FC layer, every output neuron is connected to every input neuron through a different
weight . However, in a Conv layer, the weights are shared among different neurons. This is another characteristic that enables Conv layers to be used in
the case of a large number of neurons.
5. Conclusion
In this tutorial, we presented the Conv and the FC layer of a neural network. First, we introduced the terms, and then we discussed each layer separately,
illustrating their differences.
259
RM * Booknow
atourbiggestsaleyet? *Taxesincluded.Terms&travelperiodsapply.
GottaScoot!
(https://ads.freestar.com/?
utm_campaign=branding&utm_medium=lazyLoad&utm_source=baeldung.com&utm_content=baeldung_leaderboard
_btf_2)
CATEGORIES
ALGORITHMS (/CS/CATEGORY/ALGORITHMS)
ARTIFICIAL INTELLIGENCE (/CS/CATEGORY/AI)
CORE CONCEPTS (/CS/CATEGORY/CORE-CONCEPTS)
DATA STRUCTURES (/CS/CATEGORY/DATA-STRUCTURES)
GRAPH THEORY (/CS/CATEGORY/GRAPH-THEORY)
LATEX (/CS/CATEGORY/LATEX)
NETWORKING (/CS/CATEGORY/NETWORKING)
SECURITY (/CS/CATEGORY/SECURITY)
SERIES
ABOUT
ABOUT BAELDUNG (HTTPS://WWW.BAELDUNG.COM/ABOUT)
THE FULL ARCHIVE (/CS/FULL_ARCHIVE)
EDITORS (HTTPS://WWW.BAELDUNG.COM/EDITORS)