Skip to content

Commit

Permalink
Docs/notebooks (#557)
Browse files Browse the repository at this point in the history
* Add notebooks for all examples

* Update notebooks.rst

* Test colab links

* Remove old examples

* Fix preview link and clear notebook outputs

* Update notebooks
  • Loading branch information
MattPainter01 committed May 30, 2019
1 parent 86d8b7d commit 2c065d8
Show file tree
Hide file tree
Showing 8 changed files with 3,303 additions and 2,796 deletions.
830 changes: 392 additions & 438 deletions docs/_static/notebooks/amsgrad.ipynb

Large diffs are not rendered by default.

507 changes: 259 additions & 248 deletions docs/_static/notebooks/basic_opt.ipynb

Large diffs are not rendered by default.

325 changes: 324 additions & 1 deletion docs/_static/notebooks/cam.ipynb

Large diffs are not rendered by default.

1,035 changes: 505 additions & 530 deletions docs/_static/notebooks/gan.ipynb

Large diffs are not rendered by default.

589 changes: 262 additions & 327 deletions docs/_static/notebooks/quickstart.ipynb

Large diffs are not rendered by default.

1,453 changes: 1,125 additions & 328 deletions docs/_static/notebooks/svm_linear.ipynb

Large diffs are not rendered by default.

1,340 changes: 422 additions & 918 deletions docs/_static/notebooks/vae.ipynb

Large diffs are not rendered by default.

20 changes: 14 additions & 6 deletions docs/examples/notebooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,27 @@ Deep Learning

This guide will give a quick intro to training PyTorch models with Torchbearer.

|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/tree/master/docs/_static/notebooks/quickstart.ipynb>`__   :download:`Download Notebook </_static/notebooks/quickstart.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/quickstart.ipynb>`__
|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/quickstart.ipynb>`__   :download:`Download Notebook </_static/notebooks/quickstart.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/quickstart.ipynb>`__

- **Training a VAE**:

This guide covers training a variational auto-encoder (VAE) in Torchbearer, taking advantage of the persistent state.

|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/tree/master/docs/_static/notebooks/vae.ipynb>`__   :download:`Download Notebook </_static/notebooks/vae.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/vae.ipynb>`__
|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/vae.ipynb>`__   :download:`Download Notebook </_static/notebooks/vae.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/vae.ipynb>`__

- **Training a GAN**:

This guide will cover how to train a Generative Adversarial Network (GAN) in Torchbearer using custom closures to allow for the more complicated training loop.

|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/tree/master/docs/_static/notebooks/gan.ipynb>`__   :download:`Download Notebook </_static/notebooks/gan.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/gan.ipynb>`__
|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/gan.ipynb>`__   :download:`Download Notebook </_static/notebooks/gan.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/gan.ipynb>`__

- **Class Appearance Model**:

In this example we will demonstrate the `ClassAppearanceModel <https://torchbearer.readthedocs.io/en/latest/code/callbacks.html#torchbearer.callbacks.imaging.inside_cnns.ClassAppearanceModel>`__ callback included in torchbearer. This implements
one of the most simple (and therefore not always the most successful) deep visualisation techniques, discussed in the
paper `Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps <https://arxiv.org/abs/1312.6034>`__

|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/cam.ipynb>`__   :download:`Download Notebook </_static/notebooks/cam.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/cam.ipynb>`__


Differentiable Programming
Expand All @@ -35,16 +43,16 @@ Differentiable Programming

This guide will briefly show how we can do function optimisation using Torchbearer.

|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/tree/master/docs/_static/notebooks/basic_opt.ipynb>`__   :download:`Download Notebook </_static/notebooks/basic_opt.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/basic_opt.ipynb>`__
|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/basic_opt.ipynb>`__   :download:`Download Notebook </_static/notebooks/basic_opt.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/basic_opt.ipynb>`__

- **Linear SVM**:

This guide will train a linear support vector machine (SVM) using Torchbearer.

|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/tree/master/docs/_static/notebooks/svm_linear.ipynb>`__   :download:`Download Notebook </_static/notebooks/svm_linear.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/svm_linear.ipynb>`__
|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/svm_linear.ipynb>`__   :download:`Download Notebook </_static/notebooks/svm_linear.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/svm_linear.ipynb>`__

- **Breaking ADAM**:

This guide uses Torchbearer to implement `On the Convergence of Adam and Beyond <https://openreview.net/forum?id=ryQu7f-RZ>`__, one of the top papers at ICLR 2018, which demonstrated a case where ADAM does not converge.

|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/tree/master/docs/_static/notebooks/amsgrad.ipynb>`__   :download:`Download Notebook </_static/notebooks/amsgrad.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/amsgrad.ipynb>`__
|nbviewer| `Preview <https://nbviewer.jupyter.org/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/amsgrad.ipynb>`__   :download:`Download Notebook </_static/notebooks/amsgrad.ipynb>`   |colab| `Run on Colab <https://colab.research.google.com/github/ecs-vlc/torchbearer/blob/master/docs/_static/notebooks/amsgrad.ipynb>`__

0 comments on commit 2c065d8

Please sign in to comment.