MXNet in Perl


These pages show how Sergey Kolychev's Perl module AI::MXNet opens the door to using Perl's data structures in the MXNet machine learning framework. In his own work, Kolychev provides an introduction, some examples, a script on neural networks and a picture of his dog.

In my work, I would like to use my Perl hashes of Sicilian words with MXNet to develop machine learning tools for the Sicilian language. For now however, GluonNLP is only available for Python. Kolychev's work focuses on computer vision.

When writing his Perl module, Kolychev kept the Perl syntax as similar as possible to the Python syntax, so that the Python documentation would also document the Perl module. In that spirit, these pages replicate as closely as possible the MXNet Crash Course in Python by Thom Lane.

His work is worth replicating because it's an excellent introduction. And it's also worth replicating because replication highlights the similarities between the Perl and Python interfaces and draws attention to important differences.

Finally, this introduction will discuss the best reason to use Perl for machine learning: The Perl language itself. Perl makes it very easy to organize very complex information and process regular expressions.

Any data language should work well when your dataset fits neatly into a multi-dimensional array. But sometimes well-organized information fits poorly into a multi-dimensional array. For example, verb conjugations may be regular, but do not fit neatly into a multi-dimensional array. What they do fit into are Perl hashes.

So the combination of Perl and MXNet should, one day, help us develop new linguistic tools for Sicilian and other languages.

Copyright © 2002-2019 Eryk Wdowiak