CNN
Fully connected Layer 1 A finite part of an array (array) format. One color photograph is three-dimensional data. Long pictures available for batch mode are 4D data. Fully Connected (FC) Neural Networks can be trained with photo data, transforming 3D photo data into 1D. Flatten your photo data. Artificial neural networks can be characterized and learned. CNN (Convolutional Neural Network).
![CNN, Convolutional Neural Network 요약](https://taewanmerepo.github.io/2018/01/cnn/head.png)
Convolutional Neural Networks (CNNs) have the following differences compared to traditional Fully Connected Neural Networks:
-Maintain shape of input / output data of each layer
-Effectively recognize features of adjacent images while maintaining spatial information of the images
-Extract and learn features of an image with multiple filters
-Pooling layer to collect and enhance features of extracted images
-Because the filter is used as a shared parameter, there are very few learning parameters compared to general artificial neural networks.
CNN can be divided into the parts that extract the features of the image and the classes that classify as shown in the image above. The feature extraction area consists of several layers of the convolution layer and the pooling layer. 2 The convolution layer is an essential element that reflects the activation function after applying a filter to the input data. The Pooling Layer next to the Convolution Layer is an optional layer. At the end of the CNN, a Fully Connected layer for image classification is added. Between the part that extracts the features of the image and the part that classifies the image, there is a flatten layer that creates an array of image data.
To extract the image features, CNN filters the input data and calculates the composite product as shown in , and creates a feature map using the result of the calculation. Convolution Layer changes the shape of output data according to filter size, Stride, Padding application, Max Pooling size.
Convolution
![합성곱 처리 절치, 출처: http://deeplearning.stanford.edu/wiki/index.php/Feature_extraction_using_convolution](http://deeplearning.stanford.edu/wiki/images/6/6c/Convolution_schematic.gif)
This section introduces the process of performing a composite product on two-dimensional input data (Shape: (5,5)) with one filter. Create a feature map from the result of the convolutional product.
Filter & Stride
Filters are common parameters for finding the characteristics of an image. A filter is sometimes called a kernel. In CNN, Filter and Kernel are synonymous. A filter is usually defined by a square matrix, such as (4, 4) or (3, 3). The subject of learning in CNN is the filter parameter. As shown in , the input data is traversed at a specified interval, and the product is compounded for each channel, and the sum of the product of all channels (3 in color) is made as a feature map. The filter moves to the specified interval and combines the entire input data to create a feature map. Figure illustrates the process of multiplying input data with one channel with a filter of size (3, 3).
![합성곱 계산 절차](https://taewanmerepo.github.io/2018/01/cnn/conv.png)
The filter calculates the composite product by iterating over the input data at specified intervals. The interval at which the filter is traversed at the interval specified here is called Stride. Figure shows an example where a strid of 1 traverses a filter to input data. If strid is set to 2, the filter calculates the composite product by moving it by two spaces.
![Feature Map 과정](https://taewanmerepo.github.io/2018/01/cnn/filter.jpg)
If the input data has multiple channels, the filter traverses each channel, calculates the composite product, and then creates a per-channel feature map. The feature map for each channel is then summed and returned as the final feature map. Input data is generated by one feature map per filter, regardless of the number of channels.
![멀티 채널 입력 데이터에 필터를 적용한 합성곱 계산 절차](https://taewanmerepo.github.io/2018/01/cnn/conv2.jpg)
https://ko.wikipedia.org/wiki/%ED%95%A9%EC%84%B1%EA%B3%B1