Dive Into Deep Learning, Lecture 2: PyTorch Automatic Differentiation (torch.autograd and backward)

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น • 44

  • @michaelscience2481
    @michaelscience2481 3 ปีที่แล้ว +12

    This is what I was searching for months. I m so thankful Dr. Science for breaking down this concept for us

    • @DrDataScience
      @DrDataScience  3 ปีที่แล้ว

      I'm glad you find it helpful!

  • @adnanhashem98
    @adnanhashem98 3 หลายเดือนก่อน +1

    In my opinion, what makes this a great video is its (quick) review of the prerequisite knowledge, and including simple examples to that we can compute by hand and then verify that we actually get the same thing when using PyTorch.
    Thanks a lot!

    • @DrDataScience
      @DrDataScience  3 หลายเดือนก่อน

      Thank you for the nice comment! Glad this video was helpful.

  • @sktdebnath
    @sktdebnath ปีที่แล้ว +4

    This is what a proper tutorial should be. Thanks a lot. Subscribed

  • @sadpotato5111
    @sadpotato5111 ปีที่แล้ว +1

    This video deserves more view.

  • @atanudasgupta
    @atanudasgupta ปีที่แล้ว +2

    Excellent videos and the textbook, deeply admire your contributions

  • @reddysekhar3765
    @reddysekhar3765 2 ปีที่แล้ว +2

    Truly thankful to you. To the point without confusion. Thank you once again

  • @홍성의-i2y
    @홍성의-i2y ปีที่แล้ว +1

    14:50 x.grad contains the valuesd of partial{y} / partial{x}
    17:50 x.grad.zero_()
    25:00 gradient for multiple inputs -> multiple outputs. Since the Jacobian is a matrix, we need to input a 1-d tensor to get a valid vector-output. => But our loss function has been a scalar, so this is why I am not accustomed to this form.
    34:10 explaining .detach(). => treat those as constants, not a variable that we differentiate w.r.t.

  • @ItahangLimbu
    @ItahangLimbu 3 หลายเดือนก่อน +1

    24:10
    y.backward(torch.ones(3))
    the input to y.backward is upstream gradient
    and the size of the upstream gradient should be same as the size of y
    and in previous cases we dont need insert upstream gradient cause
    y,backward() same as y.backward(torch.tensor([1]))

  • @azzyfreeman
    @azzyfreeman 2 ปีที่แล้ว +1

    Thanks for the video, it really cleared up Pytorch autograd, now I will be making notes on this gold nugget

  • @parisahajibabaee2893
    @parisahajibabaee2893 3 ปีที่แล้ว +2

    Amazing as always!! Very helpful and valuable video!

  • @ГеоргийЧерноусов-о9ъ
    @ГеоргийЧерноусов-о9ъ 2 ปีที่แล้ว +1

    Nice explanation. Found it from youtube recomendations

    • @DrDataScience
      @DrDataScience  2 ปีที่แล้ว

      I am glad you found it helpful!

  • @edd-bp8mj
    @edd-bp8mj 3 ปีที่แล้ว +5

    why do you need to multiply v vector to the jacobian matrix? and what is v vector exactly?

  • @nitinsrivastav3541
    @nitinsrivastav3541 6 หลายเดือนก่อน

    thanks man i was finding it extremely difficult to understand the maths behind backward and detach (although i have doen it in my high school) because no one was explaining them in this depth.........love you 😍😍

  • @nicolaemaria4380
    @nicolaemaria4380 3 ปีที่แล้ว +1

    great explanation! I hope it will get the likes it deserves

  • @asfandiyar5829
    @asfandiyar5829 ปีที่แล้ว +1

    Thank you sooo much! This finally clicked for me.

    • @DrDataScience
      @DrDataScience  ปีที่แล้ว

      I am glad you found it helpful!

  • @AJ-et3vf
    @AJ-et3vf 2 ปีที่แล้ว +1

    Awesome video! Thank you!

  • @Gibson-xn8xk
    @Gibson-xn8xk 2 ปีที่แล้ว +1

    First of all, I want to express my gratitude to you for the work you have done. There is one thing i want you to ask: why do we write the partial derivatives of the scalar function in the form of column? Whereas, following the logic of Jacobian matrix, it should be a row. Thanks in advance!

  • @rohithpeesapati8840
    @rohithpeesapati8840 2 ปีที่แล้ว +1

    thank you very much for uploading this video! very helpful!

  • @YujiaoZhao-m5r
    @YujiaoZhao-m5r 11 หลายเดือนก่อน

    way better than my prof...

  • @greender644
    @greender644 ปีที่แล้ว

    29:49 - As far as I understand in 'a.grad' should turn out [12., 18.]

  • @md.zahidulislam3548
    @md.zahidulislam3548 2 ปีที่แล้ว +1

    Thanks a lot.

  • @azharhussian4326
    @azharhussian4326 ปีที่แล้ว +1

    Thank you

  • @arpit743
    @arpit743 3 ปีที่แล้ว +2

    hi !! thanks for the wonderfull video :) can you please explain why vector v is 1?? and what is derivative w.r.t to self??

    • @DrDataScience
      @DrDataScience  3 ปีที่แล้ว +1

      The derivative of any variable. let's say x, wrt itself, i.e., x, is equal to 1. That is why we use a vector of v of all ones. If for some reason, you want to exclude one variable from the gradient vector, you can then replace the corresponding entry of v with 0.

    • @arpit743
      @arpit743 3 ปีที่แล้ว

      @@DrDataScience that does make sense thanks! But why do we multiply with v or ones what does the dot product of jacobian and vector v represent? Why do we multiply derivative of self with jacobian?

  • @ramincybran
    @ramincybran 7 หลายเดือนก่อน

    thnks myfriend - in last section - whats is the z.sum ? what is the the (SUM) function for ? why yyou put the sum ?

  • @callpie2398
    @callpie2398 ปีที่แล้ว

    Please Do cover a playlist on Graph Neural Networks (at least discuss all the basics and methods of GNNs). The internet world lacks quality contents on this topic

    • @DrDataScience
      @DrDataScience  ปีที่แล้ว

      Great suggestion! I'll work on it.

  • @mahdiamrollahi8456
    @mahdiamrollahi8456 2 ปีที่แล้ว

    The way you define the y is different from what i am thinking.
    In first example, I thought we should define y as x**2 or in second one y as x. But if i define the y like this, I will get an error which say that it needs just one number not sequence of numbers.

    • @mahdiamrollahi8456
      @mahdiamrollahi8456 2 ปีที่แล้ว

      Oh I got it. But i did not get what v vector is?

  • @vtrandal
    @vtrandal 2 ปีที่แล้ว

    Fixed your broken web page that forces us to bend to your flaws.

  • @vtrandal
    @vtrandal 2 ปีที่แล้ว

    No!