Former IT man and Python king's guide to neural networks

Tariq Rashid on programming AI

The Python purist

In spite of this, the book doesn't draw on any libraries at all. One of his reasons for this is pedagogical.

"I try not to use any third-party libraries because I want people to learn by doing it themselves," he tells us. "I believe that the underlying concepts are simple enough that you can do them with core Python."

He proves the power of Python in the book by using around 30 lines of core Python code to create a basic neural network. The network then uses the M-NIST training set to recognise handwriting. Moreover, he says you can do this on a Raspberry Pi Zero, which costs about a fiver.

Wait, what? Isn't NVIDIA making fat stacks by persuading everyone to throw GPUs at neural networking?

M-NIST uses around 60,000 small images. "Some of the data sets that people are using are much bigger than that," he says.

Also, his book focuses on machine learning using neural networks, in which you tell the algorithm what to look for. GPUs come into their own with deep learning, where they figure out the important parameters for themselves.

Here, he's breaking his "no libraries" approach by privately playing with PyTorch, a Python-friendly deep learning framework that focuses on GPU acceleration.

GPU acceleration has been horrible to program for, he says. "PyTorch abstracts that and presents you with a much simpler interface to work with."

PyTorch also attracted him because it is built for Python from the ground up, and is not a wrapper around something else. He also likes it for political reasons.

"It's very open, because it's from the community," he says. "I feel happy about using it and not in danger of being tied to the coat tails of a large corporation." These are the same reasons that stop him using other frameworks, including Google's TensorFlow. Sure, he argues, Google open-sourced the framework, but it's still Google's, and behind the scenes it calls the shots.

"It's great that Google have done that, and they've open-sourced many things. But they've also shown us that they can make decisions that aren't in the user's interest." He cites Google's abandonment of XMPP messaging support as an example.

This attitude is unsurprising from a chap who has spent the last seven years promoting the use of open-source software in government, but Rashid's time in that sector has come to a close. He gave notice at the start of August, and plans to move away from London to spend more time writing and teaching.

What advice does he have for those wanting to get into AI development?

"Don't struggle on your own. Reach into the community near where you live and do it together. I ran into quite a few blocks, and just going out and talking to people unblocked those things."

There's only so much you can learn on your own, it seems, no matter how well written your learning material. ®

We'll be covering machine learning, AI and analytics – and ethics – at MCubed London in October. Full details, including early bird tickets, right here.

Sponsored: The Joy and Pain of Buying IT - Have Your Say

Biting the hand that feeds IT © 1998–2017