Giter Site home page Giter Site logo

dbn's Introduction

MATLAB code for training deep belief networks.

Implementation is based on the following references:

  1. Hinton, G., Osindero, S., & Teh, Y.-W. (2006). A fast learning algorithm for deep belief nets. Neural Computation, 18(7), 1527โ€“1554.
  2. Hinton, G. (2010). A practical guide to training restricted Boltzmann machines. Momentum, 9(1), 926.
  3. Palm, R. B. (2012). Prediction as a candidate for learning deep hierarchical models of data (Master's thesis).
  4. Larochelle, H., & Bengio, Y. (2008). Classification using discriminative restricted Boltzmann machines. In Proceedings of the 25th international conference on Machine learning (pp. 536โ€“543). ACM.

I wrote this code as part of my undergraduate project several years ago. It was an attempt to reproduce results from Hinton's 2006 paper "A fast learning algorithm for deep belief nets". Inspired by Geoffrey Hinton's neural network simulation, a visualization of the generative learning process of a DBM, I also attempted to produce a similar sort of visualization. When it came to implementing the softmax units in the top-most "associative memory" layer of the DBN, I found the descriptions in Larochelle 2008 to be very useful - some of which are reproduced below.

The following samples were generated by randomly initializing the visible units in the associative layer and "clamping" the softmax units to one of the target classes. After each iteration of Gibbs sampling, a downward pass through the network was performed to generate a sample, which was saved to an image file. The animations show how the samples evolve over 200 iterations of Gibbs sampling. It's interesting to see how quickly the Gibbs sampling converges.

Softmax Units

To model the joint the distribution of input data and associated target classes, the visible layer contains an additional group of softmax units, used to represent the alternative target classes in the MNIST training data.

For the "associative memory" layer of the DBN, the energy function includes additional terms for the parameters of the softmax units, which respectively represent the softmax-to-hidden connections and the softmax biases.

Training the the associate memory layer of the DBN is the same as training an RBM with standard binary units, but the conditional probabilities have a slightly different form.

The conditional probability of a particular hidden unit being active includes additional terms for the softmax units.

To choose the most probable class under the model, the conditional distribution can be computed exactly for reasonable numbers of classes. In practice, the unnormalized probabilities can be used to determine the most probable class.

dbn's People

Contributors

aspurdy avatar apurdy avatar

Watchers

James Cloos avatar zhangjiang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.