Tensorflow vs PyTorch
This is something I have been asked frequently. Which should I learn? Are both required for a Data Scientist? Let's check the following benchmark I made:
Warning: This comparison is biased from my experience which is mostly with tensorflow, but there are interesting conclusions. Althought they scored similarly, there are some aspects that might weigh a bit more, here they are.
According ti AssemblyAI, Historically TF has been used as the defacto framework for deep learning, but the raise of popularity for PyTorch as grown exponentially. In 2017 almost 90% of the research papers used TF. In 2021 almost 80% of the new research are made with PyTorch.
Papers with Code Shows that most of the papers exposed are done with PyTorch.
Althoug Tensorflow 1 was first, it was difficult to use, giving other Libraries and Frameworks a chance to shine.
Companies like OpenAI have moved a lot of their internal efforts from TF to PyTorch. There are things like Reinforcement Learning that are still done in TF.
According to GradietFlow, Tensorflow is the most popular framework in job postings, but I believe this is because of historical reasons. PyTorch grew 194% year-over-year in contrast to Tensorflow who grew just 23%.
Most of the models ready-to-use on HuggingFace are made in PyTorch.
Reinformcement Learning is more robust on the Tensorflow side.
I believe the final message is loud an clear. PyTorch is the future and it's becoming the new bad boy in town. Tensorflow is still widely used and supported. So, you better learn both as they will be competing.
If you are just starting, I recommend start with Tensorflow and look for the alternative PyTorch code.