Pytorch Vs Tensorflow

username: surojit_sengupta
cooked: <p>Hello Moderators,</p>
<p>I love PyTorch from using it for the past 2 months but, suddenly my organization wants to move to Tensorflow as the new leadership suggests so. Can anyone, who has used both recently, suggest a few pointers in favor of Pytorch and a few cons of tensorflow so that I may defend my love?</p>
<p>Regards</p>

username: ErlendFax
cooked: <p>I’m not the most qualified person to answer this, but IMO: Pytorchs <strong>Dynamic Computational Graph</strong>. Being able to print, adjust, debug, the code without this session BS makes easier to debug. However, TensorFlow created “Eager Execution” this summer to be more similar Pytorch. An argument is that Pytorch has always been like this, imperative and define-by-run.</p>

username: surojit_sengupta
cooked: <p>I had this point in my mind but, after the introduction of Eager execution am finding it difficult to convince people with anything other than ease of use, at least for me.</p>
<p>Regards</p>

username: tom
cooked: <p>For me, personally, <a href="https://discuss.pytorch.org/t/what-is-adaptiveavgpool2d/26897/4">these very forums are invaluable</a> and one of the main reasons I recommend PyTorch.</p>
<p>Also, I like how PyTorch cares about its <a href="https://pytorch.org/ecosystem" rel="nofollow noopener">ecosystem</a>. Depending on what you plan to do, projects listed there will help you quite a bit - for example the people at fast.ai do many great things (and switched to PyTorch after doing Keras before) - and the other projects listed there do really awesome things, mostly in more specific areas.</p>
<p>On the technical side, PyTorch 1.0 will be released in a few days. My impression was that the upcoming Tensorflow 1.x to 2.0 transition - which brings many good features such as the first class eager execution support that you mention - may require updating your code.</p>
<p>That said, I’m sure that Tensorflow isn’t a bad choice either, and many bright people build great things with it.</p>
<p>Best regards</p>
<p>Thomas</p>

username: surojit_sengupta
cooked: <p>Is there really no downside to Tensorflow that PyTorch amends?</p>

username: tom
cooked: <p>I would not think think there is a “you can do X in A but it’s 100% impossible in B”.</p>
<p>Of course, there are plenty of people having all sorts of opinions on PyTorch vs. Tensorflow or fastai (the library from fast.ai) vs. Keras, but I think many most people are just expressing their style preference.</p>
<p>How would you measure better? One way could be to look at benchmarks (e.g. <a href="https://dawn.cs.stanford.edu/benchmark/" rel="nofollow noopener">https://dawn.cs.stanford.edu/benchmark/</a> , I think <a href="https://mlperf.org/" rel="nofollow noopener">https://mlperf.org/</a> will have something during/after NeurIPS, so in a few days) and see what kind of models people use for competing there). Another popular measure is “what do research papers use”, I’m sure we’ll see something about that for NeurIPS, too.</p>
<p>Best regards</p>
<p>Thomas</p>

username: surojit_sengupta
cooked: <p>Pytorch being relatively new, most research papers have to be in Tensorflow. Maybe we shouldn’t look at that right now, as  a metric. I agree with the rest.</p>
<p>Regards</p>

username: smth
cooked: <p>I obviously cant take sides in this debate without coming off biased <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=12" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<blockquote>
<p>Pytorch being relatively new, most research papers have to be in Tensorflow.</p>
</blockquote>
<p>Just wanted to point out that</p>
<ul>
<li>PyTorch is now 1.5+ years old.</li>
<li>if you <a href="http://search.iclr2019.smerity.com">search the latest conference ICLR 2019</a> whose reviews were out 2 weeks ago
<ul>
<li>PyTorch is mentioned 252 times</li>
<li>TensorFlow is mentioned 266 times</li>
</ul>
</li>
</ul>

username: surojit_sengupta
cooked: <p>There’s no doubt about its fan following in the research community and even I have a personal preference for PyTorch. But, people  in the industry still express concerns about the differences in results when the same code runs on a gpu vs a tpu vs a cpu plus, it’s support in various cloud/infra platforms . Am yet to witness them for myself though and still, unable to fathom or validate their concerns.</p>
<p>But, at the end of the day, our leadership just made us to pick up Keras to write the code for production and I really wasn’t aware enough of the advantages PyTorch has on offer, to defend my interests and nullify their concerns <img src="https://discuss.pytorch.org/images/emoji/apple/frowning.png?v=6" title=":frowning:" class="emoji" alt=":frowning:"></p>

username: mathematics
cooked: <p>I have just started pytorch , found hard than tensorflow.<br>
Found that tensorflow objects , classes were so clean designed than pytorch, May be i am wrong.</p>

username: mathematics
cooked: <p>Actually I was wrong, Tensorflow is more like in production enviroment. While Pytorch is more like in research enviroment. I like it.</p>