Learn an amazing programming language as you build a neural network from scratch.
This workshop inspired this YouTube video series on learning APL with neural networks.
The aim of this workshop is to introduce people to the APL programming language, with the first contact geared towards building a neural network from scratch. It helps if the audience has some programming knowledge (in no programming language in particular) and has heard of neural networks a bit, but that is not necessary.
There are two reasons why I use neural networks to introduce APL to newcomers in this workshop:
The objective of the workshop is to make incremental improvements to a namespace that eventually contains enough functionality to create a neural network that can be trained on the MNIST data (mnistdata.rar
) and classify handwritten digits.
That is, the neural network will receive input images like the ones below and should be able to identify the digit in the image.
For that matter, here is the standard order in which things get done in the workshop (this lines up almost perfectly with the order in which objects appear in NeuralNets.apln
):
The number of people attending the workshop, their previous knowledge of APL and neural networks and other related factors impacts how much we manage to accomplish.
If the list is exhausted within the time allotted for the workshop, here's a couple of follow-ups with little opportunity cost to start:
By the end of the workshop, attendees will have a (close to finished) neural network written in a programming language they probably never dealt with, APL.
Attendees will have dabbled for the first time with a purely array-oriented programming language and built a popular, modern-day machine learning model from scratch.
Finally, their own implementation of a neural network can be trained in less than 2 minutes to recognise handwritten digits with 89% accuracy (timed on my laptop). Here is an example of some drawn digits and the neural network's guesses.
@@
@@@
@@@ @@@
@@@@ @@@@@@@@
@@@@ @ @@@@@@@@@@ @@ @ @@
@@@ @@@@@@@@ @@@@@@@ @@@ @@@@@@@ @@ @@
@@@ @@@@@@@@@@@@@ @@@@@ @@@ @@@@@@@@ @@@ @@@
@@@@ @@@@@@@@@@@@@ @@@ @@@ @@@@ @@@ @@@ @@@
@@@ @@@@@@@@@@@ @@@ @@@ @@@ @@@ @@@
@@@ @@@@ @@@@ @@@ @@ @@@ @@
@@@ @@@@ @@@@@ @@@ @@@ @@@ @@@@ @@@
@@@ @@@@@@ @@@@@ @@@@ @@@ @@@@ @@@@ @@@
@@@ @@@@@@@ @@@@ @@@@ @@@@ @@@@@@@ @@@@@ @@@
@@@ @@@@ @@ @@@@@ @@@@@ @@@@@@@@@@@@@ @@@@@@@@@@
@@ @@@@ @@ @@@@ @@@@@@@@ @@@@@@@@ @@@ @@@@@@@@
@@@@@@ @@@ @@@@@ @@@@@@@@@@@@@ @@ @@@ @@@
@@@@@@ @@@@@ @@@@@ @@@@@@@@ @@@@@@ @@ @@@
@@@@@@@@@@ @@@@ @@@@@@@ @@@@ @@@ @@
@@@@@@@@ @@@@ @@@@@@@ @@ @@ @@@
@@@@ @@@@ @@@@@@ @@@ @@@
@@@@ @@@@ @@@ @@
@@@@ @@@ @@@ @@@
@@@@ @@@ @@@
@@@ @@@ @@
guessing 6 guessing 7 guessing 2 guessing 9 guessing 4
Here is what some people had to say about the contents of the workshop and the way I led it:
βIt was amazing what we did in just 2 hours [...] In the end I was tired but satisfied with, and fascinated by what I had learned and built.β β JoΓ£o Afonso
βThe best thing was to have this hands-on approach to learning a new programming languageβ β Carlos
βI really enjoyed the simple and accessible way in which it was taughtβ β Anonymous
Other than the code with the reference implementation (available in this GitHub repository), here are some links that might be useful: