PyTorch or TensorFlow?
❤️ Become The AI Epiphany Patreon ❤️ ► https://www.patreon.com/theaiepiphany
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

Should you pick PyTorch or TensorFlow?

You'll learn:
✔️ A brief history of both frameworks
✔️ How they compare in the research community
✔️ How they compare in shipping to production
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 
✅ TF vs PT papers: http://horace.io/pytorch-vs-tensorflow/
✅ Google Trends: https://trends.google.com/trends/
✅ TF GitHub: https://github.com/tensorflow/tensorflow
✅ PT GitHub: https://github.com/pytorch/pytorch
✅ OpenAI blog: https://openai.com/blog/openai-pytorch/
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 

⌚️ Timetable: 
0:00 - Are there any other frameworks?
0:30 - Google Trends (PyTorch vs TensorFlow)
2:27 - Dimension 1: Ease of development & research
4:22 - Data-driven conclusions
5:55 - Dimension 2: Can we ship it?
7:12 - PyTorch is catching up?
7:45 - So what should I use?

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 
💰 BECOME A PATREON OF THE AI EPIPHANY ❤️ 

If these videos, GitHub projects, and blogs help you,
consider helping me out by supporting me on Patreon! 

The AI Epiphany ► https://www.patreon.com/theaiepiphany
One-time donation: 
https://www.paypal.com/paypalme/theaiepiphany 

Much love! ❤️

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 

💡 The AI Epiphany is a channel dedicated to simplifying the field of AI using creative visualizations and in general, a stronger focus on geometrical and visual intuition, rather than the algebraic and numerical "intuition". 

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 
👋 CONNECT WITH ME ON SOCIAL 
LinkedIn ► https://www.linkedin.com/in/aleksagordic/ 
Twitter ► https://twitter.com/gordic_aleksa 

Instagram ► https://www.instagram.com/aiepiphany/ 
Facebook ► https://www.facebook.com/aiepiphany/ 

👨‍👩‍👧‍👦 JOIN OUR DISCORD COMMUNITY:
Discord ► https://discord.gg/peBrCpheKE

📢 SUBSCRIBE TO MY MONTHLY AI NEWSLETTER:
Substack ► https://aiepiphany.substack.com/

💻 FOLLOW ME ON GITHUB FOR COOL PROJECTS: 
GitHub ► https://github.com/gordicaleksa 

📚 FOLLOW ME ON MEDIUM:
Medium ► https://gordicaleksa.medium.com/ 
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

#pytorch #tensorflow #deeplearning
 Five years ago if you asked me the same question which deep learning framework should they use I'll be telling you about six deep learning frameworks MX net CNTK Chainer Keras Tiano and cafe fast forward to 2020 they are pretty much all dead and The only two frameworks that matter are tensorflow and PyTorch unless if you're developing some exotic JVM deep learning applications you'll be using DL for J Okay, so let's briefly go through the history of how both frameworks both by Torch and tensorflow came to be so using Google Trends here We can see that the initial release of tensorflow happened in November 2015 and we had a huge spike here as it was probably Like heavily hyped as the whole deep learning field currently is and then we had some bust here So fast forward a year later PyTorch was initially released in I think September 2016 and By then tensorflow already gained a lot of traction as you can see here and it took a while But fast forward to 2020 they pretty much converged here. Let's briefly go into the worldwide View here and you can see the tensorflow is still more popular than Than PyTorch also if we take a look at GitHub repos tensorflow has got 148k stars and Whereas PyTorch has around 50k stars now looking at this data from Google Trends and github You may say well, okay like PyTorch kind of caught up, but tensorflow is still more popular But is it so now in this video? I'm going to give you an overview of this to frameworks along two dimensions So the first one being at the general ease of development how quickly can you prototype something? How quickly can you do research and the second dimension is can you deploy it? How easy is to deploy your models once you train them and push them to production now what this video is not It's not me telling you go use tensorflow or go use PyTorch because neither Google nor Facebook is paying me to do this video So what this video is it's my review Based on my research I've done on this topic after this video You'll know which framework makes more sense depending on your particular context so unfortunately tensorflow has got this nasty history with static graphs and That was the tensorflow version 1.0 where you basically had to define a static graph of your neural network before you start using it and it was very hard to debug it was not by tonic and They are paying the price now because of that in the meanwhile tensorflow released tensorflow 2.0 where they basically pretty much copied the paradigm PyTorch is using and that's dynamic graphs where you basically Create the graph of your neural network like you'd write a simple Python program so I said nasty because now they have problems with legacy docs is this 1.0 or 2.0 if you go and search your question on stackable flow you'll sometimes get answer from version 1.0 which totally does not make sense for tensorflow 2.0 so 2.0 is also referred to as eager execution and Although it did brought dynamic graphs with it It's way slower than PyTorch is and that's the second bad thing looking at the API itself now in 2020 They pretty much have the same APIs. They've converged even The one of the co-authors of PyTorch said himself in this tweet That it doesn't make any sense to compare them anymore because they've converged so much in that sense PyTorch on the other hand was Pythonic from the very start It's super easy to learn it's got awesome documentation. It's got awesome community And there is no ambiguity between which version is it can I use this one can I use this one? It's simple, so let's look at some curves. I Don't want this to be me ranting about PyTorch is much better in research. Let's back this up with some numbers Okay, so there is this awesome website, which I'll link in the description Which is showing us the like relative popularity between tensorflow and PyTorch And if we look at the first graph here, you can see everything above 50% means that PyTorch is better so looking at the most famous conferences on computer vision like CVPR or a natural language processing like EMNLP or some more classic deep learning machine learning conferences like NIPs and I see LR PyTorch is pretty much beating tensorflow If we look at some other graphs like the percentage of papers written in certain framework We can see that CVPR like we 30% of the papers were written in in PyTorch whereas only 7.7% Of the papers were written in tensorflow and we can see that the number is going down Whereas the PyTorch trend is not slowing down at all Finally the last plot just shows us the like the sheer number of papers written in certain framework and CVPR again had 418 papers written in PyTorch whereas only 113 papers were written in tensorflow and again the trends PyTorch is going up tensorflow is going down It's pretty obvious that PyTorch is killing it in the research community now let's take a look at the second dimension deploy the damn model to production dimension Now tensorflow is much more mature along this dimension So you have so first it's backed up by Google secondly simply had more time to mature One year to be precise. So it's got tensorflow serving so it's a broad term for let's say you have a web app You have your model served there and basically what it allows you to do is to seamlessly just kind of update the model on the fly Without the users ever noticing that happened. So it's got a really strong support for that. It also has a strong support for like deploying your models to mobile devices and also to different kinds of IOT devices embedded devices that's known as tensorflow light again and It also has this thing called tensorflow.js which enables you to deploy our models to the browser PyTorch on the other hand has got its own equivalents like PyTorch serve And PyTorch mobile which do pretty much the same things. They are just much less mature than tensorflow Versions they both came maybe less than a year ago And they still have a long time to just become as mature as tensorflow is in that aspect on the good note Many companies like open AI are Embracing PyTorch as their official framework of choice, which is really reassuring Also, Tesla is using PyTorch heavily and andrey karpathy is being Promoting PyTorch all over the place Microsoft's official became the PyTorch maintainer for Windows platform even big companies are starting to use PyTorch Which is a cool thing because they obviously have to deploy their models and that means they are betting that PyTorch will eventually Mature in that sense There's a general conclusion if you're a startup a business and you want a cheaper product that has a Machine learning deep learning components in it. It's probably safer bet to go with tensorflow with it's got a really mature ecosystem of Deploying your models on the other hand if you're willing to bet that PyTorch will get there eventually And you just want to have the ease of development and to be able to use the the best research out there I'd go with PyTorch So if you're a startup you want to be able to use the best research out there With PyTorch so for any one of you who doesn't have its own business you just want to learn deep learning I strongly suggest you start with PyTorch as a final note it's worth mentioning that fast AI is teaching its deep learning courses in PyTorch and Stanford also started teaching its courses in PyTorch which will in my opinion bias new graduates and new PhD students to Love the framework and to start developing their own startups using PyTorch Which will actually put the inertia moment on PyTorch side which was till now on tensorflow side So hope you liked this video and found it useful I'd love to know what's your favorite framework and why and just comment down in the comment section And I love your opinions on this one also subscribe to this channel and gently click that Bell icon So that you get notified when I upload a new video until next time keep learning
[{"start": 0.0, "end": 6.98, "text": " Five years ago if you asked me the same question which deep learning framework should they use I'll be telling you about six deep learning"}, {"start": 7.08, "end": 8.1, "text": " frameworks"}, {"start": 8.1, "end": 10.0, "text": " MX net CNTK"}, {"start": 10.0, "end": 13.24, "text": " Chainer Keras Tiano and cafe"}, {"start": 13.84, "end": 15.84, "text": " fast forward to 2020"}, {"start": 16.04, "end": 18.04, "text": " they are pretty much all dead and"}, {"start": 19.32, "end": 24.62, "text": " The only two frameworks that matter are tensorflow and PyTorch unless if you're developing some"}, {"start": 24.62, "end": 30.020000000000003, "text": " exotic JVM deep learning applications you'll be using DL for J"}, {"start": 30.020000000000003, "end": 37.58, "text": " Okay, so let's briefly go through the history of how both frameworks both by Torch and tensorflow came to be so using Google Trends here"}, {"start": 37.58, "end": 41.34, "text": " We can see that the initial release of tensorflow happened in November"}, {"start": 42.7, "end": 46.5, "text": " 2015 and we had a huge spike here as it was probably"}, {"start": 47.34, "end": 52.900000000000006, "text": " Like heavily hyped as the whole deep learning field currently is and then we had some bust here"}, {"start": 52.9, "end": 54.9, "text": " So fast forward a year later"}, {"start": 55.58, "end": 56.94, "text": " PyTorch"}, {"start": 56.94, "end": 61.379999999999995, "text": " was initially released in I think September 2016 and"}, {"start": 62.06, "end": 67.78, "text": " By then tensorflow already gained a lot of traction as you can see here and it took a while"}, {"start": 68.06, "end": 73.38, "text": " But fast forward to 2020 they pretty much converged here. Let's briefly go into the worldwide"}, {"start": 74.1, "end": 78.5, "text": " View here and you can see the tensorflow is still more popular than"}, {"start": 78.5, "end": 82.66, "text": " Than PyTorch also if we take a look at"}, {"start": 83.98, "end": 86.1, "text": " GitHub repos tensorflow has got"}, {"start": 87.86, "end": 89.86, "text": " 148k stars and"}, {"start": 90.66, "end": 97.38, "text": " Whereas PyTorch has around 50k stars now looking at this data from Google Trends and github"}, {"start": 97.38, "end": 103.46000000000001, "text": " You may say well, okay like PyTorch kind of caught up, but tensorflow is still more popular"}, {"start": 103.9, "end": 105.9, "text": " But is it so now in this video?"}, {"start": 105.9, "end": 108.58000000000001, "text": " I'm going to give you an overview of this to"}, {"start": 109.22, "end": 111.54, "text": " frameworks along two dimensions"}, {"start": 111.62, "end": 116.94000000000001, "text": " So the first one being at the general ease of development how quickly can you prototype something?"}, {"start": 116.94000000000001, "end": 121.42, "text": " How quickly can you do research and the second dimension is can you deploy it?"}, {"start": 121.42, "end": 127.58000000000001, "text": " How easy is to deploy your models once you train them and push them to production now what this video is not"}, {"start": 127.62, "end": 135.02, "text": " It's not me telling you go use tensorflow or go use PyTorch because neither Google nor Facebook is paying me to do this video"}, {"start": 135.02, "end": 137.94, "text": " So what this video is it's my review"}, {"start": 138.78, "end": 142.78, "text": " Based on my research I've done on this topic after this video"}, {"start": 142.82000000000002, "end": 147.3, "text": " You'll know which framework makes more sense depending on your particular context"}, {"start": 148.26000000000002, "end": 152.5, "text": " so unfortunately tensorflow has got this nasty history with static graphs and"}, {"start": 152.98000000000002, "end": 158.02, "text": " That was the tensorflow version 1.0 where you basically had to define a"}, {"start": 158.38, "end": 162.78, "text": " static graph of your neural network before you start using it and it was"}, {"start": 162.78, "end": 166.46, "text": " very hard to debug it was not by tonic and"}, {"start": 166.98, "end": 170.02, "text": " They are paying the price now because of that in the meanwhile"}, {"start": 170.54, "end": 176.38, "text": " tensorflow released tensorflow 2.0 where they basically pretty much copied the"}, {"start": 177.42000000000002, "end": 181.42000000000002, "text": " paradigm PyTorch is using and that's dynamic graphs where you basically"}, {"start": 181.98, "end": 187.94, "text": " Create the graph of your neural network like you'd write a simple Python program"}, {"start": 187.94, "end": 196.46, "text": " so I said nasty because now they have problems with legacy docs is this 1.0 or 2.0 if you go and search your question on stackable flow you'll"}, {"start": 197.3, "end": 202.57999999999998, "text": " sometimes get answer from version 1.0 which totally does not make sense for"}, {"start": 203.57999999999998, "end": 210.1, "text": " tensorflow 2.0 so 2.0 is also referred to as eager execution and"}, {"start": 210.42, "end": 213.54, "text": " Although it did brought dynamic graphs with it"}, {"start": 213.54, "end": 220.82, "text": " It's way slower than PyTorch is and that's the second bad thing looking at the API itself now in 2020"}, {"start": 221.29999999999998, "end": 226.26, "text": " They pretty much have the same APIs. They've converged even"}, {"start": 226.98, "end": 231.01999999999998, "text": " The one of the co-authors of PyTorch said himself in this tweet"}, {"start": 231.57999999999998, "end": 236.5, "text": " That it doesn't make any sense to compare them anymore because they've converged so much in that sense"}, {"start": 236.5, "end": 239.26, "text": " PyTorch on the other hand was Pythonic from the very start"}, {"start": 239.26, "end": 244.38, "text": " It's super easy to learn it's got awesome documentation. It's got awesome community"}, {"start": 244.38, "end": 249.17999999999998, "text": " And there is no ambiguity between which version is it can I use this one can I use this one?"}, {"start": 250.14, "end": 253.38, "text": " It's simple, so let's look at some curves. I"}, {"start": 253.98, "end": 259.86, "text": " Don't want this to be me ranting about PyTorch is much better in research. Let's back this up with some numbers"}, {"start": 259.86, "end": 263.21999999999997, "text": " Okay, so there is this awesome website, which I'll link in the description"}, {"start": 263.22, "end": 268.74, "text": " Which is showing us the like relative popularity between tensorflow and PyTorch"}, {"start": 268.74, "end": 274.22, "text": " And if we look at the first graph here, you can see everything above 50% means that"}, {"start": 274.86, "end": 276.66, "text": " PyTorch is better"}, {"start": 276.66, "end": 281.98, "text": " so looking at the most famous conferences on computer vision like CVPR or a"}, {"start": 282.3, "end": 289.62, "text": " natural language processing like EMNLP or some more classic deep learning machine learning conferences like NIPs"}, {"start": 289.62, "end": 293.42, "text": " and I see LR"}, {"start": 293.94, "end": 296.54, "text": " PyTorch is pretty much beating tensorflow"}, {"start": 297.02, "end": 302.42, "text": " If we look at some other graphs like the percentage of papers written in certain framework"}, {"start": 302.42, "end": 307.94, "text": " We can see that CVPR like we 30% of the papers were written in in PyTorch whereas"}, {"start": 308.5, "end": 310.5, "text": " only 7.7%"}, {"start": 311.34000000000003, "end": 315.38, "text": " Of the papers were written in tensorflow and we can see that the number is going down"}, {"start": 315.38, "end": 319.9, "text": " Whereas the PyTorch trend is not slowing down at all"}, {"start": 320.46, "end": 326.3, "text": " Finally the last plot just shows us the like the sheer number of papers written in certain framework and"}, {"start": 326.82, "end": 328.82, "text": " CVPR again had"}, {"start": 329.3, "end": 335.86, "text": " 418 papers written in PyTorch whereas only 113 papers were written in tensorflow and again the trends"}, {"start": 335.86, "end": 338.5, "text": " PyTorch is going up tensorflow is going down"}, {"start": 338.5, "end": 341.82, "text": " It's pretty obvious that PyTorch is killing it in the research"}, {"start": 341.82, "end": 347.7, "text": " community now let's take a look at the second dimension deploy the damn model to production"}, {"start": 348.26, "end": 350.26, "text": " dimension"}, {"start": 350.58, "end": 353.78, "text": " Now tensorflow is much more mature along this dimension"}, {"start": 353.78, "end": 359.53999999999996, "text": " So you have so first it's backed up by Google secondly simply had more time to mature"}, {"start": 360.02, "end": 367.34, "text": " One year to be precise. So it's got tensorflow serving so it's a broad term for let's say you have a web app"}, {"start": 367.34, "end": 374.38, "text": " You have your model served there and basically what it allows you to do is to seamlessly just kind of update the model on the fly"}, {"start": 374.38, "end": 380.97999999999996, "text": " Without the users ever noticing that happened. So it's got a really strong support for that. It also has a strong support for"}, {"start": 381.97999999999996, "end": 385.82, "text": " like deploying your models to mobile devices and also to"}, {"start": 386.34, "end": 392.38, "text": " different kinds of IOT devices embedded devices that's known as tensorflow light again and"}, {"start": 392.38, "end": 399.86, "text": " It also has this thing called tensorflow.js which enables you to deploy our models to the browser"}, {"start": 399.86, "end": 404.86, "text": " PyTorch on the other hand has got its own equivalents like PyTorch serve"}, {"start": 405.18, "end": 411.62, "text": " And PyTorch mobile which do pretty much the same things. They are just much less mature than tensorflow"}, {"start": 412.42, "end": 417.3, "text": " Versions they both came maybe less than a year ago"}, {"start": 417.3, "end": 424.78000000000003, "text": " And they still have a long time to just become as mature as tensorflow is in that aspect on the good note"}, {"start": 424.78000000000003, "end": 427.18, "text": " Many companies like open AI are"}, {"start": 427.7, "end": 432.5, "text": " Embracing PyTorch as their official framework of choice, which is really reassuring"}, {"start": 433.22, "end": 438.74, "text": " Also, Tesla is using PyTorch heavily and andrey karpathy is being"}, {"start": 439.46000000000004, "end": 442.5, "text": " Promoting PyTorch all over the place Microsoft's official"}, {"start": 442.5, "end": 449.06, "text": " became the PyTorch maintainer for Windows platform even big companies are starting to use PyTorch"}, {"start": 449.06, "end": 457.42, "text": " Which is a cool thing because they obviously have to deploy their models and that means they are betting that PyTorch will eventually"}, {"start": 458.74, "end": 460.74, "text": " Mature in that sense"}, {"start": 461.1, "end": 467.3, "text": " There's a general conclusion if you're a startup a business and you want a cheaper product that has a"}, {"start": 467.3, "end": 473.90000000000003, "text": " Machine learning deep learning components in it. It's probably safer bet to go with tensorflow with it's got a really mature"}, {"start": 474.42, "end": 476.42, "text": " ecosystem of"}, {"start": 476.66, "end": 482.14, "text": " Deploying your models on the other hand if you're willing to bet that PyTorch will get there eventually"}, {"start": 482.14, "end": 489.26, "text": " And you just want to have the ease of development and to be able to use the the best research out there"}, {"start": 489.74, "end": 491.18, "text": " I'd go with PyTorch"}, {"start": 491.18, "end": 496.1, "text": " So if you're a startup you want to be able to use the best research out there"}, {"start": 496.1, "end": 501.5, "text": " With PyTorch so for any one of you who doesn't have its own business you just want to learn deep learning"}, {"start": 501.5, "end": 503.74, "text": " I strongly suggest you start with"}, {"start": 504.42, "end": 506.3, "text": " PyTorch as a final note"}, {"start": 506.3, "end": 511.26000000000005, "text": " it's worth mentioning that fast AI is teaching its deep learning courses in PyTorch and"}, {"start": 512.1, "end": 517.3000000000001, "text": " Stanford also started teaching its courses in PyTorch which will in my opinion"}, {"start": 518.22, "end": 521.74, "text": " bias new graduates and new PhD students to"}, {"start": 521.74, "end": 526.7, "text": " Love the framework and to start developing their own startups using PyTorch"}, {"start": 527.1800000000001, "end": 533.82, "text": " Which will actually put the inertia moment on PyTorch side which was till now on tensorflow side"}, {"start": 533.82, "end": 535.82, "text": " So hope you liked this video and found it useful"}, {"start": 536.58, "end": 542.22, "text": " I'd love to know what's your favorite framework and why and just comment down in the comment section"}, {"start": 542.34, "end": 549.3, "text": " And I love your opinions on this one also subscribe to this channel and gently click that Bell icon"}, {"start": 549.3, "end": 553.5799999999999, "text": " So that you get notified when I upload a new video until next time keep learning"}]