Simple reverse-mode Autodiff in Julia - Computational Chain

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

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

  • @liangli-wei9316
    @liangli-wei9316 10 месяцев назад

    Man this is great. Thanks!

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

    One time you evaluated the derivate at 1.0 instead of 2.0, why did you get the same result?

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

      Ah it needs the cotangend at this point

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

      Great question! 😊
      Yes, you figured it out. The pullback at lines 57 and 61 give the derivative if evaluated at 1.0. Since they effectively evaluate the vector-Jacobian product we need to provide a vector (here just a scalar) to left-multiply the Jacobian with. Using just 1.0 gives the unscaled derivative.