The spelled-out intro to neural networks and backpropagation: building micrograd

Sdílet
Vložit
  • čas přidán 16. 06. 2024
  • This is the most step-by-step spelled-out explanation of backpropagation and training of neural networks. It only assumes basic knowledge of Python and a vague recollection of calculus from high school.
    Links:
    - micrograd on github: github.com/karpathy/micrograd
    - jupyter notebooks I built in this video: github.com/karpathy/nn-zero-t...
    - my website: karpathy.ai
    - my twitter: / karpathy
    - "discussion forum": nvm, use youtube comments below for now :)
    - (new) Neural Networks: Zero to Hero series Discord channel: / discord , for people who'd like to chat more and go beyond youtube comments
    Exercises:
    you should now be able to complete the following google collab, good luck!:
    colab.research.google.com/dri...
    Chapters:
    00:00:00 intro
    00:00:25 micrograd overview
    00:08:08 derivative of a simple function with one input
    00:14:12 derivative of a function with multiple inputs
    00:19:09 starting the core Value object of micrograd and its visualization
    00:32:10 manual backpropagation example #1: simple expression
    00:51:10 preview of a single optimization step
    00:52:52 manual backpropagation example #2: a neuron
    01:09:02 implementing the backward function for each operation
    01:17:32 implementing the backward function for a whole expression graph
    01:22:28 fixing a backprop bug when one node is used multiple times
    01:27:05 breaking up a tanh, exercising with more operations
    01:39:31 doing the same thing but in PyTorch: comparison
    01:43:55 building out a neural net library (multi-layer perceptron) in micrograd
    01:51:04 creating a tiny dataset, writing the loss function
    01:57:56 collecting all of the parameters of the neural net
    02:01:12 doing gradient descent optimization manually, training the network
    02:14:03 summary of what we learned, how to go towards modern neural nets
    02:16:46 walkthrough of the full code of micrograd on github
    02:21:10 real stuff: diving into PyTorch, finding their backward pass for tanh
    02:24:39 conclusion
    02:25:20 outtakes :)
  • Věda a technologie

Komentáře • 1,6K

  • @georgioszampoukis1966
    @georgioszampoukis1966 Před 2 měsíci +153

    The fact that this video is free to watch feels illegal. It really speaks volumes about Andrej. What a stunning explanation. It takes incredible skill and expertise to be able to explain such a complex topic this intuitively and simply. All I can say is thank you from the bottom of my heart that you offer videos like this for free. What an amazing man!

    • @Rumblerist
      @Rumblerist Před 14 dny +1

      Wholeheartedly agree, there are lots of videos that take a stab at explaining the core of how a neural network works, this is by far the most simple yet conveys the fundamentals to the core of how neural networks work. Thanks @Andrej

  • @nyariimani7281
    @nyariimani7281 Před rokem +217

    This reminds me of my college courses, except it's way better in three ways: 1) Here the speaker really does know what he's talking about. 2) I can stop and rewind, get definitions, and practice myself before moving on to the next step over and over, so I can get the most out of the next step because I actually had the time to understand the last step. 3) I can do this over several days so I can keep coming back when I'm fresh and present. You are a gem and I really, really appreciate you creating this.

  • @peterdann643
    @peterdann643 Před 9 měsíci +426

    Simply stunning. I'm a 72 year old fiction writer with rudimentary computer programming skills whose son works professionally in this area. I wanted to gain a better understanding of the technology he's working with, and writes scientific papers about, and now I feel I've made a great start in that direction. Wonderful!

    • @BarDots315
      @BarDots315 Před 8 měsíci +45

      You're a great father never change!!

    • @hamdanalameri2885
      @hamdanalameri2885 Před 7 měsíci +22

      what an amazing father you are, My dad also tries to keep up with all the technologies just so he can understand and get to bond with his children. I want you to know that we appreciate you guys and love you.

    • @ClayMole
      @ClayMole Před 6 měsíci +2

      You're awesome!
      May I ask, how has it been to work as a fiction writer? Would you recommend it?

    • @manishj5154
      @manishj5154 Před 5 měsíci +5

      All the people fawning over him, you do realize he started with saying he is a "fiction writer".
      Granted that it's pretty cool if this isn't fiction.

    • @semtex6412
      @semtex6412 Před 5 měsíci

      @@manishj5154 he's likely backpropagating

  • @fhools
    @fhools Před 9 měsíci +130

    When I'm confused about deep learning, I go back to this video and it calms me. It shows that there is a simple explanation waiting for someone like Andrej to show the light.

    • @FireFly969
      @FireFly969 Před měsícem +1

      Yep I watched a 52 hours course on pytorch, I was learning how to build a neural network but not how neural network works, which is a stupid thing from me, and a good lesson, to learn how things works if you want to learn it.

    • @mehulsuthar7554
      @mehulsuthar7554 Před 19 dny

      @@FireFly969 mind sharing the course. please

  • @DrKnowitallKnows
    @DrKnowitallKnows Před rokem +1263

    Andrej, the fact that you're making videos like this is AMAZING! Thank you so much for doing this. I will be spending some quality time with this one tonight (and probably tomorrow lol) and can't wait for the next one. Thank you, thank you, thank you!

    • @2ndfloorsongs
      @2ndfloorsongs Před rokem +13

      And thank you for your videos, Dr Know It All. Always appreciate them.

    • @mattphorwich
      @mattphorwich Před rokem +6

      I was stoked to discover Andrej sharing the knowledge on these videos as well!

    • @lonnybulldozer8426
      @lonnybulldozer8426 Před rokem +1

      You made love to the video?

    • @0GRANATE0
      @0GRANATE0 Před rokem +1

      And what happend? Do you now understand DNN?

  • @robl39
    @robl39 Před rokem +227

    Finally… someone who understands it well enough to explain it to a beginner. This is hands down the best NN video on the Internet. Thanks a ton!

  • @kemalatayev
    @kemalatayev Před rokem +360

    Just and FYI for those following at home. If you are getting an error at 1:54:47 you should add __radd__ into your Value class similar to __rmul__. It will allow the order of addition to not matter. I don't think it was shown in the earlier sections.

    • @adamderose9468
      @adamderose9468 Před rokem +15

      ty, i needed this at t=6422 in order to sum(wi*xi for wi, xi in zip(self.w, x)) + self.b

    • @CarlosGranier
      @CarlosGranier Před rokem +7

      @@adamderose9468 Thanks Adam. This had me stumped.

    • @karanshah1698
      @karanshah1698 Před rokem +7

      Underrated comment...

    • @lidiahyunjinkwon7138
      @lidiahyunjinkwon7138 Před rokem +1

      OMG, thank you so much. It was driving me nuts.

    • @jamesb43
      @jamesb43 Před 11 měsíci +1

      That’s comforting. I thought I just missed it. Good on you for sharing this

  • @lawrenceadu-gyamfi4179
    @lawrenceadu-gyamfi4179 Před rokem +4

    Just wanted to say a big thanks to you Andrej and the team working on this. Truly amazing, the clarity with which you explain these things is impressive and inspiring! Looking forward to see the remaining videos and even more. Thanks again!

  • @GregX999
    @GregX999 Před rokem +295

    OMG! This is the first time I've ever TRUELY understood what's actually going on when training a NN. I've tried to learn so many times, but everyone else seems to make it so unnecessarily complex. Thanks for this!

    • @ophello
      @ophello Před rokem +12

      It’s spelled “truly.”

    • @khaldrogo9451
      @khaldrogo9451 Před rokem +3

      @@ophello giggity

    • @pooroldnostradamus
      @pooroldnostradamus Před rokem +28

      @@ophello Excuse his poor training dataset

    • @veganath
      @veganath Před rokem

      @@ophello an example of backpropagation, you have no doubt adjust Greg's waits...lol

    • @sidg11
      @sidg11 Před rokem +2

      @@veganath it's spelled weights ...

  • @ThetaPhiPsi
    @ThetaPhiPsi Před rokem +192

    This is the single best explanation of backprop in code that I've seen so far. I've once implemented a neural network from scratch, except autograd, so Micrograd is a good fit and so clear and accessible. Thanks Andrej!

    • @leslietetteh7292
      @leslietetteh7292 Před rokem +1

      Actually true. And exactly the same, I've once implemented a neural network from scratch, and I broadly understood, but this is the best explanation of backpropagation I've seen. Excellent work.

  • @kerwinmarkgordo3458
    @kerwinmarkgordo3458 Před rokem +7

    Thank you so much for doing a step by step simulation on how gradient descent works. I am grateful for the passion and effort you make in order to teach. These lessons are very essential as we continue to dive deep into learning.

  • @DrRosik
    @DrRosik Před rokem +8

    This video is by far the best and most educational I've seen regarding "how NN work", and I have looked very long. For me, even though I thought I knew how NN work and operate, at least to the point that I could use the tools out there to build a simple one. I never fully grasped the details and was always frustrated why I didn't know WHY I had to use a specific setup for my NN, I just "knew" that this is the way to do it. This video explains the basics in such a simple and logical way. Thank you Andrej! And please keep up the good work.

  • @gabrieldornelles9310
    @gabrieldornelles9310 Před rokem +226

    I'm really inspired by you as an educator, and I'm very happy to see you sharing your knowledge in a lecture after a long time!

  • @nkhuang1390
    @nkhuang1390 Před rokem +137

    It takes real talent, dedication and complete mastery of the subject matter to breakdown difficult technical topics so clearly. Its also clear that Andrej is having fun while he elucidates. This is simply the most amazing series of educational videos on the internet on these topics. I hope you continue to put out more material like these.

  • @sanjay-89
    @sanjay-89 Před 7 měsíci +12

    This was an exceptional lecture. Just wanted to say thank you for taking the time to make this.
    I have spent time in university courses, reading books, doing assignments and yet, I truly understood more out of this single lecture than from anything else prior.

  • @chris_piss
    @chris_piss Před rokem +10

    Many others have already said it, but thank you so much for making this. I've been trying to learn machine learning for many years now (in several short-lived attempts), and this lesson was a huge missing piece for me. Understanding the calculus behind it all, and how to really grasp how the weights and biases affect the output, really made back propagation and the learning flow click for me

  • @bergonius
    @bergonius Před rokem +79

    Great teacher with great background and expertise. We're lucky to have him spending his time to share his knowledge with anyone who wants to learn, for free. Looking forward to more videos.

    • @notkamara
      @notkamara Před rokem +4

      He's great! He even has an old CZcams cubing channel (Badmephisto) and his tutorials there are awesome too!

    • @alisaad679
      @alisaad679 Před rokem +1

      @@notkamara omg i learned how to solve a rbx cube from him decades ago thats crazy, now im learnning neural networks, crazy how the world works

  • @bycloudAI
    @bycloudAI Před rokem +41

    This is literally gold, you have explained everything so intuitively and made it so much easier to understand!
    Thank you so much Andrej for sharing this in-depth knowledge for free!

    • @ophello
      @ophello Před rokem +6

      You literally don’t know what “literally” means.

    • @flflflflflfl
      @flflflflflfl Před rokem

      @@ophello Not necessarily. One can use a word incorrectly while still knowing its true meaning.

    • @SOMEONE-jg6jg
      @SOMEONE-jg6jg Před 10 měsíci

      love your videos bro

    • @writethatdown100
      @writethatdown100 Před 2 měsíci

      @@ophello I know this is a year old comment, and my reply is pointless, but _technically_ 🤓Merriam Webster lists "used in an exaggerated way to emphasize a statement or description that is not literally true or possible" as one of the definitions. People define the dictionary. Not the other way around. And yes, it *literally* doesn't matter at all, but it annoyed me that you were wrong when trying to _correct_ somebody else's well meaning compliment.

  • @manupatet
    @manupatet Před rokem +2

    I was looking for some intuition on backprop and this is it! Thanks Andrej for taking time out of your schedule to share this precious knowledge.

  • @raphaelkalandadze9691
    @raphaelkalandadze9691 Před rokem +10

    What an astonishing lecture, the best explanation of backprops, and the whole cycle is so intuitive and easy to understand.
    I wish I had a teacher like that. I would know everything 100 times better than I do now.
    Somebody is still saying that a child will learn everything on his own,
    but I bet everyone will be a genius if Andrej teaches them and all of you are happy you attended his lectures at Stanford.
    I wish I had such an explanation skill one day
    I'm glad to see you on CZcams, and I hope you continue this series in the future
    I have a lot more to say, but I hope to tell you in person one day
    thank you 100 times

  • @krebul
    @krebul Před rokem +77

    I'm a traditional dev and I have tried a lot of different guides and tutorials on neural networks. This is the first time I have been able to understand it. I'm about 1/3 through the video and it's 2am. Thanks for your excellent breakdown!!!

    • @0GRANATE0
      @0GRANATE0 Před rokem +2

      Did you finish the Video? Do you now understand it? Are you able to read papers in this area and implement them?

    • @brenok
      @brenok Před rokem +4

      @@0GRANATE0 Is this some kind of suggestive question?

  • @ichidyakin
    @ichidyakin Před rokem

    Andrej, thanks for your NN video series! It’s really amazing how you explain in so simple terms how it works under the hood! Wish you all the best on your new position and hope you are going to continue making such great content!

  • @irwindennis
    @irwindennis Před rokem +1

    Wow!! I am watching this tutorial half way through and I am so stoked to learn the fundamentals of neural networks with such clear explanations. I don't remember in any of my university studies to have received a learning session as this one for a subject like this. If you are curious to learn the basics of modern ML and inner workings of neural networks, this is definitely the video to watch!!:) Thank again Andrej!

  • @treksis
    @treksis Před rokem +9

    This video reminds me of my old numerical analysis professor who forced us to draw every interpolation problem by hand as an assignment. We drew all the tangent lines with a ruler and a protractor like a kid in primary school. We were complaining because that was just a few lines of code in Matlab, but in the end, that really helped us to develop true intuition behind it. Thanks for the intuitive video.

  • @anatolianlofi
    @anatolianlofi Před rokem +8

    This is probably the simplest, most well-paced explanation of back-propagation I've seen on CZcams.
    I wish everyone would break down information in this way. Thank you.

    • @Kobe29261
      @Kobe29261 Před 2 měsíci

      Its really sad; we don't pay the smartest people enough to be teachers. You think about it and its atrocious; the problem is actually worse - people like Andrej are coopted by big corporations where their expertise and research can be hidden behind a wall of NDAs

  • @aayushjoglekarpersonal7392

    Thank you for making this tutorial! I have always been on a lookout for something like this. Normal videos either discuss super deep details or go on a brief overview. This was a perfect balance between depth and showing the actual usage of what we built. Bingeing your playlist now! :D

  • @BlooFlame
    @BlooFlame Před rokem

    Remarkably effective explanation Andrej; I was able to grasp your explanation due to how you represented the updating of nodes visually and then explained the derivative so intuitively. I was quite impressed by this lecture. I'm still halfway through but I am already subscribed and will go through your entire playlist. You are a brilliant teacher.

  • @OlabodeAdedoyin
    @OlabodeAdedoyin Před rokem +48

    The weird sense of accomplishment I felt when I visualised (draw_dot) the all the operations in its full glory is unreal 😂. Thank you for this 🙏. I'm a software engineer that has been trying to truly understand neural nets for a year now. I'm not sure you understand how much this means for me.
    I really appreciate you 🙏

  • @ChrisOffner
    @ChrisOffner Před rokem +13

    Amazing tutorial, very cool! I love that you patiently walked through a lot of manual examples - too often educators get self-conscious about showing simple steps more than once and then yada yada yada their way through it, which helps nobody. Love your teaching style and hope to see more.

  • @nyariimani7281
    @nyariimani7281 Před rokem +4

    You are really fun to watch. It's so nice to learn this from someone who really understands how everything works.

  • @punto-y-coma7890
    @punto-y-coma7890 Před 3 měsíci +4

    By far, the best neuronal networks introduction and tutorial ever made on CZcams. Thank you Andrej for sharing your valuable knowledge.

  • @Qattea
    @Qattea Před rokem +6

    Thanks for this Andrej! I love the direction you are taking. I’ve been wanting to learn this and now I get to learn from the best

  • @hefwilliams5400
    @hefwilliams5400 Před rokem +3

    Andrej, Great to see you on CZcams - you're knowledge is incredible and an asset to the community

  • @alirezamogharabi8733
    @alirezamogharabi8733 Před rokem +1

    I have been watching educational videos about neural networks for years, but no one had ever taught me like this. I know you since 2016 with your machine learning class videos. Thank you very much for these wonderful tutorials

  • @user-zb8rc3kn5j
    @user-zb8rc3kn5j Před 5 měsíci

    Thank you for implementing backpropagation and automatic differentiation in such an elegant and easy to understand way. This is the most detailed and in-depth beginner's course I have ever seen.

  • @chingizabilkasov6625
    @chingizabilkasov6625 Před rokem +4

    Thank you very much for that lecture Andrej! It really helped to understand and to combine different pieces I learned separately into one structured concept. I especially appreciated that you left the part with the bug on gradient zeroing and made an explanation for it at 2:10:24. Making mistakes and learning from them is so effective and undervalued imo. Thanks a lot!

  • @caseyleemiller1
    @caseyleemiller1 Před rokem +4

    This is an excellent tutorial not only on neural networks but python and Jupyter notebooks as well. Lost sense of self for 2.5 hours and learned a ton! Thank you.

  • @tradunskih
    @tradunskih Před 3 měsíci

    I feel a lot of gratitude to you Andrej.
    Your teaching skills are exceptional! The way you approach an explanation that considers broad backgrounds and goes into basics and refreshers from the school time is hard work. I very much respect the time and effort you put into this course and made it available for free, for humanity to improve.
    Thanks a lot Andrej!

  • @doctor6932
    @doctor6932 Před rokem +1

    When I started watching this a big smile grew on my face because it all started to click. Hours of formulas, animations, math symbols, etc. just suddenly began to make sense. Thank you!

  • @aamerabbas
    @aamerabbas Před rokem +5

    This was an incredible video. I wish I would have had this when I very first tried to learn about NNs. I would have been able to start my journey with so much more intuition on how things work. Thank you for making this - I will whole heartedly suggest this to anyone who wants to start learning about ML.

  • @user-kc3vh4xd9h
    @user-kc3vh4xd9h Před 6 měsíci +7

    Our professor highly recommended us to use your video to learn more about back propagation. You explained it so well. Thank you so much for making this video, this video really helped our study and understanding!

    • @SrikarDurgi
      @SrikarDurgi Před měsícem

      You've got a good prof.
      Many feel insecure and don't recommend anything good.

  • @JonnyDaenen
    @JonnyDaenen Před 3 měsíci +1

    Wow, I have been following several courses and trainings on neural nets, but this is exactly what I needed: a non-black-box approach that shows me in code how things work. All the abstractions are much more clear to me now! E.g. why a loss function needs to be differentiable, why you would need batches, etc. It’s all just one big expression…
    Awesome work, Andrej! 🚀 thank you for making this available! 🙏

  • @alexanderoros6484
    @alexanderoros6484 Před rokem +1

    Thank you so much for your insights into the field. I try to wrap my head around NN for so long (2001). I am so glad to finaly found a teacher that gets down to the core with the least amount of clutter and teaches me the fundamental basics. Looking foreward to the following videos where it gets more complicated and you show the history of ML with accessible examples.

  • @karthikbhaskar974
    @karthikbhaskar974 Před rokem +4

    Wow Andrej! Big Fan of your work. Looking to learn more from you about Neural Networks and you being on CZcams teaching is going to reach billions of people who wants to get into AI and learn from the amazing instructor the world has ever seen. Really loved your Stanford Computer Vision course now looking forward to more awesome content here in CZcams

  • @2ndfloorsongs
    @2ndfloorsongs Před rokem +4

    Thanks, really cleared up a few confusions for me... And added new ones. Perfect. I'm looking forward to your future videos.

  • @notgerheinz
    @notgerheinz Před rokem

    Brilliant. I have a few years of experience in the field and yet this thing did not get boring to me even one second. Awesome, easy-to-understand way to explain it, thanks! My favourite parts were how you dealt with the bugs which you had overlooked and that you did not re-shoot but fixed them on video. Very instructive!

  • @notderek7408
    @notderek7408 Před 9 měsíci +2

    Hey Andrej, idk if you'll read this but I wanted to echo others' appreciation for this fantastic introduction. I've been a SWE for many years but always ML-adjacent despite a maths background. This simple video has instilled a lot of intuition and confidence that I actually grasp what these NN's are doing and it's a lot of fuel in my engine to keep diving in. Thank you!

  • @keikaku9298
    @keikaku9298 Před rokem +3

    CS231 was life-changing for me. You are a fantastic educator. I hope this new endeavor works out for you!!

  • @antweb9
    @antweb9 Před 8 měsíci +3

    I would like to thank you from the bottom of my heart for making this. I'm a developer myself but this new advent in AI seemed unapproachable. Thanks, for making it clear that no subject is tough if you have a great teacher. I am seriously going to consider this area as a thing I want to do next.

  • @kuoldeng4568
    @kuoldeng4568 Před 3 měsíci +2

    Thank you for taking the time to do this. I'm a MSc Economics grad hoping to understand how neural networks work to start an AI startup, and your lecture is a perfect balance between depth and simplicity. Not everyone posses a natural talent for teaching and you have it!

  • @Expateer
    @Expateer Před rokem

    I'm in awe of your rare and great gift for explaining complex things in a way to make them easy to understand. My mind has many possibilities I hadn't considered before this video. I can't thank you enough for doing this.

  • @jamesdavison6290
    @jamesdavison6290 Před rokem +3

    Andrej, I am a huge fan of your previous videos. Thanks for making this investment of your time to bring us closer to these amazing concepts!

  • @agehall
    @agehall Před rokem +12

    When I took my AI course some 20 years ago, people were pretty depressed because things were too hard to compute and there was very little future in this type of thing. Awesome to see the simplicity in this and how powerful it is. We’ve really come far in the field of AI.

  • @AhmAsaduzzaman
    @AhmAsaduzzaman Před rokem

    This video on neural network creation is truly enlightening!
    It brilliantly captures the essence of how neural networks are built, providing a comprehensive understanding of their intricate architecture and function. The way it delves into the creative process behind designing neural networks showcases the immense skill and ingenuity of their creators.
    Watching this video is an enlightening and inspiring experience that leaves me with a newfound understanding of the creative process behind these powerful computational models.

  • @CarlosGranier
    @CarlosGranier Před rokem

    Hey Andrej, thanks for the very detailed and understandable explanation. I went through the NNFS book last year and your video was the perfect complement to it. The graph plots were particularly helpful in visualizing the architecture. Looking forward to watching the rest of the series.

  • @necbranduc
    @necbranduc Před rokem +5

    I already know this is going to be good. I remember watching and enjoyin your Stanford lessons on CZcams.

  • @markonjegomir8714
    @markonjegomir8714 Před rokem +4

    Nice to see Karpathy going back to making some educational content! 🙂This is a must-watch!

  • @FireFly969
    @FireFly969 Před měsícem +1

    Thank you so much Mr Andrey kaparthey, I watched and practice a pytorch course of like 52 hours and it was awesome, but after watching your video, it's seems that I was more of like learning how to build a neural network, more then how neural network works.
    With your video I know exactly how it works, and iam planning to watch all of this playlist, and see all of almost all your blog posts ❤ thank you and have a nice day.

  • @ZlatkoJoncev
    @ZlatkoJoncev Před rokem

    One of the best videos Ive seen in a while. Perfect level of explanations for someone who understands object oriented programming to expand to more complex topics. Greatly appreciated 🙇

  • @mohit9920
    @mohit9920 Před rokem +9

    That was incredible. Never has anyone been able to simplify Neural Networks in this manner for me. Please keep making such videos, you're doing gods work. By god, I mean the imminent AGI :)

  • @harrypotter6505
    @harrypotter6505 Před 10 měsíci +5

    Wow the op nodes you demonstrated this through made it so damn easy to intuit, its crazy, I have no math recall from school and didn't do any advanced math after school, nor coding
    and I had to watch this whole video in 3 or 5 passes to completely grasp what was happening, it was such an amazing journey to be absolute intimidated with the length of the video, the code, the math... I knew neither, I don't even know python to begin with, yet I was able to derive exactly all the concepts necessary to understand this video
    thank you so much Andrej!

    • @galactic_dust42
      @galactic_dust42 Před 5 měsíci

      "Derive", yes, i think that's the word ! haha

  • @mzlittle
    @mzlittle Před rokem +1

    Revisiting this again and appreciating how much of your time you put into educating the rest of us. Again, thank you!

  • @incognito7722
    @incognito7722 Před 9 dny +2

    Thanks so much sir.
    This really goes a long way for me in my career not only in ML but in every other thing.
    I will make sure to implement this in every single language i learn or have learnt.
    Once again thank you.

  • @user-nl3od6qk7z
    @user-nl3od6qk7z Před rokem +3

    Андрей, огромное спасибо! То, что ты делаешь обучающие видео просто невероятно! Спасибо!!!!!👏👏👏

  • @rhydderc127
    @rhydderc127 Před rokem +4

    Thank you so much Andrej. I'm good at coding and bad at maths and this is the first time I've been able to properly understand a lot of this stuff... I just needed someone to explain it in my language :) I went along with the first half in detail, then in the second half I built the same MLP using pytorch tensors just to prove to myself that I understood how this all applies to pytorch, and it all worked great :)

  • @ittaig
    @ittaig Před rokem

    Greate lecture - simply and thoroughly explained with neat and clear code. One of the best lectures I have ever heard. Happy to have found this treasure. Thank you, Andrej!

  • @cezarmocanu5043
    @cezarmocanu5043 Před 6 měsíci

    Honestly, I have no words. This is an amazing presentation, in terms of code, math, logic. Can't wait to continue with the other videos. Just amazing. Thank you so much for taking the time, and sharing your knowledge

  • @amkamath
    @amkamath Před rokem +4

    This video is such an unexpected treat! Thank you so much for taking the time to do this. I have followed your Twitter account since a long time but completely missed this repo. I appreciate your approach of starting with the basics, and building up an intuitive understanding from the bottom up. Your class at Stanford took a similar approach (another fantastic resource!), but this is a speedier introduction 😊

  • @siddharthdhirde
    @siddharthdhirde Před 4 měsíci +6

    I appreciate that you did not edit out your mistakes in the video.
    It helped me to understand the common pitfalls in building neural network.

  • @onthefall
    @onthefall Před 4 měsíci +1

    No amount of thanks will be enough to show how much I appreciate your lectures. They have inspired me so much!
    One day I will make amazing things with it just like you told to show my appreciation for you.
    Thank you sooooo much. 🔥

  • @FabioAngela
    @FabioAngela Před rokem

    It's really easy to see people who master stuffs and are actively into it, because they love what they do/talk about and are still excited to talk about it, I feel the same on the subject I'm focused on. Keep up the wonderful job you've done here!

  • @imtexaspete
    @imtexaspete Před rokem +449

    "remember back in your calculus class?...." nope. I'm subscribing anyway whenever I need a humble reminder that I don't know anything and there are people way way smarter than I am.

    • @omkarajagunde4175
      @omkarajagunde4175 Před rokem +8

      W
      O
      W
      Same realisation 🙌🙌😔😔😔

    • @Forrest_dev
      @Forrest_dev Před rokem +28

      It's never too late to learn.

    • @vidbina
      @vidbina Před rokem +22

      The beautiful part of tech is the feeling of constantly being mind blown when realizing how little one knows and how much there is to learn. Studying micrograd has been on my list for a while thanks to George Hotz and this series is making the owning of this context so much easier. Loving it. ❤️

    • @pastuh
      @pastuh Před rokem +3

      If someone can explain, means its simple

    • @CheeseBae
      @CheeseBae Před rokem +5

      I took through calc3 and aced it twenty years ago. If you put even the most basic calc problem in front of me now I couldn't even tell you how to start.

  • @sam.rodriguez
    @sam.rodriguez Před 10 měsíci +4

    This is fantastic. Thank you Andrej

  • @DarokCx
    @DarokCx Před 8 měsíci

    Wooow what an introduction! It is by far the best and the easiest to understand. The way you break up and simplify things in a way that we are not loosing the main focus on the WHY we are doing this, is absolutely impressive ! Thanks for sharing your knowledge.

  • @SydneyPanda2016
    @SydneyPanda2016 Před 3 měsíci

    These are amazing Andrej. Beautifully explained, logical, easy to follow. Thank you so much for generous knowledge sharing and time you put into creating the content.

  •  Před rokem +8

    As a dev, sometimes I follow along some A.I. course so I'm looking forward to follow this one!
    Thanks for sharing your knowledge.

    •  Před rokem

      Just watched the last bit.
      The python notation got really intense when Pytorch was introduced. As a non-regular Python dev, I'm going to work out some code snippets to fully grasp the example.
      But dang, so all the trouble of the gradient descent is "just" to know the direction of the optimization for each node?
      Very insightful!
      Is the mathematical capability of computing the local derivative the root cause of the local maximum trap?

  • @angelsancheese
    @angelsancheese Před rokem +6

    You’re an amazing teacher. Thank you for the video!!

  • @kozer1986
    @kozer1986 Před rokem +2

    Andrej, this is one of the best videos on the topic I've ever seen. I like to understand what is going on under the hood, so your video helped a ton, especially that you took the time to show what's happening inside pytorch and the gradual building of everything.
    I'd love to analyze more complex stuff, like attention mechanism, and other state of the art stuff which I find a hard time to follow. Also if you know if this kind of analysis already exists for those concepts, I'd love to know!
    Thanks again for your work!

  • @fjg9657
    @fjg9657 Před 7 měsíci

    Absolutely the most informative and satisfying explanation and illustration of back-propagation and NN frameworks- and perhaps educational videos in general, that I've seen. Thank you!

  • @Mutual_Information
    @Mutual_Information Před rokem +46

    Goes without saying, but you're going to blow up on CZcams. Awesome to see you in the CZcams edu space.
    Maybe I'm a little optimistic, but I think the quality could approach that of Wikipedia one day. You joining is a good sign of that.

    • @2ndfloorsongs
      @2ndfloorsongs Před rokem +1

      Not without clickbait titles and the hint that there might be an exposed body part or two. Though he does have a picture of his face making an expression, so maybe there is some hope.

    • @anasdev1553
      @anasdev1553 Před 2 měsíci

      @@2ndfloorsongs Dude... who hurt you?

    • @2ndfloorsongs
      @2ndfloorsongs Před 2 měsíci

      @@anasdev1553 Haha, I have nine cats so your guess is as good as mine. 😸

  • @NFT2
    @NFT2 Před rokem +14

    I've been working with Python for years and never implemented classes with those operator overrides. Its never too late to go back to the basics. Great video man.

    • @cantor_dust
      @cantor_dust Před 10 měsíci +1

      Fluent Python is a good book if you'd like to understand these overrides, otherwise known as dunder (double-underscore) methods.

  • @waldof86
    @waldof86 Před měsícem +1

    I've learned more following this along in some hours than I've learned in a year's worth of classes. Thank you for being so open with your knowledge

  • @ShahafAbileah
    @ShahafAbileah Před 23 hodinami

    From github: "Potentially useful for educational purposes." What an understatement. Thank you so much for this video.

  • @yuyangzhu
    @yuyangzhu Před 3 měsíci +8

    Andrej spend 10 hours making 1 hour of content, and the 1 hour content actually worth 10 hours to go through multiple times

  • @notkamara
    @notkamara Před rokem +4

    Amazing how you taught me how to solve rubiks cubes all those years ago when I was 12 and now at 22 I'm back here again learning backpropagation. You're doing God's work!

    • @aqgi7
      @aqgi7 Před 3 měsíci

      Same! I learnt F2L all those years ago and now backprop!

  • @arisu2718
    @arisu2718 Před 9 měsíci

    Thank you, Andrej! That was just PERFECT!!! I've decided to dive in neural networks yesterday and today I've successfully done it thanks to you! Your explanations are very clear, and the whole fun vibe of the video is awesome!

  • @rakotism
    @rakotism Před rokem

    Usually, watching long educative videos gives me headaches, but this time I didn't even noticed how time passed. Thank you! Also, direct connection of the loss function to the neural net was a fascinating insight! Looking forward to watch other videos!

  • @beathoven70
    @beathoven70 Před rokem +4

    Thanks so much for that video Andrej! While watching it i reimplemented micrograd in Javascript (the horror!) and with a few minor tricks got it to work quit nicely, even stuffed the actually train into the MLP class!
    I've done the Coursera course from Andrew Ng a few years ago and managed to get a full score there, but it still left me wondering a bit at the end how it all really ties together. With your 2 1/2h lecture here it finally clicked for me and now i really understood how it works under the hood!

  • @TheAIEpiphany
    @TheAIEpiphany Před rokem +4

    58:41 "As long as you know how to create the local derivative - then that's all you need". Ok Karpathy. Next paper title "Local derivatives are all you need".
    Nice to see you on CZcams! :))

  • @curatorsshelf393
    @curatorsshelf393 Před rokem

    Andrej, Thank you very much for this tutorial. I am new to Neural Networks and I am glad I found your lesson on YT. Not only neural networks, but the amount of information outside this topic was also significant. I don't have a com science background and I learned so many concepts that I was not familiar with. I tried to read various textbooks and thought I understood the concepts. But after following through this lesson, I understood the difference between abstract comprehension and actual comprehension gained from implementation. Thank you thank you

  • @timbuthfer901
    @timbuthfer901 Před 8 měsíci

    Simply superb Andrej! Before watching the video I tried to write my own simple NN library but your examples are so much better. I have learnt so much following your videos.

  • @yashsurange7648
    @yashsurange7648 Před rokem +11

    It is amazing to see an AI leader sharing knowledge here

  • @curious_carbon
    @curious_carbon Před rokem +4

    Andrej, thank you so much for doing this 🙏. If all the 10X Engineers out there would do stuff like this, I think it would really boost our collective human intelligence by a significant lot. I appreciate your effort, and looking forward for more content 🤞. Also I hope that you do get to return at Tesla so you can contribute to Optimus👍. Looking forward to your future accomplishments 🚀

  • @mr.anderson5077
    @mr.anderson5077 Před rokem

    Extremely lucid, crisp and a splendid explanation of Neural Nets from ground zero.
    @Andrej Karpathy you are a God send, thanks for all your efforts and time from your busy schedule.
    I would love to see an extension of the Micrograd featuring forward-forward propagation by Hinton in future.
    Thank you for existing, we are blessed to have you.

  • @rohanshah9593
    @rohanshah9593 Před 11 měsíci +1

    It feels good to learn from someone well known in the industry. Thank you for sharing. I have learned a lot from a practical perspective and look forward for more. Really appreciate these videos!

  • @margaretesulzberger2973
    @margaretesulzberger2973 Před rokem +3

    it is a very dense and inspiring lecture on scalar valued Neural Nets.
    I saw lectures from universities which also start with scalars and computational graphs but have a strict separation between theory and exercises for which they often use proprietary programming environments. This combination of theory explained/programmed simultaneously with commonly accessible python packages is unique.
    Your explanations were sometimes a bit short on python “magic methods” like “__radd__” but mostly I found hints with google.
    But not so for “ lambda: None” or “def _backward(): … “ and then “out._backward = _backward”?
    I’m waiting for a continuation with vectors and matrices.

  • @roddlez
    @roddlez Před rokem +65

    As someone who took Stanford's CS231n back in 2016 purely through watching the lectures and working though each assignment, this definitely strikes me as getting back to your educational roots. I do wonder how difficult it will be for others who do not have the background to approach this material.
    Conceptually, thinking about the training process of forward pass, calculating the loss, backprop, nudge on modern NNs with billions of parameters: from a computation standpoint, this requires many simultaneous reads from and updates to memory to/from the CPU/GPU, even for a single pass of data. Thinking from first principles, it would seem advantageous to assemble a custom computer architecture that would allow the entire NN math function (with billions of parameters) to remain in computational memory (registers) while doing forward and back propagation, thus saving time trying to load/unload/store updated values for weights and biases?
    Is there a company that's attempting to accomplish such a feat?

    • @AndrejKarpathy
      @AndrejKarpathy  Před rokem +121

      your insight is exactly right. current computer architectures spend most of their time and energy shuttling data to/from memory, through the "von Neumann bottleneck", and calculating little pieces of the neural net at a time. this is not how it should be laid out and it is not how the brain works either, and yes many people are aware and working out various improvements. basically, "classical software" and "neural net software" need very different hardware for optimum efficiency and all the neural nets today run in "emulation mode".

    • @roddlez
      @roddlez Před rokem +8

      @@AndrejKarpathy Amazing. Super excited for the future of ML.

    • @elonfc
      @elonfc Před rokem +15

      @@AndrejKarpathy do you have elons phone number?😂

    • @The_Special_Educator
      @The_Special_Educator Před rokem

      @@AndrejKarpathy You never responded with Elon's phone number. If you want to maintain your credibility you must post Elon's personal phone number, address, and underwear size in the CZcams comment section.

    • @unchaineddreameralpa
      @unchaineddreameralpa Před rokem

      Joking

  • @asatorftw
    @asatorftw Před 6 měsíci

    Watched this again, and its still blowing my mind how useful this tutorial is. Thank you Andrej!

  • @wangcwy
    @wangcwy Před měsícem

    The best ML tutorial video I have watched this year. I really like detailed example, and how these difficult concepts are explained in a simple manner. What a treat for me to watch and learn!

  • @TeslaFix
    @TeslaFix Před rokem +3

    Hey Andrej! I’ve watched the first 8 min so far! Super stoked to watch it even if I’m not a programmer. 😊 Would love to have you on my TeslaFix Podcast! ❤️