PyTorch in 100 Seconds

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии • 680

  • @cre8ive65
    @cre8ive65 Год назад +1751

    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 Год назад +33

      Is TensorFlow not worth learning than PyTorch?

    • @akj3344
      @akj3344 Год назад +228

      @@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 Год назад +92

      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 Год назад +88

      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.

  • @Officialjadenwilliams
    @Officialjadenwilliams Год назад +1182

    I absolutely have loved your videos for so long. Thank you for the incredible production quality and fast-paced information made simple!

    • @whit3rose
      @whit3rose Год назад +31

      Let's develop a deep neural network to find who made the chicken.

    • @hatnis
      @hatnis Год назад +9

      botted subs momenttt

    • @KingThrillgore
      @KingThrillgore Год назад +12

      Jaden moment

    • @fahd2372
      @fahd2372 Год назад +1

      @@whit3rose A dinosaur made the egg that mutated and made a chicken

    • @tixonochek
      @tixonochek Год назад

      @@fahd2372 not really

  • @Telhias
    @Telhias Год назад +2298

    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 Год назад +291

      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 Год назад +153

      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 Год назад +111

      ​@@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.

  • @SpenceDuke
    @SpenceDuke Год назад +614

    kinda wish this was PyTorch in 1000 seconds

    • @benwright4096
      @benwright4096 8 месяцев назад +12

      the best kind of python code is written in c

    • @youtubeacc666
      @youtubeacc666 6 месяцев назад +7

      ​@@benwright4096Eh?

    • @architmishra015
      @architmishra015 5 месяцев назад +14

      ​@@youtubeacc666 leave him. He's just a normie who has just learnt about computer

    • @ahmoin
      @ahmoin 4 месяца назад +1

      @@architmishra015 they were prob thinking of CPython

    • @MateoMor
      @MateoMor 4 месяца назад

      @@architmishra015 Look at me! i know c is faster than python! i'm so clever

  • @theRealPadster
    @theRealPadster Год назад +26

    Me, a web dev: "Hmm, I know some of those words"

  • @1008OH
    @1008OH Год назад +341

    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 Год назад +1

      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 Год назад +2

      what was the thesis on?

    • @Rushield3981cc
      @Rushield3981cc Год назад +1

      @@ramandeepkaurbanvat7583 If you finally got a good source, can you also share please

    • @TheTobeyGaming
      @TheTobeyGaming Год назад +1

      I did a project with Tensorflow before and was really struggling with Tensorflow and am looking into what to use for my thesis, so i think your comment should be reson enough to check it out 😂😅

  • @bentaylor1153
    @bentaylor1153 Год назад +99

    your 100 second videos seem to come out exactly when I need them. I just started a AI, ML project this week.

    • @Pramit2000
      @Pramit2000 Год назад

      And I am starting now

    • @mujibshaikh7494
      @mujibshaikh7494 Год назад

      Will you please share details about your AI ML project

    • @doomgirl5341
      @doomgirl5341 Год назад

      ​@@mujibshaikh7494SHUT up

  • @nikodempatrycjuszswiercz4064
    @nikodempatrycjuszswiercz4064 Год назад +9

    0:18 it's "scalar" not "scaler"

  • @Herdol90
    @Herdol90 Год назад +21

    Such large concept in 100 seconds? Just brilliant work. Thanks!

    • @youtubeacc666
      @youtubeacc666 6 месяцев назад +3

      Meant for those who already understand the concept

  • @JulianHarris
    @JulianHarris Год назад +19

    Absolutely brilliant combination of conciseness and coverage.

  • @Wilton24
    @Wilton24 Год назад +10

    Amazing explanation as always. Short yet concise. I hope you live 100+ more years.

  • @genzprogrammer
    @genzprogrammer Год назад +182

    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 Год назад +13

      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 Год назад +3

      @@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 Год назад +11

      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 Год назад +5

      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

  • @moccomocco
    @moccomocco 9 месяцев назад +1

    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.

  • @SillyLittleMe
    @SillyLittleMe Год назад +10

    Learning PyTorch currently and it was nice seeing you make a video on this topic.

  • @curiousphilosopher2129
    @curiousphilosopher2129 Год назад +4

    Book recommendation: "A Primer to the 42 Most commonly used Machine Learning Algorithms (With Code Samples)."

  • @BlueEighthNote
    @BlueEighthNote Год назад +68

    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 Год назад +1

      Haha me too. I am downloading the ai models for the first time at this time just before the video

    • @valentinoedits1963
      @valentinoedits1963 Год назад +1

      Just curious, what are you working on?

    • @BlueEighthNote
      @BlueEighthNote Год назад +1

      @@valentinoedits1963 some analysis about anime music cd sales

    • @yozhis1
      @yozhis1 Год назад +1

      now everything have that AI badge. you worked on web3 project before, right?

    • @isaiahcastillo898
      @isaiahcastillo898 Год назад +1

      @@BlueEighthNote i want to get into AI where do I start, already learning from coursera.

  • @megamind452
    @megamind452 Год назад +181

    Me clicking in 1 sec the notification drops

  • @zeldamage001
    @zeldamage001 Год назад +2

    0:18 "... tensors, which are basically just multidimensional arrays" cries in mathematics, hearing computer science

  • @jaktrak
    @jaktrak Год назад +3

    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.

  • @brazni
    @brazni Год назад +2

    @0:19 I think it is meant to say scalar rather than scaler

  • @artscollab
    @artscollab 6 месяцев назад +1

    The best two minute and 43 second long video about PyTorch.

  • @theone5312
    @theone5312 Год назад +1

    Now I'm ready to start my Data Science career.
    Thank you Fireship!

  • @tylerbaum4295
    @tylerbaum4295 Год назад +3

    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.

  • @marktsh
    @marktsh 8 месяцев назад

    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!!!

  • @gianovici4008
    @gianovici4008 Год назад +94

    It amazes me to how much I can grasp in 100 seconds compared to what I might learn in a semester.

    • @tropicaldog430
      @tropicaldog430 Год назад +25

      Nah you must be joking lol

    • @3kelvinhong
      @3kelvinhong Год назад +2

      @@tropicaldog430 it can be real, education in school don't teach very well especially on relatively new tech like this.

    • @lottexy
      @lottexy Год назад +2

      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 Год назад +1

      @@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 Год назад +3

      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

  • @ruturajvyawahare9089
    @ruturajvyawahare9089 Год назад +2

    This is the only channel I have the bell 🔔 for notifications because of its pure quality of content 🔥

  • @soham6649
    @soham6649 Год назад +3

    Great Video. Amazing demonstration of deep learning in Tesla Autopilot!

  • @leoingson
    @leoingson Год назад +5

    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.

  • @gregoryneedsaname
    @gregoryneedsaname Год назад

    You summarized about 2 hours of Google searching in about 100 seconds. Nice job!

  • @homan-awa
    @homan-awa Год назад +1

    i really love this feeling of knowledge flowing through my brain, and none leaving after 2 seconds

  • @scottvickrey2743
    @scottvickrey2743 Год назад

    Keep them coming! I love these 100 second videos!

  • @sharkPause1
    @sharkPause1 Год назад +1

    i have no idea what i'm hearing but i'm definitely excited about it

  • @latedriver9019
    @latedriver9019 Год назад +14

    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.

  • @HeyFaheem
    @HeyFaheem Год назад

    It's Impressive that You Have Knowledge/Intuition in Many Field.
    Keep On!

  • @reignydaphne
    @reignydaphne Год назад +13

    You are an amazing teacher♥️
    Please don't stop making these kinda videos 🥹♥️♥️

  • @sanatdangol2059
    @sanatdangol2059 Месяц назад +1

    "what you came here to do though..." is exactly what i came here to do

  • @erickmaraz9753
    @erickmaraz9753 Год назад +3

    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.

  • @turolretar
    @turolretar Год назад +1

    0:21 isn’t it “scalar” instead of “scaler” ?

  • @johnx4224
    @johnx4224 Год назад +4

    “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.”

  • @josejuan98
    @josejuan98 Год назад +3

    Wonderful video!!! I would love to see Scala in 100 seconds next :)

  • @leoingson
    @leoingson Год назад +4

    1:26 miss-counted :-)

  • @RobertKvsv
    @RobertKvsv Год назад

    I was just about to request this one! Thanks a lot!

  • @dennismuller1141
    @dennismuller1141 Год назад +8

    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 Год назад +3

      Agree, but this video is just a basic introduction to PyTorch in 100 seconds. Introducing the convolutional layer makes the video even longer.

  • @sanjaisrao484
    @sanjaisrao484 8 месяцев назад

    Thank you for a brief overview, It was so helpful.

  • @rikthecuber
    @rikthecuber Год назад

    I just started learning pytorch and here is Fireship!

  • @ggorg0
    @ggorg0 Год назад +10

    We need a full length tutorial on PyTorch!

  • @sir_no_name1478
    @sir_no_name1478 Год назад +1

    Very good and concise explained, as always ^^

  • @sircharlesross537
    @sircharlesross537 Год назад +3

    I’m going to pretend like I understood approximately 1 second in this video

  • @ancientserenade
    @ancientserenade Год назад

    Wow i thought i will learn pytorch but now i have learned neural networks as well as pytorch. Thanks!

  • @redcraft612
    @redcraft612 Год назад +1

    Interesting video. Keep up the good work 👍

  • @snippletrap
    @snippletrap Год назад +1

    @0:20 -- *scalar

  • @evyats9127
    @evyats9127 Год назад

    When Fireship is less confident about some cs topic he makes the video about it more serious and with less jokes

  • @thehapa
    @thehapa 7 месяцев назад

    Excellent brief explanation at around 150 seconds

  • @shahonsoftware
    @shahonsoftware 8 месяцев назад

    This video is a most excellent example of how to summarize!!!

  • @nickshapiro8308
    @nickshapiro8308 Год назад

    Always great info on this channel. Thanks!

  • @someonewhowantedtobeahero3206
    @someonewhowantedtobeahero3206 Год назад +1

    Pytorch Lightning is what you should use these days. It cleans up the code quite a lot.

  • @Bbne420
    @Bbne420 Год назад +1

    idk why I was expecting him to write a model that learns to say hello world

  • @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)

  • @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.

  • @TheSoprah
    @TheSoprah Год назад +2

    Hello @fireship,
    Can you please make a video about the python framework "flask" ? I am still confused about the functionalities and benefits of flask.

  • @valentinschmidt87
    @valentinschmidt87 20 дней назад

    Particularly the tensor library is a must have for ML/ Data engineers - totally agree

  • @divide6049
    @divide6049 Год назад

    This video basically summarized 75% of my 100hour long applicated-development class into 100 seconds...

  • @Tristan-mr3pk
    @Tristan-mr3pk Год назад

    Always look forward to these videos

  • @VaibhavShewale
    @VaibhavShewale Год назад +2

    well that was more then 100 seconds more information then any videos!

  • @rajatverma6262
    @rajatverma6262 Год назад

    My resume can basically say - I am subscribed to Fireship.

  • @abrh2793
    @abrh2793 Год назад +5

    Looking forward to more AI stuffs! Keep up the good work!

  • @carlosrodriguez8698
    @carlosrodriguez8698 Год назад

    I have no idea what you just said, but I loved it.

  • @spandanmanna5753
    @spandanmanna5753 Год назад +2

    Video Suggestion: Tensorflow vs Pytorch😊

  • @nrg4285
    @nrg4285 Год назад

    2:29 Thanks for not including sample data for "some_data", code is dogshit without it. Tried providing my own tensor and it gives RuntimeError: mat1 and mat2 shapes cannot be multiplied

  • @Psychx_
    @Psychx_ Год назад +2

    0:53 Damn, that Tesla Autopilot needs some more training…

  • @PuroCyanHQ
    @PuroCyanHQ Год назад +2

    I like how the Autopilot clip is a Tesla rear ending another car 😂

  • @Mr_Yeah
    @Mr_Yeah Год назад

    0:53 Whoa, what's the original context of that video?

  • @artifishul
    @artifishul Год назад +1

    I'm dying at the crash at 0:53

  • @iymenabdella1774
    @iymenabdella1774 Год назад +1

    100s of pytorch, years of statistics and math to understand what's really happening.

  • @joevtap
    @joevtap Год назад

    Finally I can say you read minds and released a video about something I just started learning

  • @subhasish_lmaoo
    @subhasish_lmaoo Год назад +8

    As a college student who recently got into deep learning with TensorFlow, I can understand and relate to PyTorch. Both are fundamentally pretty similar.

    • @NergusFlame
      @NergusFlame Год назад +2

      The best way to put is is that TensorFlow is a library, whereas PyTorch is a framework. Also PyTorch is just way more pythonic than TensorFlow.

    • @iheuzio
      @iheuzio Год назад +1

      Tensorflow is more for scaling up with other systems, pytorch is most useful for stationary or researching different models. I find tensor flow much easier to learn, whereas pytorch requires more knowledge and memorization of the syntax. Both are useful for separate things, but you can use them in the place of another, except tensor flow since pytorch does not support a lot of the platforms still. It will support mobile in a couple years fully though. TensorFlow is my favourite one

  • @MagnuSagus
    @MagnuSagus Год назад +1

    Install pytorch and optionally CUDA. Getting the right CUDA version and pytorch version and the other things for your GPU to run properly. Was a pain in the ass for me.

  • @jakubwojciechowski9697
    @jakubwojciechowski9697 Год назад

    0:52 I love these satirical inserts :D

  • @Nilloc777
    @Nilloc777 Год назад +1

    I made a chess playing CNN with PyTorch! It played great opening, and atrocious endgames

  • @artemdzhalilov5722
    @artemdzhalilov5722 7 месяцев назад +2

    watched at x2 speed, learned pytorch in 50 seconds

  • @thethiny
    @thethiny Год назад

    Can you make a tutorial on how to pick the right cuda version for use with Docker?

  • @luluw9699
    @luluw9699 9 месяцев назад

    After learning Pytorch and seeing this vid, it gives every basic info

  • @יובלהרמן-ח2ד
    @יובלהרמן-ח2ד Год назад

    Instructions unclear, my computer is flying and shooting lasers

  • @thenoxz2924
    @thenoxz2924 Год назад

    I laughed so hard when that car just crashed using some AI vision, as you were talking about a framework used to build famous AI products.

  • @paul1
    @paul1 Год назад

    0:54 went from braking to breaking real quick

  • @jeffkevin3
    @jeffkevin3 Год назад

    FINALLY! FINALLY! FINALLY! FINALLY! FINALLY!
    Thank you Jeff!

  • @logon-oe6un
    @logon-oe6un Год назад +1

    >pip install torch...cu117
    >pip install thing
    wtf is version "2.0.0+cu117"? No package management for you
    >pip uninstall torch
    >pip install thing
    The thing is CUDAless
    >pip uninstall torch
    >pip install torch...cu117
    Please tell me this doesn't only affect me.

  • @yt-sh
    @yt-sh Год назад

    the quality of the analogy and abstraction to explain concepts is outstanding, kudos 👏👏👏
    especially 0:41 - 0:42

  • @nattherman7321
    @nattherman7321 Год назад

    woah, got an ad with your voice before this video, really trippy

  • @DANJUMA9
    @DANJUMA9 Год назад +4

    Thanks for this. Been trying to do more than django/flask with python and this is my next learning step

    • @ninhdang1106
      @ninhdang1106 Год назад +4

      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 Год назад +2

      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

  • @marcinchaciej
    @marcinchaciej Год назад

    understood everything perfectly, gonna code skyned

  • @ruslanyusupov793
    @ruslanyusupov793 Год назад

    what is the name of the effect with the appearance of the logo at the beginning of the video?

  • @crnpowerimmortal
    @crnpowerimmortal Год назад

    I regret using tensorflow now, I had recently tried updating to latest tensorflow and found gpu support was dropped for windows. Now have to use wsdl and other workarounds just to speed up the training.

  • @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 Год назад +1

      It uses numpy I think, and that uses C. Which makes it fast

  • @HH-mf8qz
    @HH-mf8qz Год назад

    So it’s the same as tensorflow? Including tensors, cuda an a computation graph

  • @WolfPhoenix0
    @WolfPhoenix0 Год назад

    I have no idea what Fireship talked about in this video but he made it look awesome. 😂

  • @Cypaa_
    @Cypaa_ Год назад

    Looking at a fireship video with a fireship ad lmao

  • @ahmedel-sinousy4848
    @ahmedel-sinousy4848 9 месяцев назад

    video is wonderfully useful.❤

  • @sinom
    @sinom Год назад +6

    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 Год назад +1

      and also MPS, Apples thing