Here's again a little list of my humble off-time contributions I'm happy to add to the large amount of work we're completing all together each month.
Then there is one more "new in Debian" (meaning: "new in unstable") announcement.
First, the uploads (a few of them are from July):
- afl/2.21b-1
- djvusmooth/0.2.17-1
- python-bcrypt/3.1.0-1
- python-latexcodec/1.0.3-4 (closed #830604)
- pylint-celery/0.3-2 (closed #832826)
- afl/2.28b-1 (closed #828178)
- python-afl/0.5.4-1
- vulture/0.10-1
- afl/2.30b-1
- prospector/0.12.2-1
- pyinfra/0.1.1-1
- python-afl/0.5.4-2 (fix of elinks_dump_varies_output_with_locale)
- httpbin/0.5.0-1
- python-afl/0.5.5-1 (closed #833675)
- pyinfra/0.1.2-1
- afl/2.33b-1 (experimental, build/run on llvm 3.8)
- pylint-flask/0.3-2 (closed #835601)
- python-djvulibre/0.8-1
- pylint-flask/0.5-1
- pytest-localserver/0.3.6-1
- afl/2.33b-2
- afl/2.33b-3
New packages:
- keras/1.0.7-1 (initial packaging into experimental)
- lasagne/0.1+git20160728.8b66737-1
Sponsored uploads:
- squirrel3/3.1-4 (closed #831210)
Requested resp. suggested for packaging:
- yapf: Python code formatter
- spacy: industrial-strength natural language processing for Python
- ralph: asset management and DCIM tool for data centers
- pytest-cookies: Pytest plugin for testing Cookiecutter templates
- blocks: another deep learning framework build on the top of Theano
- fuel: data provider for Blocks and Python DNN frameworks in general
New in Debian: Lasagne (deep learning framework)
Now that the mathematical expression compiler
Theano is available in Debian,
deep learning frameworks resp. toolkits which have been build on top of it can become available within Debian, too (like Blocks, mentioned before).
Theano is an own general computing engine which has been developed with a focus on machine learning resp. neural networks, which features an own declarative tensor language.
The toolkits which have build upon it vary in the way how much they abstract the bare features of Theano, if they are "thick" or "thin" so to say.
When the abstraction gets higher you gain more end user convenience up to the level that you have the architectural components of neural networks available for combination like in a lego box, while the more complicated things which are going on "under the hood" (like how the networks are actually implemented) are hidden.
The downside is, thick abstraction layers usually makes it difficult to implement novel features like custom layers or loss functions.
So more experienced users and specialists might to seek out for the lower abstraction toolkits, where you have to think more in terms of Theano.
I've got an initial package of
Keras in experimental (1.0.7-1), it runs (only a Python 3 package is available so far) but needs some more work (e.g. building the documentation with mkdocs).
Keras is a minimalistic, high modular DNN library inspired by Torch
.
It has a clean, rather easy API for experimenting and fast prototyping.
It can also run on top of Google's
TensorFlow, and we're going to have it ready for that, too.
Lasagne follows a different approach.
It's, like Keras and Blocks, a Python library to create and train multi-layered artificial neural networks in/on Theano for applications like image recognition resp. classification, speech recognition, image caption generation or other purposes like style transfers from paintings to pictures
.
It abstracts Theano as little as possible, and could be seen rather like an extension or an add-on than an abstraction
.
Therefore, knowledge on how things are working in Theano would be needed to make full use out of this piece of software.
With the new
Debian package (0.1+git20160728.8b66737-1)
, the whole required software stack (the corresponding Theano package, NumPy, SciPy, a BLAS implementation, and the
nividia-cuda-toolkit and NVIDIA kernel driver to carry out computations on the GPU
) could be installed most conveniently just by a single
apt-get install python ,3 -lasagne command
.
If wanted with the documentation package
lasagne-doc for offline use (no running around on remote airports seeking for a WIFI spot), either in the Python 2 or the Python 3 branch, or both flavours altogether
.
While others have to spend a whole weekend gathering, compiling and installing the needed libraries you can grab yourself a fresh cup of coffee.
These are the advantages of a fully integrated system (sublime message, as always: desktop users switch to Linux!).
When the installation of packages has completed, the MNIST example of Lasagne could be used for a quick check if the whole library stack works properly
:
$ THEANO_FLAGS=device=gpu,floatX=float32 python /usr/share/doc/python-lasagne/examples/mnist.py mlp 5
Using gpu device 0: GeForce 940M (CNMeM is disabled, cuDNN 5005)
Loading data...
Downloading train-images-idx3-ubyte.gz
Downloading train-labels-idx1-ubyte.gz
Downloading t10k-images-idx3-ubyte.gz
Downloading t10k-labels-idx1-ubyte.gz
Building model and compiling functions...
Starting training...
Epoch 1 of 5 took 2.488s
training loss: 1.217167
validation loss: 0.407390
validation accuracy: 88.79 %
Epoch 2 of 5 took 2.460s
training loss: 0.568058
validation loss: 0.306875
validation accuracy: 91.31 %
The example on how to train a neural network on the
MNIST database of handwritten digits is refined (it also provides
--help) and explained in detail in the
Tutorial section of the documentation in
/usr/share/doc/lasagne-doc/html/.
Very good starting points are also the IPython notebooks that are available from the tutorials by Eben Olson
and Geoffrey French on the PyData London 2016
.
There you have Theano basics, examples for employing convolutional neural networks (CNN) and recurrent neural networks (RNN) for a range of different purposes, how to use pre-trained networks for image recognition, etc.