PyTorch LR Scheduler - Adjust The Learning Rate For Better Results

Поділитися
Вставка
  • Опубліковано 22 лис 2024

КОМЕНТАРІ • 33

  • @anonim5052
    @anonim5052 7 місяців тому +1

    great course. i completely finished it. Thank you bro, you put a lot of knowledge into my head

  • @CodeWithTomi
    @CodeWithTomi 4 роки тому +2

    Back to Pytorch💪

  • @yulisanm
    @yulisanm Рік тому

    Hi patrick, I am really very grateful to you for this Pytorch tutorial. I am new in this world and your tutorials have helped me a lot to learn and perform in my work. 🥰🥰🥰

  • @fisherh9111
    @fisherh9111 2 місяці тому

    Love the accent and the instruction! Thanks.

  • @saurrav3801
    @saurrav3801 4 роки тому +3

    🔥 you are best in explaining ....keep going bro...full support

  • @fabriciolopo
    @fabriciolopo 2 місяці тому +1

    muy buen curso! gracias

  • @fred4287
    @fred4287 Рік тому

    very helpful patrick! I just ran into this kaggle project and your tutorial helps a lot!

  • @DanielWeikert
    @DanielWeikert 3 роки тому +3

    Could you do a "trial and error" video on how to approach figuring out how to shape tensors for each step? This is a nightmare to me.
    highly appreciated!

  • @minthwayhan6215
    @minthwayhan6215 Рік тому

    Thank You Sir. This all tutorial are very helpfull for me.

  • @diogomatias8483
    @diogomatias8483 3 роки тому +7

    Thank you for your tutorial. I have a question that I appreciate if you could explain. What is exactly happening to the learning rate when we combine both Adam with a learning rate scheduler? In theory, Adam is an optimizer that uses adaptive learning rate, so it updates the learning rate on a parameter level. Hence, I don't understand exactly what is happening when we combine both. I would see the LR scheduler with a optimizer like SGD which has a constant LR.

    • @SimoneIovane
      @SimoneIovane 3 роки тому

      I had the same question. I think here he's just used as example the Adam even though a more appropriate one would have been a SGD. But if you use it with Adam I guess the learning rate is divided both by the MA of the gradient and the decay you specify.

  • @racocat1947
    @racocat1947 4 роки тому +3

    can you cover "attention models"?

    • @patloeber
      @patloeber  4 роки тому +2

      thanks for the suggestion! Will put it on my list

  • @tianyiwang7930
    @tianyiwang7930 3 роки тому +2

    Any suggestion on how to choose the most proper lr_scheduler among the given ones?

    • @Ch1ck3nfox
      @Ch1ck3nfox 3 роки тому +2

      Depends on your use case but in general I would say using the validation loss based one (ReduceLROnPlateau) is a good start, since it only decreases your learning rate when your model is no longer learning, instead of just a static decrease based on epochs.

  • @matl8078
    @matl8078 2 роки тому

    Very clear explanations. Thanks.

  • @deevyankar123
    @deevyankar123 2 роки тому

    Great 👍 👌 👍

  • @Ftur-57-fetr
    @Ftur-57-fetr 3 роки тому

    Great tutor

  • @randomforrest9251
    @randomforrest9251 3 роки тому

    Hey, Momentum and the internal learning rate adaption of ADAM already impat the learning rate - why should we adjust the learning rate with a further external scheduler?

    • @patloeber
      @patloeber  3 роки тому +4

      you are right. it's usually not necessary to use this with Adam. I should have used a different optimizer as example...

  • @JesusMartinez-kq8ze
    @JesusMartinez-kq8ze Рік тому

    hi, im using ADAM optimizer and StratifiedKFold
    For some reason average training loss dont decrease in the last kfold, it is stuck in 0.6931 and 0.6932
    I thought to increase learning rate when average training loss dont decrease:
    if n_epoch>0:
    if avg[n_epoch-1]>=avg[n_epoch]:
    optimizer = optim.Adam(model.parameters(),lr=learningRate*2)
    else:
    optimizer = optim.Adam(model.parameters(),lr=learningRate)
    is this code wrong? When using this i have other troubles...

  • @rachit6099
    @rachit6099 4 роки тому

    Nice video

  • @dishantshah5965
    @dishantshah5965 3 роки тому

    can you create a tutorial to import a custom image dataset containing segmented and annoted images in coco format (with annotations in json file and images in a separate folder) and train it, using a backbone algorithm like resnet 50, and run it on some new images? I am facing issues in this kind of data importing for coco datasets.

    • @myyoutubeaccount0123_
      @myyoutubeaccount0123_ 2 роки тому

      It helped to me about the same issue: ua-cam.com/video/j-3vuBynnOE/v-deo.html

  • @torque2123
    @torque2123 3 роки тому

    Sir how can we do audio processing in pytorch

    • @patloeber
      @patloeber  3 роки тому +1

      Haven’t done anything with audio yet ...

  • @AmeerHamza-xm5ro
    @AmeerHamza-xm5ro 3 роки тому

    Hi, you are a very nice teacher. Could you please make videos about Facebooks 'mmf' framework bases on pytorch. This could be a greate addition to you channel, please consider it. Thanks

    • @patloeber
      @patloeber  3 роки тому

      thanks! I'll take a look at it

  • @methane2896
    @methane2896 4 роки тому

    bro
    please help
    /home/kash/.local/lib/python3.8/site-packages/torch/cuda/__init__.py:52: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
    return torch._C._cuda_getDeviceCount() > 0
    i dont know what is this error, i cant access my cuda device

    • @dishantshah5965
      @dishantshah5965 3 роки тому

      which gpu and cudnn version do you use? Are you using a conda environment?