Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do we get/define filters in convolutional neural networks?

How to implement a deep autoencoder (eHow do i obtain filters from convulutional neural network(CNN)? My idea is something like this: Do random images of the input images (28x28) and get random patches (8x8). Then use autoencoders to learn the common features of the patches (features = hidden units; approximately 100, for example). Then apply features filters to the input images and do convolution. Am I correct?

I am confused because sometime the literature state only using like, e.g. 8, filters, but in my case I have 100..g. 2 or 3 layers)? Any ideas or resources?

like image 467
RockTheStar Avatar asked Oct 22 '14 17:10

RockTheStar


People also ask

How are filters defined in CNN?

A filter acts as a single template or pattern, which, when convolved across the input, finds similarities between the stored template & different locations/regions in the input image. Let us consider an example of detecting a vertical edge in the input image.

How do we get values for the filters in CNN?

In a CNN, the values for the various filters in each convolutional layer is obtained by training on a particular training set. At the end of the training, you would have a unique set of filter values that are used for detecting specific features in the dataset.

How do you calculate the number of filters in convolutional layer?

Number of parameters in a CONV layer would be : ((m * n * d)+1)* k), added 1 because of the bias term for each filter. The same expression can be written as follows: ((shape of width of the filter * shape of height of the filter * number of filters in the previous layer+1)*number of filters).

How a filter works on a convolutional network?

In convolutional networks, multiple filters are taken to slice through the image and map them one by one and learn different portions of an input image. Imagine a small filter sliding left to right across the image from top to bottom and that moving filter is looking for, say, a dark edge.


1 Answers

You can follow the tutorial : http://ufldl.stanford.edu/wiki/index.php/UFLDL_Tutorial

This is like a lecture on both auto-encoders and some simple stuff about CNN (convolution and pooling). When you complete this tutorial you will have both auto-encoder implementation and stacked-auto-encoder in your words deep auto-encoder implementation ready.

This tutorial will have exactly what you ask for:

  • 28x28 MNIST images

  • getting 8x8 patches and learning filters using auto-encoders

  • convolving these images by these 8x8 filters

  • pooling them

  • using the pooled vectors/images and putting them in a soft-max classifier to learn 10 different classes of MNIST database.

like image 148
Doga Siyli Avatar answered Nov 14 '22 22:11

Doga Siyli