Deep Learning Resources and Tutorials using Keras and Lasagne
I'm moving the tutorial to vict0rsch.github.io to make it nicer for you guys. This is an ongoing process and your feedbacks are welcome! Basically it will be betetr organized and there will be comments possible. This repo will stay active for the code, issues, pull requests and collaborations.
How to Learn from this Tutorial
This repository contains Deep Learning implementations tutorials. For more general knowledge regarding Machine/Deep Learning, have a look at useful_resources.md.
Lasagne and Keras are Theano-based so I recommend you get familiar with Theano before starting these ones.
However Keras is way closer to usual Python than Lasagne so it requires a weaker understanding of Theano. The main thing to understand to get started with Keras is Theano's graph structure.
We concentrate, in theano.md, on a few features of Theano that will be needed in Lasagne mostly and just a little in Keras. You will not learn Theano there but get a glimpse at how it works and how it can be used in a Deep Learning context. Theano is about much more than this, especially regarding GPU calculation and Automatic Differentiation. If you use TensorFlow (as a backend for Keras for instance) you can still go through the Theano introduction as Tensorflow's phylosophy on using graphs is very similar : you declare "sessions" instead of "compiling" the graph but the underlying process is conceptually the same.
See the official Theano tutorial here.
I have not worked a lot with Convolutional Networks so I won't mention them here, for now.
| Set up | Theano | Keras | Lasagne |Recurrent| Resources | AWS + GPU | Lose Time |
|:---------:|:----------:|:-------:|:---------:|:-----------:|:-----------:|:--------:|:--------:|
||
|
|
|
|
|
|
|
You will find that Neural Network computations are very expensive and slow on CPUs. This is why all(?) such frameworks are GPU-accelerated. What if you don't have access to a GPU? You can still use Amazon's computers for ~1€/hour. See my attempt to a tutorial here.
Machine learning is a vast area. Time and concentration are the two things you need the most to get into it. Don't jump to the next step if you're not sure you're clear with the present one's outcomes.
Learn about Machine Learning -> Resources -> Starting with Machine Learning
Learn about Deep Learning Theory and feedforward networks (your best bet may very well be M. Nielsen's blog) -> Starting with Deep Learning
Get familiar with Theano -> Theano
Get into some code
a - Start easy with Keras and feedforward networks -> Keras
* **Requirements**: Python + outcomes (1) and (2) * **Outcomes**: Understand how the Keras framework can be used and therefore implement any dense feedforward network you like.b - Go into the details with Lasagne (still with feedforward networks) -> Lasagne
Dig into Recurrent Networks -> Resources
Spend some time understanding the handling of dimensions in recurrent nets -> Recurrent
Get back to code
The Toothbrush technique is used to debug code. The concept is easy: pick up your toothbrush, a pen or a spoon and walk it through your code as if they understood it. Better yet use a friend or coworker: you won't need their brain, rather their ears.
The thing is that debugging can be hard and the error might very well be silly. However looking as someone else's code is often hard and/or laborious, so asking a friend/coworker to debug it is hardly possible.
On the other hand, explaining it to your toothbrush makes you rethink the whole coding process you went through and hopefully find that (silly?) mistake or incoherence.
Contact Clément to learn more or see the Feynman technique, the Nobel prize's famous technique to understand and remember things.
I am currently an MSc. student so I don't have much time to improve regularly this tutorial and solve issues but I'll do my best. If you have some experience and would like to contribute get in touch and anyway feel free to send pull requests. See more at *vict0rsch.github.io***
Icons made by Freepik and Gregor Cresnar from Flaticon licensed by CC BY 3.0 and Favicon basic license