Big data on a small computer!

Neural Networks on the Raspberry Pi

I've been having some fun experimenting with ANNs (Artificial Neural Networks) on the Raspberry Pi.

I've been interested in ANN research for a very long while: I wrote my first simulator back in 1974.

I developed that first version in ALGOL60. I've recently re-written and extended it in Dyalog APL, and now it runs on the Raspberry Pi.

Why APL?

I've found APL a great choice for ANN research and education, for several reasons:
  • It's easy to learn, and fun!
  • It's concise and easy to test.
  • It handles arrays naturally.
  • It has a rich set of primitives for data manipulation and calculation.
  • It supports a pure functional programming style.
  • Dyalog APL has great support for parallel computing.
  • The Raspberry Pi version is free for non-commercial use.

Inexpensive ANN computing

I'm using a Raspberry Pi B model 3, but it runs acceptably fast on earlier versions of the Pi. I haven't yet tried it on the Pi Zero, but it should be fine.

The ANN code now uses the Raspberry Pi 3's multiple cores without any changes to the software.

A small additional effort would let me distribute the simulation over several networked Pi's. If I need more performance, £500/$750 would buy a stack of 16 Pi 3s with 64 cores and 16Gb of RAM - enough to do some serious work on very big datasets! Of course, I'd also need to re-license the software if I were using it commercially.

More on ANNs

I'm currently working on a presentation about neural networks and APL. As I complete each section I'll post notes and sample code on this blog.

You can read them here:
  1. Neural networks on the Raspberry Pi: The Neuron
  2. Neural networks on the Raspberry Pi: More Neurons

How can you experiment with APL?

If you want to get started, try the great tutorials on They will let you explore this powerful and expressive language.

If you want to run your own APL environment on a Raspberry Pi you can get it here.


Popular posts from this blog

Controlling a Raspberry Pi Pico remotely using PySerial

Five steps to connect Jetson Nano and Arduino

Raspberry Pi Pico project 2 - MCP3008