Tensors for Neural Networks, Clearly Explained!!!

Sdílet
Vložit
  • čas přidán 5. 05. 2024
  • Tensors are super important for neural networks, but can be confusing because different people use the word "Tensor" differently. In this StatQuest, we clear this up and tell you what the big deal is. BAM!
    NOTE: If you are not already familiar with Neural Networks, check out the Neural Network playlist: • The Essential Main Ide...
    For a complete index of all the StatQuest videos, check out...
    app.learney.me/maps/StatQuest
    ...or...
    statquest.org/video-index/
    If you'd like to support StatQuest, please consider...
    Buying my book, The StatQuest Illustrated Guide to Machine Learning:
    PDF - statquest.gumroad.com/l/wvtmc
    Paperback - www.amazon.com/dp/B09ZCKR4H6
    Kindle eBook - www.amazon.com/dp/B09ZG79HXC
    Patreon: / statquest
    ...or...
    CZcams Membership: / @statquest
    ...a cool StatQuest t-shirt or sweatshirt:
    shop.spreadshirt.com/statques...
    ...buying one or two of my songs (or go large and get a whole album!)
    joshuastarmer.bandcamp.com/
    ...or just donating to StatQuest!
    www.paypal.me/statquest
    Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
    / joshuastarmer
    0:00 Awesome song and introduction
    1:34 Why we need Tensors
    4:52 Tensors store data
    6:51 Tensors have hardware acceleration
    7:37 Tensors have automatic differentiation
    #StatQuest #Tensors #NeuralNetworks

Komentáře • 261

  • @statquest
    @statquest  Před 2 lety +12

    To learn more about Lightning: github.com/PyTorchLightning/pytorch-lightning
    To learn more about Grid: www.grid.ai/
    Support StatQuest by buying my book The StatQuest Illustrated Guide to Machine Learning or a Study Guide or Merch!!! statquest.org/statquest-store/

    • @THEMATT222
      @THEMATT222 Před 2 lety +1

      Oh ok 👍

    • @rskandari
      @rskandari Před rokem +1

      Can you please do a video on transformers?

    • @statquest
      @statquest  Před rokem

      @@rskandari I'm working on one.

  • @jinyunghong
    @jinyunghong Před 2 lety +83

    Me reading ML papers and finding tensors: Ugh
    Me watching StatQuest and finding tensors: Triple BAM!!!

  • @kousthabkundu1996
    @kousthabkundu1996 Před 2 lety +99

    I almost quit understanding cnn with the fancy jargons all over the internet. After watching your playlist, you gave me ray of hope. You are freaking genius of explaining things in simplicity. hope to see your playlist with advance cnn topics (object detection, semantic segmentation and siamese network). Thank You 3000

  • @raven-888
    @raven-888 Před rokem +35

    "Mathematicians and machine learning people define tensors in different ways".
    This one sentence made a world of difference for my learning.
    May be it's just me; but I can't thank you enough.

    • @statquest
      @statquest  Před rokem +1

      Thank you! :)

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

      ​@@statquest Thanks man. Most statements you made really were eye openers in this field. Thank you again.

  • @RezaSalatin
    @RezaSalatin Před rokem +28

    You rock! I learned much more from your series in NN in 3 days than sitting in a machine learning class for one semester!

  • @alexandruianosi8469
    @alexandruianosi8469 Před rokem +8

    I thought that I understood ANN, but now I feel that everything is so much more intuitive. Thank you!

  • @reinasama904
    @reinasama904 Před 2 lety +16

    I can't thank you enough sir, this is so well explained i'm almost crying. Thank you so much for your efforts I'll definitely buy some of the study material you offer when I will be able to.

  • @atlantaguitar9689
    @atlantaguitar9689 Před 2 lety +9

    Cool. I just gave a lecture today on how to do linear regression with Pytorch using basic tensor operations. I'm sure your presentation will be great!

  • @jamm9848
    @jamm9848 Před 2 lety +25

    So excited I’ve been trying to understand tensors can’t wait 🥳

  • @subodhacharya3955
    @subodhacharya3955 Před 2 lety +1

    Very well explained with those interesting pictorial representations of inputs, activation functions, and all.

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

    Thank you very much for all the effort you put into your presentations! and thank you for making it as fun, simple and useful as possible! You're the best dude out there! 💘💘

  • @annapeng88
    @annapeng88 Před 2 lety +2

    Finally I am not confused as I did not know ML tensor is different from the tensor in maths (even though I still don't know how GPU works)! Thank you!!!

  • @user-jc7yn5ro9z
    @user-jc7yn5ro9z Před 2 lety +5

    The best channel I've ever seen for data science ❤️

  • @markmalkowski3695
    @markmalkowski3695 Před 2 lety +4

    Your videos are great!! I just saw your video on decision trees and you explained the concepts so clearly, I immediately subscribed.
    Would you ever go over Patient Rule Induction methods (PRIM)? It seems like a really interesting algorithm in OLAP contexts, but all I really see of it are complicated, math-notation-heavy white papers and patent applications that tweak the original to be more efficient (but use their own made up lexicon to describe it).

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

    You are the best teacher on my list !!

  • @majormickey9806
    @majormickey9806 Před rokem

    Loved it. Great vid. An ML explainer I can actually understand. Exciting, such BAM! Gonna watch everything else next. I should take your ML course, I assume you have one -- with exercises and such?

    • @statquest
      @statquest  Před rokem

      I don't have a course yet. I hope that one day I will. :)

  • @endunry
    @endunry Před rokem +1

    I have a cs study project aboug GNNs and was looking up Tensors. And i was hit by the agony of Tensors in the Context of deep mathematics and physics. The moment i open a CS Video about Tensors im met with music and good vibes

  • @tagoreji2143
    @tagoreji2143 Před rokem

    Simple and nice Tutorial Professor. But,
    Expected an In-depth and more ComprehensiveTutorial about Tensor.
    Thank you Professor.

  • @mahesh1234m
    @mahesh1234m Před 2 lety +10

    Very well explained as usual. Can we have one video for Automatic Differentiation also please?

  • @valentinthonen7120
    @valentinthonen7120 Před 2 lety +2

    I love your videos about neural networks, could you also make some videos about policy gradients, which tend to be nice for continuous data.

  • @vedachintha
    @vedachintha Před rokem +4

    Sir, you have taught me more in few videos than my Professors did in 1 full year. I am ever grateful to you.
    Also, could you please do more videos on Tensor flow (theory part e.g., eager/graph execution, name scopes, placeholders etc.)?

    • @statquest
      @statquest  Před rokem +1

      I'm doing PyTorch right now if you are interested in that. Just search for PyTorch on this page: statquest.org/video-index/

  • @nikolakalev4914
    @nikolakalev4914 Před rokem +1

    Thank you for this really good explanation!

  • @hrithiklanghi6418
    @hrithiklanghi6418 Před 2 lety +1

    Just got video at the right time and I already kniw after seeing this video i will have my concepts cleared

  • @karddoespiano2300
    @karddoespiano2300 Před 2 lety +1

    I literally needed this

  • @mattkriese7170
    @mattkriese7170 Před rokem +1

    Subbed. I need more StatQuest in my life.

  • @_epe2590
    @_epe2590 Před 2 lety +7

    It would be great if you did a video covering automatic differentiation next!

  • @ayeshavlogsfun
    @ayeshavlogsfun Před 2 lety +1

    Thanks for sharing after a Long time

  • @souravdey1227
    @souravdey1227 Před 2 lety +1

    Sir, please continue this series on Tensors. Especially tensor factorization.
    Please.

  • @abhinavsingh4052
    @abhinavsingh4052 Před 2 lety +2

    Whoaaa!
    That is a very clear and fun explanation, never learned like this.
    Feeling Blessed
    [Edit: This Guy is seriously Under Rated]

  • @thuanlyhoang9872
    @thuanlyhoang9872 Před 2 lety +2

    This is what I am waiting for BAM!!!

  • @zhou6486
    @zhou6486 Před rokem +1

    looking forward to more fancy topics in Deep Learning. Btw, thanks for sharing.

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

    You are amazing bro ! Thanks for the amazing vidoes.

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

    Hi Josh! Thank you for all your amazing videos! Can you make a video about Graph Neural Network? Thanks a lot!

  • @jimparsons6803
    @jimparsons6803 Před 11 měsíci

    Interesting. Thanks. I come from manifold/engineering point of view. Which turns out to be a useful mental tool for some sorts of chemistry. Y' have to imagine, often, how some sorts of molecules interact. Using or having a background in manifold or Linear Algebra, turns out an excellent adjunct. Who knew? I thought that the maths were just a lot of fun at the time.

  • @Pedritox0953
    @Pedritox0953 Před 2 lety +1

    Excellent video!

  • @BillHaug
    @BillHaug Před 9 měsíci +1

    perhaps a top 3 jingle, I really enjoyed it. Even with time to reflect, I am going with: 1) Statquest, its bad to the bone; and 2) were going to do a lot of maths step by step by step... statquest ...the bangers

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

      This is definitely one of my favorites. I also really like this one: czcams.com/video/azXCzI57Yfc/video.html

  • @PritishMishra
    @PritishMishra Před 2 lety

    Nice video... btw any plan on making videos on transformer neural networks and attention?

  • @Vessel__02
    @Vessel__02 Před 2 lety +1

    Would you be able to make a video on how tensors support automatic differentiation?

    • @statquest
      @statquest  Před 2 lety

      That's a good idea. I'll keep that in mind.

  • @jawadmansoor6064
    @jawadmansoor6064 Před rokem +1

    I liked the intro.
    Tensormaster!

  • @dosadoodle
    @dosadoodle Před 2 lety +5

    Why such a long delay from the time this video is posted to time it is actually available? A full week seems excessive...

    • @statquest
      @statquest  Před 2 lety +2

      This is the first time I've even tried doing a Premiere so I have no idea what the normal procedure is. How long do people usually have to wait? I picked a week out simply I thought 1) it would be fun to try a premiere (since I've never done one before and want to see what it is like) and 2) I'm all booked until a week from today. Would it be better to not announce the video/premiere until later this week?

    • @dosadoodle
      @dosadoodle Před 2 lety +4

      @@statquest I'd suggest 4-24 hours between upload and the release time, maybe up to 48 hours for a major event release. The reasons it is awkward to set a longer delay:
      1) For people who get notifications, unless it is a premiere for an unusually important video that they should indeed be looking forward to as an event, it can be annoying to get notified about something that can't be watched for multiple days.
      2) The video gets added to the Subscriptions feed right away (as a Premiere), even though it isn't watchable until the date. So it just sits there cluttering the feed. This can have two effects: (a) For people who hide videos after they've watched them in this feed, it's tempting to just hide the video if it is sitting there for too long. (b) And for those that don't use the "hide" feature, the video will also be buried by the time it goes live even if it is resurfaced at the release. In this second case, the value of the Premiere is largely lost, because the reminder was buried under a bunch of other videos for several days, so the value of a reminder via Premier doesn't do much good.
      That's my line of thinking anyways.

    • @statquest
      @statquest  Před 2 lety +1

      Awesome!!! Thanks for the tips!!! I really appreciate it. I'll keep this in mind for the next Premiere that I do.

  • @xyZenTV
    @xyZenTV Před 2 lety +1

    I would really love it if you could do a video on Projection Pursuit Analysis, since there aren't any great videos explaining the statistical underpinnings. Thanks for the excellent content as always!

  • @HAWk2k25
    @HAWk2k25 Před 2 lety

    Could u also make one for the assumptions of linear and logistics regression

  • @iliasaarab7922
    @iliasaarab7922 Před 2 lety +3

    Super excited for this one!

  • @adrianwalchli8407
    @adrianwalchli8407 Před 2 lety +2

    Uhhahah, boxes with numbers inside🤗. Very exciting!! They come in different colors, right? 🤩

  • @yjchoi1561
    @yjchoi1561 Před rokem +1

    I am in love with tensors after seeing your video🤣

  • @LindyXLindy
    @LindyXLindy Před rokem +1

    I live for the guitar intro and BAMs

  • @mPajuhaan
    @mPajuhaan Před rokem +1

    Very interesting way to teach :)

  • @grabbenskarve3518
    @grabbenskarve3518 Před rokem

    Could you do a video about "Bach training", or what it is called :), and how all partial derivatives are handeld in those situations? For example if they are added into a sum, or that the average derivative is calculated.

    • @statquest
      @statquest  Před rokem

      For details on "batch training" see my video on Stochastic Gradient Descent: czcams.com/video/vMh0zPT0tLI/video.html Also, whether or not we add or average the derivatives depends on the loss function. If we use the Sum of the Squared Residuals, we simply add. If we use Mean Squared Error, we use the average.

    • @manujarora5062
      @manujarora5062 Před rokem

      @@statquest not clear about what you mean by adding the derivatives.
      Are you referring to adding the derivative to weight/ bias ?

    • @statquest
      @statquest  Před rokem

      @@manujarora5062 For each data point, we calculate the derivative. We can add them, or we can average them. For details, see: czcams.com/video/sDv4f4s2SB8/video.html

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

    Great video. I dont see that tensors in math and physics are somehow different from Ml, though, because they are still the same tool, just with different applications. You still even have Einstein's summation notation (Einsum).

  • @mohammadidreesbhat1109
    @mohammadidreesbhat1109 Před 9 měsíci +1

    BAM, BAM, BAM, BAM..................BAM.. Great Sir

  • @superk9059
    @superk9059 Před 2 lety +2

    Sorry, Mr.Josh, I can't watch the premiere, because my area is 01:00 at that time😂😂😂 I will definetly watch the video the 2nd day🤔🤔🤔👍🏻👍🏻👍🏻

  • @exxzxxe
    @exxzxxe Před 9 měsíci +1

    I am in a bit of a quandary- trying to decide, of your skills, which is superior: you skill as a singer or your skill as a teacher of Machine Learning!

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

      bam! :)

    • @exxzxxe
      @exxzxxe Před 9 měsíci +1

      @@statquest I should add; both skills are extraordinary!

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

      @@exxzxxe You're too kind!

  • @TheLeoPoint
    @TheLeoPoint Před rokem

    😆let's go ,I think I can't able to sleep well tonight ,i need at least 3 day to proper classification n get command on it , but as always it's really help me a lot to clear my all the doubts n confusion 💥 💥 double bam 😄 👍

    • @statquest
      @statquest  Před rokem

      :)

    • @TheLeoPoint
      @TheLeoPoint Před rokem +1

      @@statquest thanks from bottom of my heart sir lots of ppl getting skills base quality knowledge 🙏👍

  • @ChocolateMilkCultLeader
    @ChocolateMilkCultLeader Před 2 lety +1

    Me everytime Josh uploads: YIPPEEEEE

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

    Thank you, i was about to leave this planet because of the wonderful people who are given the task to teach students about ML but cant teach a thing and give zero when they fail eventually.

  • @rusundevelopment7674
    @rusundevelopment7674 Před 2 lety +1

    StatSquatch is totally awesome!

  • @sallu.mandya1995
    @sallu.mandya1995 Před 2 lety +1

    thanks

  • @aayushjariwala6256
    @aayushjariwala6256 Před 2 lety +2

    Hoping that you are gonna make a series on CNN from this video🤞

    • @statquest
      @statquest  Před 2 lety +2

      I have a video on CNNs here: czcams.com/video/HGwBXDKFk9I/video.html however, in the future I plan on more applied videos that show how to do it in PyTorch-Lightning.

  • @hamman_samuel
    @hamman_samuel Před 2 lety +1

    Everyone: Darth Vader is the greatest villain to Luke Skywalker's hero
    StatQuest: Bam, meet Ugh

  • @HardFault0x00
    @HardFault0x00 Před 2 lety

    Sooo, tensor is array or ndarray with extra properties for storing neuralnet weights and bias?

    • @statquest
      @statquest  Před 2 lety

      Yes, and they store your data so that you can take advantage of hardware acceleration and automatic differentiation.

    • @manujarora5062
      @manujarora5062 Před rokem

      Indeed tensors are also storing inputs and output values.

  • @BillHaug
    @BillHaug Před rokem +1

    Another banger

  • @muhammedyavas5765
    @muhammedyavas5765 Před rokem

    I think that would be awesome for GRU units and we can compare with LSTM. Please !!!

  • @jeffersonmcgee9560
    @jeffersonmcgee9560 Před 10 měsíci

    My only question is: Why can tensors run in gpus? I've been trying to find information on it for the longest time and still found nothing.
    Why can't numpy arrays be stored in GPU?
    Thanks in advance!
    PS: Thanks to statquest, I was able to pass my data science class!!

    • @statquest
      @statquest  Před 10 měsíci

      GPUs have their own instruction set, which is different from what you find on a standard GPU, so you have to code for that specifically. For details, see: en.wikipedia.org/wiki/CUDA

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

    Hi, I Need a more Advanced video about tensors... The feed forward step can be written as g(Wx+b) where W is square weights matrix, x is the input vector, b is the bias and g the activation function.. now. What if x is not a Vector, but Is a Matrix or a cube? I Need the generalized algorithm for feedforward step. There Is no place on the internet with that algorithm. Thank you

  • @THEMATT222
    @THEMATT222 Před 2 lety +1

    Ooo0Oooo very exciting!

  • @DanjasLP
    @DanjasLP Před rokem

    So Tensors are basically just faster matrices?
    And also, is there a difference between tensors and safetensors when talking about image generation AI?

    • @statquest
      @statquest  Před rokem

      Tensors also have automatic differentiation. And, as far as I can tell, "safetensor" is a way to store tensors on disk that comes with some nice features, like not having to load the entire file into memory in order to inspect the values.

    • @DanjasLP
      @DanjasLP Před rokem

      @@statquest Ahh okay, I think I got it now :) Thanks a lot!

  • @BooleanDisorder
    @BooleanDisorder Před 2 měsíci +1

    This was tense 😊

  • @davidj9977
    @davidj9977 Před rokem

    "Tensor cores are processing units that accelerate the process of matrix multiplication", so then we're calling them Tensors instead of Matricies, so we can use Tensor cores, which multiply matricies. Makes sense.

    • @statquest
      @statquest  Před rokem

      Unfortunately Neural Networks have lots of terminology along these lines.

    • @andrewdunbar828
      @andrewdunbar828 Před 10 měsíci

      Well tensors are generalized matrices not limited to two dimensions to matrices so just as 2D concepts are useful in our 3D world I'm assuming matrix operations are useful in tensors.

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

    The simple explanation is that a tensor is something that transforms like a tensor

  • @funsupervised
    @funsupervised Před rokem +1

    Subscribed just for that intro

  • @Antz_411
    @Antz_411 Před rokem

    Little slow, but great explanation.
    Thanks!

    • @statquest
      @statquest  Před rokem

      Thanks!

    • @Antz_411
      @Antz_411 Před rokem +1

      @@statquest No no, thank you!!
      At 1.25 speed it was awesome!

    • @statquest
      @statquest  Před rokem +1

      @@Antz_411 1.25xBAM!!!

  • @charitarthchugh3988
    @charitarthchugh3988 Před 2 lety +2

    BAM!

  • @gbchrs
    @gbchrs Před 2 lety +1

    exciting 😆

  • @hellochii1675
    @hellochii1675 Před 2 lety +2

    9:02 shameless self promo -> proudly self promo 😆 😆 😆

  • @yanbowang4020
    @yanbowang4020 Před 2 lety

    Why SMOTE video is gone?

    • @statquest
      @statquest  Před 2 lety

      I haven't done a video on SMOTE yet...

  • @gama3181
    @gama3181 Před 2 lety +1

    Ugh math ? Anti-BAM!!!
    Awesome explanation :) !!
    I'm biologists and used to think that tensors in math and ML are the same ! Anyone knows how to think them ?

    • @statquest
      @statquest  Před 2 lety +1

      The tensors from math have specific mathematical properties that are completely ignored by people that do neural networks.

    • @gama3181
      @gama3181 Před 2 lety +1

      @@statquest thank you Josh :)

  • @ebeb9156
    @ebeb9156 Před 2 lety +1

    Tensors for students, their mamas and papas
    Tensor for breakfast and thoose whos from Belfast
    Bim para bam bom paw...
    StatQuest ! 💘

  • @LuizHenrique-qr3lt
    @LuizHenrique-qr3lt Před 2 lety +1

    RNN, NLP and word embedding pliss !!! Tkss!!!

  • @niceday2015
    @niceday2015 Před 2 lety +1

    Bam! Tensor is flowing

  • @HakikatBirSinghBhatti
    @HakikatBirSinghBhatti Před 2 lety +1

    Bamm !!!

  • @bahayesilyurt9433
    @bahayesilyurt9433 Před 2 lety +3

    they be creating tension. thas it

  • @meguellatiyounes8659
    @meguellatiyounes8659 Před 2 lety +2

    Automatic Differentiation

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

    I remember being just as annoyed at teachers talking like this when I was 6. I'm 60 now, and luckily I can just walk out of the room or find another video.

  • @creativeprojectsmaker6113
    @creativeprojectsmaker6113 Před 8 měsíci +1

    triple bam,!!!!!!!!!!

  • @fatihozgurardc310
    @fatihozgurardc310 Před 2 lety

    Waiting for vanishing and exploding(BAMMM) gradients!

  • @Byyaroff
    @Byyaroff Před rokem +1

    BAMM!!!

  • @kuntalnr
    @kuntalnr Před 2 lety +1

    I love you

  • @THEMATT222
    @THEMATT222 Před 2 lety +2

    Noice 👍

  • @JapiSandhu
    @JapiSandhu Před 2 lety +1

    BAM

  • @shamsulazhar
    @shamsulazhar Před 2 lety +1

    Oh wow! He's gone heavy metal now.

  • @vic11du06
    @vic11du06 Před 2 lety

    I have a Deep Learning exam in two days, so thanks I guess

  • @geethikaisurusampath
    @geethikaisurusampath Před 8 měsíci +1

    😃

  • @younesselhamzaoui6783
    @younesselhamzaoui6783 Před 2 lety

    Thank you. HOWEVER, NO ENOUGH EXPLANATION. I'D LIKE TO ASK YOU TO THIS TUTORIAL WITH MORE DETAILS AND VERY SLOW! PLEASE

  • @JapiSandhu
    @JapiSandhu Před 2 lety +1

    WAAAHHWAHHHH

  • @PriyanshuSingh-hm4tn
    @PriyanshuSingh-hm4tn Před 11 měsíci +1

    goood

  • @sketchytv1321
    @sketchytv1321 Před 2 lety +2

    7 Days ah

    • @statquest
      @statquest  Před 2 lety

      This is the first time I've even tried doing a Premiere so I have no idea what the normal procedure is. How long do people usually have to wait? I picked a week out simply I thought 1) it would be fun to try a premiere (since I've never done one before and want to see what it is like) and 2) I'm all booked until a week from today. Would it be better to not announce the video/premiere until later this week?

    • @sketchytv1321
      @sketchytv1321 Před 2 lety

      plz give us 24 hrs Notice

    • @statquest
      @statquest  Před 2 lety +2

      @@sketchytv1321 That's the plan from here on out. I did a poll and most people responded that 24 hours was the sweet spot. Thank you!

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

    NOOO MATH IS NOT UGHH, ITS AWESOMEEEE

  • @cool_sword
    @cool_sword Před 2 lety +1

    It's always helped me to remember that a tensor is a thing that transforms like a tensor, but a *tensor* is a thing like a thing that transforms like a tensor but which may or may not trandform like a tensor.

  • @Charles-tw4qs
    @Charles-tw4qs Před 2 lety +1

    💋

  • @sxx2491
    @sxx2491 Před rokem +1

    once again, saved my ass