View on GitHub

Bearded-android-docs

Convolution

Download this project as a .zip file Download this project as a tar.gz file

Created Friday 13 December 2013

Convolution is a term taken from image processing: from a large array of values, take smaller rectangular patches, treat each as inputs to a single neuron, and store the outputs in a smaller array.

A picture says 1,000 words: http://ufldl.stanford.edu/tutorial/index.php/File:Convolution_schematic.gif

To calculate the values of `X_s`:

`\ \ \ \ P_s(i,j)
= [(x_n(i,j),x_n(i,j+1),...,x_n(i,j+s))
,(x_n(i+1,j),x_n(i+1,j+1),...,x_n(i+1,j+s))
,(vdots, vdots, vdots, vdots)
,(x_n(i+s,j),x_n(i+s,j+1),...,x_n(i+s,j+s))]`

Even though `P_s(i,j)` is a matrix, think of it as a "flattened" vector of size `s^2`:

`\ \ bb P_s(i,j) = (x_n(i,j),x_n(i,j+1),...,x_n(i,j+s),...,x_n(i+s,j),x_n(i+s,j+1),...,x_n(i+s,j+s))`

Define `x_s(i,j)` as:

`\ \ x_s(i,j) = sigma(bb P_(ns)(i,j) * bb W + b)`

Construction of feature map `X_s` without applying the activation function `sigma` or the bias is called convolution with kernel `bb W` (i.e., if `X'_s` is defined as `x'_s(i,j) = bb P_(ns)(i,j) * bb W`, then `X'_s` is the convolution of kernel `bb W`).

Resources


No backlinks to this page.
comments powered by Disqus