The first time I dabbled with machine learning was during college for a undergraduate reasearch assignment. The task was to update some code written in Python and Julia. The code involved algorithms used for aircraft traffic control, and due to the complexity of preventing multiple aircraft from crashing into each other, machine learning was used to obtain a solution that would otherwise be much harder to find manually.

image

This project introduced me to some of the frameworks of that are used for ML. The python scripts used Tensorflow 1.x and the Julia scripts used a mixture of DeepRL, DeepQLearning, JuliaML, Flux, and probably some other stuff I’ve forgotten. At the time I didn’t understand any of these libraries and even less how they worked, so I completely failed to fix the code. I also felt ML was a bit of a fad and wasn’t interested in getting caught up in a short-lived wave of popularity.

With time it made sense it wasn’t just a fad and that learning about ML would be positive (especially as the last time I encountered it I was completely dumbfounded). After stumbling upon FreeCodeCamps’s Machine Learning with Python and completing the course (which involved multiple choice questions, there are no code exercise unfortunately), I vaguely understood that there were a few popular python frameworks for ML. Some of these include:

  • Tensorflow: An end-to-end open source machine learning platform for everyone.
  • Keras: Keras is an API designed for human beings, not machines.
  • Pytorch: PyTorch is a fully featured framework for building deep learning models.

The course focused on Keras (despite claiming its focused on tensorflow), which is a layer that goes atop another package that actually handles the ML algorithms. The default back-end is Tensorflow but you can also use Pytorch. Unfortunately, I recall my experience with Tensorflow and it wasn’t the best one. While I didn’t understand the library the code felt confusing and read like a convoluted mess. Objects upon object upon nested objects. By comparison, Pytorch’s code seems a lot less dependant on special objects and uses more of Python’s basic building blocks. Pytorch feel more… Pythonic?.

image

For a beginner this familiarity feels a lot simpler and easier to understand. A more tecnical comparison between the two libraries can be found here: Pytorch vs Tensorflow. Instead of using Python it’s also possible to use Julia but its ecosystems seem smaller and less newbie friendly than their python equivalents. The pre-compiled nature of Julia can benefit re-running code, but that’s an optimization thats irrelevant for a student learning through small projects. As a beginner, it makes more sense to stick to what’s popular due to the plethora of answered questions that can be found online.