A Quick Look at the Embedded Learning Library (ELL)

The Embedded Learning Library (ELL) is an open source project. The goal is to create a cross compiler for machine learning models. Briefly, machine learning models, such as those for image recognition, are typically very large in terms of memory. This is OK if you’re going to run the ML model on a powerful PC, but not OK if you want to run the model on a small IoT device.

The ELL library has tools to convert a standard ML model, such as one created by CNTK or Darknet, into a universal .ell file (in JSON format). Then ELL tools can compile the .ell file into a model for a target device, such as a Raspberry Pi or an Android phone.

The first step was to install the ELL system on my machine. The ELL library is still under development and so installing ELL means compiling C++ source code. If you’ve ever done this, you know you can expect problems. And I ran into plenty, but fortunately for me, the ELL team sits about 50 feet away from me, so, I was able to get ELL built with their expert help.

Next, I created a CNTK model for the Iris Dataset. A CNTK model, like most models, is saved in a binary format. I used the ELL cntk_import.py tool to create a .ell format model, and then I used the ELL wrap.py tool to convert the .ell file into a Python package suitable for deployment to a PC. In a realistic scenario, I’d convert the .ell file into some sort of file suitable for deployment on a Raspberry PI, or similar, IoT device.

My last step was to write a short Python script to test the ELL result package. I did so, and got the same results as the original CNTK model. Nice!

The entire process took several hours even though the ELL documentation at https://github.com/Microsoft/ELL/blob/master/INSTALL-Windows.md is very good. Because there are thousands of files involved, and many tools (Visual Studio C++ compiler, Python engine, the cmake tool, the SWIG library, and so on) used, I ran into quite a few problems with things like version dependencies and my PATH environment variable.

The Microsoft ELL library is extremely ambitious. The ELL team is quite small, so they’re going to have to prioritize their efforts. But if successful, ELL will have a big impact on developers who want to deploy a machine learning model on an IoT device.

An ambitious canine, shooting for the stars

This entry was posted in CNTK, Machine Learning. Bookmark the permalink.