Sync’ up! … without getting drained

jul 14

Yanni sings

When one is coming from Erlang, and sees an artificial neural network diagram/topology, one cannot help but see the 1-to-1 mapping between the Erlang concurrency model, and neural networks; it’s almost eerie. With that, it would be remiss not to have Erlang toss its hat into the ring alongside Python and friends, even though these other languages arguably have dominance with this problem domain.

What is Yanni?

Yanni is an artificial neural network (ANN) framework that leverages Erlang’s lightweight processes, as these message-passing units map beautifully to the structures of ANNs. Yanni is an acronym for ‘yet-another neural-net implementation.’

It’s the goal to think long-run with Yanni: when used as a toy, Yanny may be a sluggish & humdrum implementation compared to the myriad of others out in the wild, but at scale, considering Erlang’s multi-core support, Yanni could become a viable solution for serious Machine Learning (ML) number-crunching.

Getting started

Yanni can be used as a ‘deps’ dependency and installed via rebar[3], or in other ways, like including it via ERL_LIBS.

The public repo for Yanni is as follows:

With that, you’ll have everything you need. If you’d like to use the notp tool for très vite code execution/testing, this deps can also be installed, and Yanni will use it happily.

You can learn about notp here.


Some examples are provided within ‘src/notp_unit_tests.erl’ in addition to ‘src/notp_trainer_tests.erl.’

With these in hand, you can see some typical toy ML implementations in action which should clue you into how to use Yanni.

For example: iris flower, xor-gate, or-gate, and a little ‘mastermind’ dataset & tests are available in the ‘trainer’ area, while the ‘unit’ test module showcases some lower-level functionality.

Unfortunately, the code in the ‘tests’ modules are refactored to a high degree, so those unfamiliar with Erlang may have a tough time following the bouncing ball.

What can Yanni do?

Yanni can take your preprocessed datasets, train upon them, then make ‘educated’ assumptions about test data you give it.

You can use Yanni for multi-class classifications problems, for simplistic binary testing (is this a picture of a pizza), and many other things both known & unknown to the Yanni authors.

The world’s your oyster with Yanni!