Skip to content

Sandy4321/sparse_autoencoder

 
 

Repository files navigation

This is an exercise on implementing a sparse autoencoder. The excerise
comes from Prof. Andrew Ng from the following website:

http://ufldl.stanford.edu/wiki/index.php/Exercise:Sparse_Autoencoder

The description and tutorial of the excerise can be also found in the PDF
files in this folder.

Note that I am implementing it in Python instead of MATLAB.
The basic algorithm is the same.

The code requires numpy and scipy. matplotlib is needed for visualization.

Example:

====Gradient checking====
python gradient_test.py

====Training and visualize hidden units====
python visualize.py

Example output figure are given (gradient_check.png and hidden_units.png).

You may also play with the parameters in the code to see the difference on
the results.

The main codes are in sparse_autoencoder.py. Here the SparseAutoencoder class
is designed to be quite general, so you may use it for other types of data.

About

Neural-network-based sparse autoencoder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%