February 28, 2019
Deep learning has been booming in the recent years, mostly due to how well it scales with large amounts of data. We are producing more and more data each year, and as our data grows, so does our need for methods of regression and classification.
Another phenomenon that is simultaneously occurring is the popularity of Python, specifically its the fastest growing language in 2018 (at least on stack overflow). Originally written as a hobby project by Guido van Rossum in the late 80, Python was founded on very good principles that both lower the barrier to entry and promote readability. These traits are big factors in why python has grown and stuck around all these years.
This article will go through the two major python deep learning frameworks, detail the background, and weigh the pros and cons of each.
Pytorch was developed by Facebook to be python-based at its core, which helps greatly with development. Many other frameworks are heavily invested in other languages like C++, as there are speed benefits in doing so. Pytorch borrows concepts and developments from Torch (written in Lua) and in March 2018 was merged with Caffe2 which was also created by Facebook
Tensorflow by Google was originally released on November 9, 2015. Similar to Pytorch it allows for various machine learning computations, especially Deep Learning. Tensorflow builds off of an internal tool called DistBelief.
Both libraries are very full-featured, with a slight edge to Tensorflow. Both libraries have very large communities and many compatible helper libraries. Tensorflow being so low level is difficult for beginners, but Keras fills that gap. Pytorch came later to the industry, so it was able to utilize some of the lessons learned by Tensorflow.
Pytorch is nicer to write in python, and the variable length sequences are great for NLP type applications among others. Tensorflow is more mature and has more surrounding packages to offer while being more portable to other languages/devices.
There are other packages as well, but for 95% of the readers, Keras/Tensorflow and Pytorch will be all you need.