PyTorch Tutorial 10 - Dataset Transforms

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • New Tutorial series about Deep Learning with PyTorch!
    ⭐ Check out Tabnine, the FREE AI-powered code completion tool I use to help me code faster: www.tabnine.com/?... *
    In this part we learn how we can use dataset transforms together with the built-in Dataset class.
    Apply built-in transforms to images, arrays, and tensors. Or write your own custom Transform classes.
    - Dataset Transforms
    - Use built-in Transforms
    - Implement custom Transforms
    Part 10: Dataset Transforms
    📚 Get my FREE NumPy Handbook:
    www.python-engineer.com/numpy...
    📓 Notebooks available on Patreon:
    / patrickloeber
    ⭐ Join Our Discord : / discord
    If you enjoyed this video, please subscribe to the channel!
    Official website:
    pytorch.org/
    Part 01:
    • PyTorch Tutorial 01 - ...
    Logistic Regression from scratch:
    • Logistic Regression in...
    Code for this tutorial series:
    github.com/patrickloeber/pyto...
    You can find me here:
    Website: www.python-engineer.com
    Twitter: / patloeber
    GitHub: github.com/patrickloeber
    #Python #DeepLearning #Pytorch
    ----------------------------------------------------------------------------------------------------------
    * This is a sponsored link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏

КОМЕНТАРІ • 43

  • @AbdulQayyum-kd3gf
    @AbdulQayyum-kd3gf 4 роки тому +1

    Excellent tutorial. Keep it up bro

  • @ilkayand4
    @ilkayand4 4 роки тому +4

    Thanks a lot. I will share your tutorial with my python related friends. You are so cool.

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

      That’s great! Thanks for sharing :)

  • @williammichael6365
    @williammichael6365 4 роки тому +4

    Thank you. I finally learned how to make my dateset.

  • @umesh3876
    @umesh3876 11 місяців тому

    Exactly what i was searching for thanks a lot.....

  • @Frostbyte-Game-Studio
    @Frostbyte-Game-Studio 2 роки тому

    hey man
    loved your tutorial watched the whole series
    thanks for the good content
    love your accent btw

  • @tarat.techhh
    @tarat.techhh 3 роки тому +1

    Amazing Video plz keep uploading. Cheers

  • @rayll8579
    @rayll8579 3 роки тому +8

    Great tutorial! May I ask what is the benefit of using class? Thank you.

    • @itzikgutzcha4779
      @itzikgutzcha4779 2 роки тому +1

      Using a class in this way works as a function factory with different default values.
      To use this as a function, you would have to constantly input the arguments or hard-code them, or other "less clean" ways.

  • @stefanobraghettocatoni1464
    @stefanobraghettocatoni1464 Рік тому +3

    i got an error when try dataset[1]: expected np.ndarray (got numpy.float32) and it ocurrs inside ToTensor class. i s it is solved: return torch.from_numpy(np.asarray(inputs)),torch.from_numpy(np.asarray(labels)). Why is this happening? Thank you

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

    Thanks, very helpful.

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

    Awesome video! I am wondering why we create our own WineDataset class, rather than using the dataset module directly?

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

      because here we used dataset from pytorch not ours , if you have your dataset you should do it like we did with WineDataset

  • @mohammedy.salemalihorbi1210
    @mohammedy.salemalihorbi1210 3 роки тому

    Great tutorial, Thanks a lot

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

    Can we define __call__ under @staticmethod to avoid self? (6:12)

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

    Thank you very much for your tutorials! One question: why make the transforms classes with just one call method, why not just a function and pass that?

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

      Your way might also be possible, but this is the PyTorch way of doing this. Their API also uses the __call__ method

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

      @@patloeber I suspected something like that. Thank you very much!
      Viele Dank, grüsse aus der Schweiz.. :)

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

      @@amarug Sure! Grüße zurück aus Deutschland ;)

  • @lilikoimahalo
    @lilikoimahalo 7 місяців тому

    Could you show an example of using this for scaling please?

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

    Thank you so much!

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

    thanks alot

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

    Hello, I have a question. All the transformations we are doing, it can be done using a method as well. Any particular reason why we are creating class?

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

      This is how PyTorch recommends it, then you can for example combine these Transform class objects in transforms.Compose. But for single transformations a function is fine, too

  • @fahadaslam820
    @fahadaslam820 4 роки тому +1

    Thanks for mazing tutorials. Can you please share implementation for Wine classification using a Feedforward network? Because I follow your tutorial on FFN and implemented for the Wine dataset. unfortunately, I am getting bad results (bad learning - loss is not decreasing as expected)

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

      you should try to use a scaler (minmax or standard scaler)

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

      @@patloeber Hi, thanks for the suggestion. It actually worked. But I do not understand, what type of scaling I should choose for my data? Is there is any scaling guideline?

  • @user-ej9dt6wt1x
    @user-ej9dt6wt1x Місяць тому

    Cool!!!

  • @user-fk1wo2ys3b
    @user-fk1wo2ys3b 3 роки тому

    Thank you

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

    if self.transform what does it mean

  • @Nameless_p
    @Nameless_p 6 місяців тому

    why do you sometimes call it inputs and other times call it features?

  • @AbdulQayyum-kd3gf
    @AbdulQayyum-kd3gf 4 роки тому

    Please can you upload the video on multiclass segmentation in PyTorch, if possible how to make multiclass segmentation data loader in PyTorch

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

      one of the next videos will contain multiclass segmentation :)

    • @AbdulQayyum-kd3gf
      @AbdulQayyum-kd3gf 4 роки тому

      Thank you so much

  • @ArunMozhiDevan04
    @ArunMozhiDevan04 2 роки тому +7

    "__call__" is depreciated use "__new__" instead