Skip to content

Commit

Permalink
Scaling re-done images tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
MelJan committed Oct 14, 2018
1 parent 3668b82 commit e4fa58f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/tutorials/AE_MNIST.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,35 @@ The code_ given below produces the following output that is quite similar to the
Visualization of 100 test samples.

.. figure:: images/AE_MNIST_DATA.png
:scale: 75 %
:align: center
:alt: 100 MNIST digits (test data)

The learned filters without regularization.

.. figure:: images/AE_MNIST_FILTER.png
:scale: 75 %
:align: center
:alt: AE filter on MNIST

The corresponding reconstruction of the model, that is the encoding followed by the decoding.

.. figure:: images/AE_MNIST_REC.png
:scale: 75 %
:align: center
:alt: AE filter on MNIST

The learned filters when a contractive penalty is used, leading to much more localized and less noisy filters.

.. figure:: images/AE_MNIST_FILTER_CON.png
:scale: 75 %
:align: center
:alt: AE filter on MNIST with contrastive penalty

And the corresponding reconstruction of the model.

.. figure:: images/AE_MNIST_REC_CON.png
:scale: 75 %
:align: center
:alt: AE filter on MNIST with contrastive penalty

Expand Down
8 changes: 8 additions & 0 deletions docs/tutorials/AE_natural_images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,49 +24,57 @@ The code_ given below produces the following output that is impressively similar
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
:scale: 75 %
: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 that cover also lower frequencies.

.. figure:: images/SAE_natural_images_filter_unwhitened.png
:scale: 75 %
:alt: ICA histogram of frequency and angle
:align: center

Expand Down
6 changes: 6 additions & 0 deletions docs/tutorials/GRBM_natural_images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@ The code_ given below produces the following output.
Visualization of the learned filters, which are very similar to those of ICA.

.. figure:: images/GRBM_weights_unnormalized.png
:scale: 50 %
:align: center
:alt: GRBM weights unnormalized

For a better visualization of the structure, here are the same filters normalized independently.

.. figure:: images/GRBM_weights_normalized.png
:scale: 50 %
:align: center
:alt: GRBM weights normalized

Sampling results for some examples. The first row shows some training data and the following rows are the results after one step of Gibbs-sampling starting from the previous row.

.. figure:: images/GRBM_samples.png
:scale: 35 %
:alt: GRBM samples
:align: center

Expand All @@ -48,18 +51,21 @@ To analyze the optimal response of the learn filters we can fit a Gabor-wavelet
the optimal grating, here for 20 filters

.. figure:: images/GRBM_grating.png
:scale: 75 %
:align: center
:alt: GRBM 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/GRBM_tuning.png
:scale: 75 %
:alt: GRBM 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/GRBM_histogram.png
:scale: 75 %
:align: center
:alt: GRBM histogram of frequency and angle

Expand Down
6 changes: 6 additions & 0 deletions docs/tutorials/ICA_natural_images.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@ The code_ given below produces the following output.
Visualization of 100 examples of the gray scale natural image dataset.

.. figure:: images/ICA_natural_images_data.png
:scale: 35 %
:align: center
:alt: 100 gray scale natural image patch examples

The corresponding whitened image patches.

.. figure:: images/ICA_natural_images_data_whitened.png
:scale: 35 %
:align: center
:alt: 100 gray scale natural image patch examples whitened

The learned filters/independent components learned from the whitened natural image patches.

.. figure:: images/ICA_natural_images_filter.png
:scale: 35 %
:align: center
:alt: ICA filter on natural images

Expand All @@ -46,18 +49,21 @@ To analyze the optimal response of the learn filters we can fit a Gabor-wavelet
the optimal grating, here for 20 filters

.. figure:: images/ICA_grating.png
:scale: 35 %
: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/ICA_tuning.png
:scale: 35 %
: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/ICA_histogram.png
:scale: 35 %
:alt: ICA histogram of frequency and angle
:align: center

Expand Down
4 changes: 4 additions & 0 deletions docs/tutorials/PCA_eigenfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ The code_ given below produces the following output.
Some examples of the face images of the olivetti face dataset.

.. figure:: images/example_faces.png
:scale: 75 %
:align: center
:alt: Examples of the face datset

The first 100 principal components extracted from the dataset. The components focus on characteristics like glasses, lighting direction, nose shape, ...

.. image:: images/components_faces.png
:scale: 75 %
:align: center
:alt: Principal components of teh face dataset

Expand All @@ -37,12 +39,14 @@ The cumulative sum of the Eigenvalues show how 'compressable' the dataset is.
For example using only the first 50 eigenvectors retains 87,5 % of the variance of data and the reconstructed images look as follows.

.. image:: images/reconstruction50.png
:scale: 75 %
:align: center
:alt: Reconstruction using 50 PCs

For 200 eigenvectors we retain 98,0 % of the variance of the data and the reconstructed images look as follows.

.. image:: images/reconstruction50.png
:scale: 75 %
:align: center
:alt: Reconstruction using 200 PCs

Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/RBM_MNIST_big.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ Learned filters of a centered binary RBM with 500 hidden units on the MNIST data
The filters have been normalized such that the structure is more prominent.

.. figure:: images/BRBM_big_centered_weights.png
:scale: 30 %
:scale: 35 %
:alt: weights centered
:align: center

Sampling results for some examples. The first row shows some training data and the following rows are the results after one Gibbs-sampling step starting from the previous row.

.. figure:: images/BRBM_big_centered_samples.png
:scale: 30 %
:scale: 35 %
:alt: samples centered
:align: center

Expand All @@ -46,14 +46,14 @@ Now we have a look at the filters learned for a normal binary RBM with 500 hidde
The filters have also been normalized such that the structure is more prominent.

.. figure:: images/BRBM_big_normal_weights.png
:scale: 30 %
:scale: 35 %
:alt: weights centered
:align: center

Sampling results for some examples. The first row shows the training data and the following rows are the results after one Gibbs-sampling step starting from the previous row.

.. figure:: images/BRBM_big_normal_samples.png
:scale: 30 %
:scale: 35%
:alt: samples centered
:align: center

Expand Down
4 changes: 4 additions & 0 deletions docs/tutorials/RBM_MNIST_small.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ The filters have been normalized such that the structure is more prominent.
Sampling results for some examples. The first row shows the training data and the following rows are the results after one Gibbs-sampling step starting from the previous row.

.. figure:: images/BRBM_small_centered_samples.png
:scale: 35 %
:alt: samples centered
:align: center

Expand All @@ -70,6 +71,7 @@ Resulting in the following weights and sampling steps.
:align: center

.. figure:: images/BRBM_small_normal_samples.png
:scale: 35 %
:alt: samples normal
:align: center

Expand Down Expand Up @@ -101,6 +103,7 @@ While the centered model has a similar performance on the flipped version,
:align: center

.. figure:: images/BRBM_small_centered_samples_flipped.png
:scale: 35 %
:alt: flipped samples centered
:align: center

Expand All @@ -118,6 +121,7 @@ The normal RBM has not.
:align: center

.. figure:: images/BRBM_small_normal_samples_flipped.png
:scale: 35 %
:alt: flipped samples normal
:align: center

Expand Down

0 comments on commit e4fa58f

Please sign in to comment.