When we talk about competition between tech giants, here are the usual suspects – Google competes with Facebook for ad revenues, Google competes with AWS & Microsoft for cloud revenue, and the list goes on.
But an area that’s often missed from the technical parlance especially for those who are close to the ML developments, is how Facebook and Google are competing for a pie of ML developers attention through open source frameworks.
Google launched Tensorflow with much fanfare in November 2015. Facebook launched Pytorch in 2016. Both are open source frameworks/ libraries for machine learning, used primarily on Python but can also be used by developers on C++ & Julia.
Think of it from a developers perspective
If you are a ML developer, well, you can always work on various deep learning frameworks simultaneously for different projects and be good at most. But there comes a time when you get to choose one above the other.
There are more than a dozen ML frameworks in the industry, most of them open source. Wolfram Mathematica, Theano, Apache MXNet, Microsoft Cognitive Toolkit (CNTK), Keras, Intel Math Kernel Library, Deeplearning4j, Caffe; the list goes on. So the product here is free, but then who is buying.
That essentially means that most of the tech outfit behind these frameworks scuffle for developers attention. Whoever has more developers using its framework wins the battle in the long run.
Giving away your complex, almost rocket science level algorithms for free to the public might appear as altruism but it’s not. More on that here.
A bit of history on Tensorflow & Pytorch
For an outsider, Tensorflow seems to be winning the race. It was launched earlier than Pytorch and moreover, well, it’s Google.
Tensorflow gained quick popularity after its launch. Its user base is much higher than all other frameworks combined. Google has the resources and right experience in the past to appeal to a large developers base and provide solutions at scale that they grapple with.
But Pytorch has gained in popularity. Jeremy Howard of fast.ai prefers pytorch and in a lengthy 2017 blog, he went on to say:
Tensorflow implementations were not documented, rapidly changing, and unnecessarily complex
There are tons of online opinions that compare the two. Here’s a look at our comparison.
Let’s take a more objective, number-driven view of how the two are competing. Here’s a look at the interest on both terms according to Google trends.
Here’s another number driven comparison.
Pytorch, seemingly, is almost as widely adopted in the research community as Tensorflow in 2019.
Points of contention and Tensorflow gives back
Users have always criticized Tensorflow for being difficult to work on; the learning curve is too high, documentation is complex. In 2017, tensorflow integrated Keras. Think of Keras as a wrapper on top of Tensorflow that makes a lot of functionalities more intuitive.
Using TensorFlow makes me feel like I’m not smart enough to use TensorFlow; whereas using Keras makes me feel like neural networks are easier than I realized.
Tensorflow was also criticized for being a static computation graph library, much like a black box which means that developers find it hard to debug their code. The dynamic approach of Pytorch was favored by many because it helps them see exactly what’s going on with their code.
In July 2019, Tensorflow tried mending this issue by releasing Ver2.0 introducing eager execution mode that has a dynamic graph behavior.
The debate on which one of the two is better is not settled yet. The ML community is divided and vouch vehemently for the framework that each developer prefers. One reason is that you will rarely find a developer that is equally good in both frameworks. Once you start using a framework, you are almost ‘locked-in’.
Google has a lot of experience with open-sourcing software in the past and making them available to a large community in a way that benefits it as well as keep developers engaged, especially in the case of Android. It has a massive developer community backing it and is well documented.
But Facebook has tasted the blood earlier and seemingly came out victorious, in case of React vs Angular. For now, Pytorch appears to be David in the battle of David & Goliath since masses seem to be rooting for it.
If you loved this story, do join our Telegram Community.
Also, you can write for us and be one of the 500+ experts who have contributed stories at AIM. Share your nominations here.
What's Your Reaction?
Bhasker is a Data Science evangelist and practitioner with proven record of thought leadership and incubating analytics practices for various organizations. With over 16 years of experience in the area of Business Analytics, he is well recognized as an expert within the industry. Earlier, Bhasker worked as Vice President at Goldman Sachs. He is B.Tech from Indian Institute of Technology, Varanasi and MBA from Indian Institute of Management, Lucknow.