4 ms·
Is there a reason for choosing PyTorch over tensorflow?
by aborsy 3y ago
Is there a reason for choosing PyTorch over tensorflow?
- dog436zkj3p7 3y agoYes, many. At this point you should be asking the question whether there's ever a reason to choose tensorflow at all.
- armcat 3y agoOne reason is that overall there are more PyTorch based ML projects out there, which translates to larger exploration space and wider support base. Around the beginning of 2021 PyTorch overtook TensorFlow as the ML framework of choice, see https://trends.google.com/trends/explore?date=today%205-y&q=pytorch,tensorflow&hl=en https://trends.google.com/trends/explore?date=today%205-y&q=...
- complex1314 3y agoIf you add keras to the mix it seems to be the most popular of all https://trends.google.com/trends/explore?date=today%205-y&q=pytorch,tensorflow,Keras&hl=en https://trends.google.com/trends/explore?date=today%205-y&q=...
- blitzar 3y agoI thought tensorflow was dead and PyTorch the new king.
- logicchains 3y agoPyTorch has a very good record of backwards compatibility compared to Tensorflow; your code is much less likely to be broken/deprecated if you use PyTorch.
- imtringued 3y agoPytorch is both faster in terms of performance and ease of development.
- NeutralForest 3y agoTF is pretty much dead. The examples often do not work, the docs are not up to date and I don't think any recent paper/projects use TF so you'll also find a better community and better resources around Pytorch.
- fransje26 3y agoDebugging is a lot easier in PyTorch. Although you can debug the compiled graph in Tensorflow, from experience, the local state might not be the same in debug mode as in compiled mode. Also, I've encountered strange performance regression issues with the newest Docker releases of Tensorflow, with 10x slow-downs compared to previous minor releases. And the docker version was always slower than the local version. Something something Nvidia & CUDA I guess. I had not performance differences with PyTorch when using docker. It should be said that Tensorflow was generally 10 to 20% faster for similar models. But that could be down to my ineptitude.
- david-gpu 3y agoBack when I worked on that stuff, Pytorch was a joy to use and TF was a pain. I remember Pytorch code being easier to understand and debug. As a researcher, Pytorch was also much easier to tinker with, which is perhaps a factor that explains why it rapidly gained popularity in academia.
- pcwelder 3y agoTensorflow was also riddled with bugs, which worsened after Keras was made as default. Things didn't work as expected even in some regular cases. I switched to Pytorch after I encountered this bug in a very normal use case back in v1.13 https://colab.research.google.com/drive/1D-kgD7NiRXTNTNwVr18H8C-edaL2zpqw#scrollTo=4Qxybq9yEHcy https://colab.research.google.com/drive/1D-kgD7NiRXTNTNwVr18... I've never encountered such a bug in Pytorch in the last 4-5 years.
- skadamat 3y agoPyTorch has taken over the field w.r.t. popularity. TF unfortunately isn't that popular outside of Google
- dist-epoch 3y agoThat was a valid question ... in 2018
- brutus1213 3y agoOn mobile devices, specifically Android, there are some benefits. Also, in the embedded/tinyml space.