PyTorch Lightning Tutorial - Lightweight PyTorch Wrapper For ML Researchers

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

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

  • @patloeber
    @patloeber  4 года назад +28

    Let me know if you like this wrapper framework or not :)

    • @amirm7373
      @amirm7373 3 года назад

      yeah it is quite good; But there is some subtle tricks which you have to know

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

      yes but how to open the app local .. as to get aproved for the online studio is a nightmare and its been months !
      so local is the best method !

  • @timmervyn6663
    @timmervyn6663 3 года назад +14

    Many thanks for your work on this series. It is much appreciated. One point to make about this tutorial is that the code for interfacing PyTorch Lightning with TensorBoard has changed.
    Now Lightning uses Loggers and fortunately TensorBoard is its default logger.
    To get your code to work on the latest TensorBoard replace, or comment out, these two lines in the training_step function:
    # tensorboard_logs = {'train_loss': loss.detach()} and
    # return {'loss': loss, 'log': tensorboard_logs} with the simpler
    self.log("train_loss", loss ) # and then just
    return loss
    Make similar changes in the validation_epoch_end function usin:
    self.log("val_loss": avg_loss)
    return avg_loss
    to replace the original two lines which used a dictionary format as shown above.
    Thanks again for your wonderful work. I hope to soon see a PyTorch tutorial on
    autoencoders!

    • @patloeber
      @patloeber  3 года назад +2

      good to know, thanks!

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

      Thank you!

    • @hasesukkt
      @hasesukkt 11 месяцев назад

      Thank you so much❤

  • @jack9025
    @jack9025 4 года назад +8

    Been using Lightning for a couple months now. ITS AWESOME

  • @anirudhgangadhar6158
    @anirudhgangadhar6158 Месяц назад

    Brilliant! Hands down, the go-to for learning PyTorch.

  • @raymond-andrade
    @raymond-andrade 2 года назад +2

    Very well explained. As someone who just recently got used to PyTorch, it's nice to see Lightning allows me to skip a lot of the manual looping and optimizer/loss management. Thanks for also including the snippet about the Tensorboard, which is also very helpful instead of generating your own graphs in Matplotlib.

  • @TechnGizmos
    @TechnGizmos 4 года назад +5

    Finally done with your Pytorch playlist!! Your videos have gradually removed my fears about implementing neural networks and will now serve as the foundations upon which I will grow my knowledge base in AI. I recommended this series to my brother who is an ML research scientist and he's also learning a lot from it. Thank you very much for this and I hope your channel grows by leaps and bounds as the field grows.
    BTW there's an update w.r.t. returning the dictionary in the validation_epoch_end() function:
    UserWarning: The validation_epoch_end should not return anything as of 9.1.to log, use self.log(...) or self.write(...) directly in the LightningModule warnings.warn(*args, **kwargs)
    UserWarning: The {log:dict keyword} was deprecated in 0.9.1 and will be removed in 1.0.0
    Please use self.log(...) inside the lightningModule instead.

    • @patloeber
      @patloeber  4 года назад

      Glad that you enjoyed it! And thanks for the hint!

  • @thantyarzarhein5459
    @thantyarzarhein5459 4 года назад +1

    Yesss and thanks, I have been waiting for it after u mentioned last video

  • @arshadAlieusafzay
    @arshadAlieusafzay 4 года назад +1

    As always, awesome tutorials. many thanks for your efforts

  • @TotoGoTravel
    @TotoGoTravel 3 года назад

    Thanx you for the perfect language that is not commonly spread along the python youtube channels. If you know what I mean)))))))

  • @jinorohit2921
    @jinorohit2921 2 года назад +1

    another fantastic video !

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

    awesome tutorials. many thanks for your efforts

  • @pfever
    @pfever 2 года назад

    Very nice tutorial, Thanks!

  • @shocamefromebay
    @shocamefromebay 4 года назад +2

    This was a great video.

  • @jiahaozhang7571
    @jiahaozhang7571 4 года назад +1

    Thank you so much. Extremely useful!

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

    Very interesting and useful!

  • @monishkarunakaran5367
    @monishkarunakaran5367 4 года назад

    Thanks for making our life's so easy

    • @patloeber
      @patloeber  4 года назад +1

      Glad it is helpful!

  • @chakkarapaniv5487
    @chakkarapaniv5487 2 года назад

    Hi, Thanks for the tutorial. I would like to know how to do the predictions logic for the trained model. Could you please share some information on it.

  • @mohd.faizan3003
    @mohd.faizan3003 4 года назад

    I have really enjoyed your videos

  • @TheAIEpiphany
    @TheAIEpiphany 3 года назад +1

    Love the idea behind it! Abstract the engineering from science.
    I wonder what happens when something doesn't work though - how painful is it to debug it? How responsive are the contributors when there is a bug?
    Also, I'd love to know the perf overhead, etc. (I guess it can't be too big and the framework is probably geared towards rapid prototyping and not production either way)
    All of those would have to have a satisfying answer for me to wish to switch to PyTorch Lightning (PyTorch user here).

    • @patloeber
      @patloeber  3 года назад

      It's open source so you can check out the contributor activity on GitHub. I don't think there is a perf overhead

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

    is this basically keras but for pytorch? i usually make deep learning model using Tensorflow and recently picked up to learn Pytorch. as frustating as it is. i manage to make a non-mnist model. but it seem a lot more complicated than tensorflow

  • @raminessalat9803
    @raminessalat9803 4 года назад

    Thanks a lot! Have a question: when you used 'model' instead of 'self' (the mistake you mentioned on the video), what does code exactly do? what is it understanding as 'model' in that method?

  • @talhayousuf4599
    @talhayousuf4599 4 года назад

    Pytorch Lightning is wonderful! But I could figure out How to use "pytorch lightning data module" for a custom (extremely large ) custom dataset?

  • @luelhagos631
    @luelhagos631 4 года назад +1

    Awesome!

  • @user-or7ji5hv8y
    @user-or7ji5hv8y 4 года назад +2

    Can you do a video on Lightning Bolt?

    • @patloeber
      @patloeber  4 года назад

      Thanks for the tip! Frankly, I did not know about this library. But I will have a look into this

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Год назад

    does PyTorch Lightning work with Mac M2 chips?

  • @yuanjizhang9753
    @yuanjizhang9753 4 года назад

    Excellent tutorial! Thank you so much! I have a question in github code file lines 41 & 76: outputs = self(images). Should it be outputs = self.forward(images)?

    • @patloeber
      @patloeber  4 года назад

      model(X) and model.forward(X) should be the same here

    • @yuanjizhang9753
      @yuanjizhang9753 4 года назад

      @@patloeber Thanks!

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

    New import command due to update of lightning is "import lightning as pl"

  • @janmejaybhoi8065
    @janmejaybhoi8065 4 года назад

    Hey there, is it necessary to be good at Pytorch so that I can learn Pytorch Lightening? I am a beginner in Pytorch.

    • @patloeber
      @patloeber  4 года назад

      Yes I would recommend to start with "normal" PyTorch first

  • @ИльяФедоров-м6б
    @ИльяФедоров-м6б 3 года назад +1

    what is yours VS code theme?

  • @mohd.faizan3003
    @mohd.faizan3003 4 года назад

    Can you also make some for the transformers

  • @robosergTV
    @robosergTV 2 года назад

    was this a sponsored video? It sounds like an ad :)

  • @ramisketcher2069
    @ramisketcher2069 4 года назад

    Nice accent ♡

  • @saurrav3801
    @saurrav3801 4 года назад

    🔥

  • @brandomiranda6703
    @brandomiranda6703 3 года назад

    Who cares about tensorboard support when wandb/weights exists! ;)

  • @vanillaspoony
    @vanillaspoony 4 года назад

    first