Simple MATLAB Demo of Convolutional Network Learning and Inference. Version 0.91, 6/2009. Viren Jain, Massachusetts Institute of Technology . Free for use and modification for any purpose other than a commercial application or product. ------------------------------------------------------------------------ This code provides a simple implementation of the essential computations behind learning and inference in a convolutional network. It assumes a single input image and single output image, but can be easily modified to be more general and powerful. The activation function, loss function, number of hidden layers, number of feature maps, filter size, and minibatch size are all parameters to the algorithm. During learning, the error and current output of the network are periodically displayed. After learning, the weights and biases of the network are returned. The core computations rely on convolution and cross-correlation. Therefore, the speed of the algorithm can be significantly improved by using more efficient implementations of these functions. Sample usage (trains a network with 2 hidden layers, 10 feature maps in each layer, 5x5 filters -- for 10,000 minibatch updates of size 6x6) that learns Gaussian denoising using a single image example: >> boat=imread('boat.png'); >> boat=single(boat)/255; >> [W,B]=train_simplecn(boat+0.1*randn(size(boat)), boat, 2, 10, 5, 10000, [6 6]) Learning is performed using a stochastic online learning procedure that repeatedly selects random localized patches from the input image. For a more detailed description of this procedure or convolutional networks in general, see: Jain, V. & Seung, H.S., "Natural Image Denoising with Convolutional Networks," NIPS 21, 2008. Usage restrictions for the included image boat.png are detailed on http://decsai.ugr.es/~javier/denoise/test_images/index.htm ** Notes: (6/2009) bugfix-multiplying derivative at last layer