PyTorch in 100 Seconds

  Рет қаралды 820,452

Fireship

Fireship

Жыл бұрын

PyTorch is a deep learning framework for used to build artificial intelligence software with Python. Learn how to build a basic neural network from scratch with PyTorch 2.
#ai #python #100SecondsOfCode
💬 Chat with Me on Discord
/ discord
🔗 Resources
PyTorch Docs pytorch.org
Tensorflow in 100 Seconds
Python in 100 Seconds • Python in 100 Seconds
🔥 Get More Content - Upgrade to PRO
Upgrade at fireship.io/pro
Use code YT25 for 25% off PRO access
🎨 My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
🔖 Topics Covered
- What is PyTorch?
- PyTorch vs Tensorflow
- Build a basic neural network with PyTorch
- PyTorch 2 basics tutorial
- What is a tensor?
- Which AI products use PyTorch?

Пікірлер: 628
@Telhias
@Telhias Жыл бұрын
The more I learn about Python, the more it seems like good python code should contain as little code in python as possible.
@r0manuks
@r0manuks Жыл бұрын
Try to build a table completely out of glue. Same thing, you want to use as little as possible
@ipodtouch470
@ipodtouch470 Жыл бұрын
Good python code seems to follow the following pattern import taskDoer doer = taskDoer doer.do_task()
@SI0AX
@SI0AX Жыл бұрын
IMO, the less code something has, the better. *Especially* when it's boilerplate code. Sometimes I believe people have a typing fetish... I actually have a coworker that likes typing and he writes a lot of repetitive code and does not recycle the code.
@MrRaja
@MrRaja Жыл бұрын
​@@SI0AX now he can beautify his code using gpt4. Don't show it to him it'll break his heart
@mrgalaxy396
@mrgalaxy396 Жыл бұрын
​@@SI0AX You mean the less code _you_ have to type the better. We all want complexity abstracted away with nice easy to use APIs we can just chain to get things done, but there's still a bunch of code someone else had to write running in the background to get that thing done.
@cre8ive65
@cre8ive65 Жыл бұрын
I did my final project for my degree last year using TensorFlow. I'm tearing my hair out now learning about PyTorch, this looks like it would have saved me so much time and suffering 😭
@suyashshrestha1099
@suyashshrestha1099 Жыл бұрын
Is TensorFlow not worth learning than PyTorch?
@akj3344
@akj3344 Жыл бұрын
@@suyashshrestha1099 Just pick one and go with it. Once you understand one of them, you can pick up the other in 2 hours or something.
@SI0AX
@SI0AX Жыл бұрын
There are actually *very* few differences between the 2. Their use cases may differ, but that really only because of what a company decided to use for their project. You can actually switch from one to the other with little effort.
@yourmomsboyfriend3337
@yourmomsboyfriend3337 Жыл бұрын
I agree with the above commenters, but if you are familiar with Numpy, USE PYTORCH. Numpy is extremely similar to PyTorch, and they even share an astounding number of identical functions, where PyTorch’s version just operate on tensors instead of numpy arrays and can use your GPU. Creating an array in numpy can be done identically in PyTorch with the Zeros(), Ones(), and empty() functions. They also connect very well, there’s even a from_numpy() function to get convert between the two
@AmodSandeepa
@AmodSandeepa Жыл бұрын
Pytorch is majorly used in academia and TF in the industry. Personally I found TF easier to learn than pytorch. Both are great in their own ways.
@SpenceDuke
@SpenceDuke Жыл бұрын
kinda wish this was PyTorch in 1000 seconds
@benwright4096
@benwright4096 18 күн бұрын
the best kind of python code is written in c
@Officialjadenwilliams
@Officialjadenwilliams Жыл бұрын
I absolutely have loved your videos for so long. Thank you for the incredible production quality and fast-paced information made simple!
@whit3rose
@whit3rose Жыл бұрын
Let's develop a deep neural network to find who made the chicken.
@hatnis
@hatnis Жыл бұрын
botted subs momenttt
@KingThrillgore
@KingThrillgore Жыл бұрын
Jaden moment
@fahd2372
@fahd2372 Жыл бұрын
@@whit3rose A dinosaur made the egg that mutated and made a chicken
@tixonochek
@tixonochek Жыл бұрын
@@fahd2372 not really
@1008OH
@1008OH Жыл бұрын
I used PyTorch for my thesis and it was really easy to use, I loved the modularity of everything
@sr.luisraytraceiii2422
@sr.luisraytraceiii2422 Жыл бұрын
YoloV8 and Mindsdb is a great thing for us smooth brains. 😊
@ramandeepkaurbanvat7583
@ramandeepkaurbanvat7583 Жыл бұрын
how did you got to learn pytorch can you tell me. I am interested in learning it but not able to find best source
@nebuchadnezzarii6423
@nebuchadnezzarii6423 Жыл бұрын
what was the thesis on?
@erikawwad7653
@erikawwad7653 Жыл бұрын
@@ramandeepkaurbanvat7583 just use the documentation. what task are you trying to accomplish?
@olcaybolat3452
@olcaybolat3452 Жыл бұрын
@@ramandeepkaurbanvat7583 If you finally got a good source, can you also share please
@JulianHarris
@JulianHarris Жыл бұрын
Absolutely brilliant combination of conciseness and coverage.
@bentaylor1153
@bentaylor1153 Жыл бұрын
your 100 second videos seem to come out exactly when I need them. I just started a AI, ML project this week.
@Pramit2000
@Pramit2000 6 ай бұрын
And I am starting now
@mujibshaikh7494
@mujibshaikh7494 5 ай бұрын
Will you please share details about your AI ML project
@doomgirl5341
@doomgirl5341 5 ай бұрын
​@@mujibshaikh7494SHUT up
@megamind452
@megamind452 Жыл бұрын
Me clicking in 1 sec the notification drops
@dhirajnavale3861
@dhirajnavale3861 Жыл бұрын
Parkour
@ApoorvPandeyDev
@ApoorvPandeyDev Жыл бұрын
Here for you🏆
@Philopater-Phoneix
@Philopater-Phoneix Жыл бұрын
​@@dhirajnavale3861 😂😂😂
@horizont6172
@horizont6172 Жыл бұрын
Script
@saladmancer8151
@saladmancer8151 Жыл бұрын
Me here complaining how my notifications are always 1hr late. Does anyone know why?
@Wilton24
@Wilton24 Жыл бұрын
Amazing explanation as always. Short yet concise. I hope you live 100+ more years.
@Herdol90
@Herdol90 Жыл бұрын
Such large concept in 100 seconds? Just brilliant work. Thanks!
@marktyshchuk
@marktyshchuk 28 күн бұрын
The best video tutorial on PyTorch I have ever seen. All the courses on this topic are so complicated but your video is an amazing one. I learned more than I have in a year. Thank you so much Fireship!!!
@moccomocco
@moccomocco Ай бұрын
MORE DEEP LEARNING STUFF IN 100 SECONDS! I remember going through courses that took literally freaking days... tons of crazy equations and weird explanations... this stuff is gold man.
@RobertoKv
@RobertoKv Жыл бұрын
I was just about to request this one! Thanks a lot!
@SillyLittleMe
@SillyLittleMe Жыл бұрын
Learning PyTorch currently and it was nice seeing you make a video on this topic.
@HeyFaheem
@HeyFaheem Жыл бұрын
It's Impressive that You Have Knowledge/Intuition in Many Field. Keep On!
@scottvickrey2743
@scottvickrey2743 Жыл бұрын
Keep them coming! I love these 100 second videos!
@jaktrak
@jaktrak Жыл бұрын
The code looks so much easier to understand then I expected. That's what makes me so excited and scared to even try this kind of thing.
@josejuan98
@josejuan98 Жыл бұрын
Wonderful video!!! I would love to see Scala in 100 seconds next :)
@genzprogrammer
@genzprogrammer Жыл бұрын
Thinking of this, Pytorch is trending and why there is no 100 second video from Fireship. Just got into machine learning in pytorch. Absolutely 🔥🔥. Need a comparison with Tensorflow. 5days before the version 2 became stable.
@Imperial_Squid
@Imperial_Squid Жыл бұрын
It depends a bit on your use case, pytorch is better for prototyping/research/personal projects but tensorflow is more easily deployable in the real world As an ML researcher I love pytorch personally and can't recommend it enough but tensorflow has its upsides too
@genzprogrammer
@genzprogrammer Жыл бұрын
@@Imperial_Squid Never tried Tensorflow before. Can I ask you something?, Which is more compatible with mobile devices. Tried pytorch with coreml and onnx. As ML researcher, which one do you prefer in case of Mobile/Edge devices
@Fighter05
@Fighter05 Жыл бұрын
Tensorflow has been around a lot longer. Its why its used in industry. It recently combined with the Keras library and got a lot of functionality from that. Pytorch itself is much newer and is used today more so as a way to build models. A lot of people, myself included prefer Pytorch for its usability. I personally think Pytorch is going to surpass Tensorflow because the magic of deploying a model has been demystified for awhile now. Its all about applied model accuracy; preventing overtraining etc etc. This is just flat out easier with Pytorch. Integration of a model with an API really is not an issue today.
@gabrielblanco2969
@gabrielblanco2969 Жыл бұрын
For deploying I'd had to say Tensorflow... Buf. I'd rather go with Torch. Sometimes not even the toy examples from TF doc works. Too much change from version 1 to 2. I'd stick to Torch
@erickmaraz9753
@erickmaraz9753 Жыл бұрын
Great video! :) I.think it would be important to add the backforward step in pytorch so people could see the complete cycle of training a NN.
@latedriver9019
@latedriver9019 Жыл бұрын
The data you provide is invaluable when it comes to keeping me up to date with the tech around me. As a developer, I can't thank you enough.
@sanjaisrao484
@sanjaisrao484 28 күн бұрын
Thank you for a brief overview, It was so helpful.
@theone5312
@theone5312 Жыл бұрын
Now I'm ready to start my Data Science career. Thank you Fireship!
@sir_no_name1478
@sir_no_name1478 Жыл бұрын
Very good and concise explained, as always ^^
@nickshapiro8308
@nickshapiro8308 8 ай бұрын
Always great info on this channel. Thanks!
@gianovici4008
@gianovici4008 Жыл бұрын
It amazes me to how much I can grasp in 100 seconds compared to what I might learn in a semester.
@tropicaldog430
@tropicaldog430 Жыл бұрын
Nah you must be joking lol
@3kelvinhong
@3kelvinhong Жыл бұрын
@@tropicaldog430 it can be real, education in school don't teach very well especially on relatively new tech like this.
@lottexy
@lottexy Жыл бұрын
you're not wrong tbh, if you go to a garbage school then yeah, any youtube video is better than your semester at your school.
@gianovici4008
@gianovici4008 Жыл бұрын
@@lottexy I go to the toughest school to get into. I go to IIT Kanpur which is like Indian MIT. Where I study statistics and data science
@MagnuSagus
@MagnuSagus Жыл бұрын
But this does not teach any theory or reasoning as to why you would do certain things. And what the effects of these things are. But I guess if your school is trash, then you probably learn more here.
@jordanmalfara1501
@jordanmalfara1501 Жыл бұрын
Alright man. Seriously? You have my computer bugged don't you? I swear, every god damn side project I start the next week we get a video with perfect relevance. I love you
@leoingson
@leoingson Жыл бұрын
Great little intro to CUDA in here! Would like to see a video giving an overview on GPU layers (AMD ROC and whatnot), and maybe the associated hardware situation right now. CUDA/NVIDIA gets way too much press, it seems.
@redcraft612
@redcraft612 Жыл бұрын
Interesting video. Keep up the good work 👍
@ruturajvyawahare9089
@ruturajvyawahare9089 Жыл бұрын
This is the only channel I have the bell 🔔 for notifications because of its pure quality of content 🔥
@ancientserenade
@ancientserenade Жыл бұрын
Wow i thought i will learn pytorch but now i have learned neural networks as well as pytorch. Thanks!
@shahonsoftware
@shahonsoftware Ай бұрын
This video is a most excellent example of how to summarize!!!
@Tristan-mr3pk
@Tristan-mr3pk Жыл бұрын
Always look forward to these videos
@thehapa
@thehapa 13 күн бұрын
Excellent brief explanation at around 150 seconds
@ggorg0
@ggorg0 Жыл бұрын
We need a full length tutorial on PyTorch!
@rikthecuber
@rikthecuber Жыл бұрын
I just started learning pytorch and here is Fireship!
@soham6649
@soham6649 Жыл бұрын
Great Video. Amazing demonstration of deep learning in Tesla Autopilot!
@BlueEighthNote
@BlueEighthNote Жыл бұрын
The timing of this video couldn't be any better because I'm working on some AI project with Pytorch right now :)
@John_Versus
@John_Versus Жыл бұрын
Haha me too. I am downloading the ai models for the first time at this time just before the video
@valentinoedits1963
@valentinoedits1963 Жыл бұрын
Just curious, what are you working on?
@BlueEighthNote
@BlueEighthNote Жыл бұрын
@@valentinoedits1963 some analysis about anime music cd sales
@yozhis1
@yozhis1 Жыл бұрын
now everything have that AI badge. you worked on web3 project before, right?
@isaiahcastillo898
@isaiahcastillo898 Жыл бұрын
@@BlueEighthNote i want to get into AI where do I start, already learning from coursera.
@zeldamage001
@zeldamage001 Жыл бұрын
0:18 "... tensors, which are basically just multidimensional arrays" cries in mathematics, hearing computer science
@ahmedel-sinousy4848
@ahmedel-sinousy4848 Ай бұрын
video is wonderfully useful.❤
@gregoryneedsaname
@gregoryneedsaname 4 ай бұрын
You summarized about 2 hours of Google searching in about 100 seconds. Nice job!
@TheSoprah
@TheSoprah Жыл бұрын
Hello @fireship, Can you please make a video about the python framework "flask" ? I am still confused about the functionalities and benefits of flask.
@picoplanetdev
@picoplanetdev Жыл бұрын
Exciting! I've been meaning to get deeper into pytorch at some point
@ruslanyusupov793
@ruslanyusupov793 Жыл бұрын
what is the name of the effect with the appearance of the logo at the beginning of the video?
@randomdev4246
@randomdev4246 Жыл бұрын
i really love this feeling of knowledge flowing through my brain, and none leaving after 2 seconds
@user-hs4zz1pq3i
@user-hs4zz1pq3i 8 ай бұрын
let me cry a bit
@loctite417
@loctite417 Жыл бұрын
Amazing video!
@tylerbaum4295
@tylerbaum4295 Жыл бұрын
For all both of us out there using Haskell, there is an implementation of Torch being developed for the language called HaskTorch.
@Alexis-hj6ci
@Alexis-hj6ci Жыл бұрын
Also exist other for Tensorflow.
@reignydaphne
@reignydaphne Жыл бұрын
You are an amazing teacher♥️ Please don't stop making these kinda videos 🥹♥️♥️
@sharkPause1
@sharkPause1 Жыл бұрын
i have no idea what i'm hearing but i'm definitely excited about it
@jeremy1991
@jeremy1991 Жыл бұрын
Just what I needed.
@spandanmanna5753
@spandanmanna5753 Жыл бұрын
Video Suggestion: Tensorflow vs Pytorch😊
@mylesbuckley9675
@mylesbuckley9675 Жыл бұрын
Love your videos ❤
@omomer3506
@omomer3506 Жыл бұрын
I understandthe words you used individually but strung together i got lost, still loved it
@abrh2793
@abrh2793 Жыл бұрын
Looking forward to more AI stuffs! Keep up the good work!
@nneural
@nneural 10 ай бұрын
this video was so comprehensible i totally know what you're talking about.
@curiousphilosopher2129
@curiousphilosopher2129 Жыл бұрын
Book recommendation: "A Primer to the 42 Most commonly used Machine Learning Algorithms (With Code Samples)."
@carlosrodriguez8698
@carlosrodriguez8698 Жыл бұрын
I have no idea what you just said, but I loved it.
@HH-mf8qz
@HH-mf8qz 10 ай бұрын
So it’s the same as tensorflow? Including tensors, cuda an a computation graph
@nattherman7321
@nattherman7321 Жыл бұрын
woah, got an ad with your voice before this video, really trippy
@ujjalkhadka
@ujjalkhadka Жыл бұрын
Keep it coming.
@michaelgatmaitan1797
@michaelgatmaitan1797 Жыл бұрын
This is what I've been waiting for
@NabeelFarooqui
@NabeelFarooqui Жыл бұрын
Fully utilized those 100 secs
@ryanclark1784
@ryanclark1784 Жыл бұрын
As always, straight banger
@maj3735
@maj3735 5 ай бұрын
This is brilliant
@joevtap
@joevtap Жыл бұрын
Finally I can say you read minds and released a video about something I just started learning
@jeffkevin3
@jeffkevin3 Жыл бұрын
FINALLY! FINALLY! FINALLY! FINALLY! FINALLY! Thank you Jeff!
@luluw9699
@luluw9699 Ай бұрын
After learning Pytorch and seeing this vid, it gives every basic info
@Manicsar1
@Manicsar1 Жыл бұрын
So is Intel working to support PyTourch via OpenAI or are they just adding support for Arc GPUs?
@edumorlom
@edumorlom Жыл бұрын
love these videos
@labibtanhar552
@labibtanhar552 Жыл бұрын
waiting for this one❤
@gtgunar
@gtgunar Жыл бұрын
Damn... started learning PyTorch for an interesting faculty, and you are here from the blue. THX for the vid, Torch really deserves more audience.
@VaibhavShewale
@VaibhavShewale Жыл бұрын
well that was more then 100 seconds more information then any videos!
@brazni
@brazni Жыл бұрын
@0:19 I think it is meant to say scalar rather than scaler
@paulwal222
@paulwal222 Жыл бұрын
Can you make a series on the youtube API? I wanna use it to auto-add technologies to my resume whenever you drop a new video.
@de-kat
@de-kat Жыл бұрын
can you pls do a short pytorch vs tensorflow video?
@jakubwojciechowski9697
@jakubwojciechowski9697 Жыл бұрын
0:52 I love these satirical inserts :D
@Felix5
@Felix5 Жыл бұрын
You are the only coding/tech youtuber I know of that talks fast enough to keep my ADHD brain interested. Love your videos.
@artifishul
@artifishul Жыл бұрын
I'm dying at the crash at 0:53
@ABCABC-sw8mh
@ABCABC-sw8mh Жыл бұрын
thanks. dont stop
Жыл бұрын
Amazing!
@divide6049
@divide6049 Жыл бұрын
This video basically summarized 75% of my 100hour long applicated-development class into 100 seconds...
@FridgeFucker96
@FridgeFucker96 Жыл бұрын
You're videos are so entertaining even though I don't understand a thing lol
@marcinchaciej
@marcinchaciej Жыл бұрын
understood everything perfectly, gonna code skyned
@dennismuller1141
@dennismuller1141 Жыл бұрын
I think you get way better results for an image classifier if you start with a convolutional layer instead of flattening the input instantly. I havn't tested it though.
@adefiqri8218
@adefiqri8218 Жыл бұрын
Agree, but this video is just a basic introduction to PyTorch in 100 seconds. Introducing the convolutional layer makes the video even longer.
@guilherme5094
@guilherme5094 Жыл бұрын
Really nice👍
@sinom
@sinom Жыл бұрын
PyTorch can use CUDA, HIP or plain C++ for it's backends. Meaning it can run on NVidia GPUs, AMD GPUs and use their accelerators, or simply run on the CPU. So not just CUDA
@sa1t938
@sa1t938 Жыл бұрын
and also MPS, Apples thing
@mascit
@mascit Жыл бұрын
finally torch! be careful though, if you move your model to gpu, be sure to do the same for your data :)
@johnx4224
@johnx4224 Жыл бұрын
“PyTorch is a world-class machine learning framework. It has been used to build image generation models and highly advanced voice recognition systems. To use it, just import torch, define some tensors et voilà … there‘s your self-driving car.”
@nixcreativecoding
@nixcreativecoding 3 ай бұрын
thanks king
@DANJUMA9
@DANJUMA9 Жыл бұрын
Thanks for this. Been trying to do more than django/flask with python and this is my next learning step
@ninhdang1106
@ninhdang1106 Жыл бұрын
I always consider that ML/AI/Data is the main usage of Python and web framework like Django/Flask is just "hey we can do web dev using Python too!"
@SI0AX
@SI0AX Жыл бұрын
PyTorch is a more advanced version of "Machine Learning". Learning PyTorch without learning ML with scikitlearn is like learning to run without having learned to walk. AI is basically ML but scaled up and with extra algorithms on top, but it still applies ML logic.
@DANJUMA9
@DANJUMA9 Жыл бұрын
@@SI0AX gotcha so go ML first before pytorch. Thanks for the advise
@JackTheDev
@JackTheDev Жыл бұрын
does it use CTypes for controlling it all so it is not as slow as python? it does use tensor cores so it should be ok? But just wondering.
@zain5251
@zain5251 Жыл бұрын
It uses numpy I think, and that uses C. Which makes it fast
@sircharlesross537
@sircharlesross537 Жыл бұрын
I’m going to pretend like I understood approximately 1 second in this video
@WolfPhoenix0
@WolfPhoenix0 Жыл бұрын
I have no idea what Fireship talked about in this video but he made it look awesome. 😂
@pranavbadrinathan6693
@pranavbadrinathan6693 Жыл бұрын
The fact that the tesla autopilot example had the car crashing and failing to do it's job is just chefs kiss 😘. (00:53)
@thethiny
@thethiny Жыл бұрын
Can you make a tutorial on how to pick the right cuda version for use with Docker?
@LokeshWankhede
@LokeshWankhede Жыл бұрын
Excellent explanation, Everything went over my head though.
@axtept66666
@axtept66666 Жыл бұрын
you're just watching this for fun
@style1708
@style1708 Жыл бұрын
You should make tensorflow or pytorch course
@someonewhowantedtobeahero3206
@someonewhowantedtobeahero3206 Жыл бұрын
Pytorch Lightning is what you should use these days. It cleans up the code quite a lot.
@maelstrom254
@maelstrom254 Жыл бұрын
How?
@cerulity32k
@cerulity32k Жыл бұрын
OOOOOOOOOO I GOTTA TRY THIS
@PuroCyanHQ
@PuroCyanHQ Жыл бұрын
I like how the Autopilot clip is a Tesla rear ending another car 😂
Ansible in 100 Seconds
2:34
Fireship
Рет қаралды 540 М.
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 102 МЛН
格斗裁判暴力执法!#fighting #shorts
00:15
武林之巅
Рет қаралды 85 МЛН
КАРМАНЧИК 2 СЕЗОН 6 СЕРИЯ
21:57
Inter Production
Рет қаралды 363 М.
Building a Neural Network with PyTorch in 15 Minutes | Coding Challenge
20:34
100+ Docker Concepts you Need to Know
8:28
Fireship
Рет қаралды 771 М.
PyTorch vs TensorFlow in 2023 FULL OVERVIEW
13:29
Team Up With AI
Рет қаралды 29 М.
10 weird algorithms
9:06
Fireship
Рет қаралды 1,1 МЛН
I tried 10 code editors
10:28
Fireship
Рет қаралды 2,8 МЛН
AWS for the Haters in 100 Seconds
2:30
Fireship
Рет қаралды 837 М.
TensorFlow in 100 Seconds
2:39
Fireship
Рет қаралды 879 М.
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2 МЛН
But what is a neural network? | Chapter 1, Deep learning
18:40
3Blue1Brown
Рет қаралды 16 МЛН
God-Tier Developer Roadmap
16:42
Fireship
Рет қаралды 6 МЛН
Huawei который почти как iPhone
0:53
Romancev768
Рет қаралды 479 М.
XL-Power Best For Audio Call 📞 Mobile 📱
0:42
Tech Official
Рет қаралды 773 М.
Which Phone Unlock Code Will You Choose? 🤔️
0:14
Game9bit
Рет қаралды 12 МЛН
МОЖНО ЛИ заряжать AirPods в чехле 🧐😱🧐 #airpods #applewatch #dyson
0:22
Apple_calls РЕПЛИКА №1 В РФ
Рет қаралды 20 М.
Fiber kablo
0:15
Elektrik-Elektronik
Рет қаралды 8 МЛН