-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan
authored and
Jan
committed
Jan 28, 2018
1 parent
2d1689c
commit aa24823
Showing
4 changed files
with
86 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
.. _AE_Natural_Images: | ||
|
||
Autoencoder on a natural image patches | ||
========================================================== | ||
|
||
Example for Autoencoders (`Autoencoder <https://en.wikipedia.org/wiki/Autoencoder>`_) | ||
on natural image patches. | ||
|
||
Theory | ||
*********** | ||
|
||
If you are new on Neural networks and Autoencoders , visit `Autoencoder tutorial <http://ufldl.stanford.edu/wiki/index.php/Autoencoders_and_Sparsity>`_. | ||
|
||
Results | ||
*********** | ||
|
||
The code_ given below produces the following output. | ||
|
||
Visualization of 100 examples of the gray scale natural image dataset. | ||
|
||
.. figure:: images/SAE_natural_images_data_raw.png | ||
:scale: 75 % | ||
:align: center | ||
:alt: 100 gray scale natural image patch examples | ||
|
||
The corresponding whitened image patches. | ||
|
||
.. figure:: images/SAE_natural_images_data.png | ||
:scale: 75 % | ||
:align: center | ||
:alt: 100 gray scale natural image patch examples whitened | ||
|
||
The learned filters from the whitened natural image patches. | ||
|
||
.. figure:: images/SAE_natural_images_filter.png | ||
:scale: 75 % | ||
:align: center | ||
:alt: ICA filter on natural images | ||
|
||
The corresponding reconstruction of the model, that is the encoding followed by the decoding. | ||
|
||
.. figure:: images/SAE_natural_images_reconstruction.png | ||
:scale: 75 % | ||
:align: center | ||
:alt: ICA filter on natural images | ||
|
||
To analyze the optimal response of the learn filters we can fit a Gabor-wavelet parametrized in angle and frequency, and plot | ||
the optimal grating, here for 20 filters | ||
|
||
.. figure:: images/SAE_natural_images_grating.png | ||
:scale: 75 % | ||
:align: center | ||
:alt: ICA filters with fitted Gabor-wavelets. | ||
|
||
as well as the corresponding tuning curves, which show the responds/activities as a function frequency in pixels/cycle (left) and angle in rad (right). | ||
|
||
.. figure:: images/SAE_natural_images_tuning_curves.png | ||
:alt: ICA fiter's tuning curves | ||
:align: center | ||
|
||
Furthermore, we can plot the histogram of all filters over the frequencies in pixels/cycle (left) and angles in rad (right). | ||
|
||
.. figure:: images/SAE_natural_images_histogram.png | ||
:scale: 75 % | ||
:alt: ICA histogram of frequency and angle | ||
:align: center | ||
|
||
We can also train the model on the unwhitened data leading to the following filters. | ||
|
||
.. figure:: images/SAE_natural_images_filter_unwhitened.png | ||
:scale: 75 % | ||
:alt: ICA histogram of frequency and angle | ||
:align: center | ||
|
||
.. _code: | ||
|
||
Source code | ||
*********** | ||
|
||
.. figure:: images/download_icon.png | ||
:scale: 20 % | ||
:target: https://github.com/MelJan/PyDeep/blob/master/examples/AE_natural_images.py | ||
|
||
.. literalinclude:: ../../examples/AE_natural_images.py |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.