Learn A.I. with LeakyAI
Learn A.I. with LeakyAI
  • 8
  • 22 649
About Our Channel
Welcome to our A.I. coding channel. Here you will get access to lots of A.I. tutorials that will teach your how to develop your own A.I. projects. All the tutorials use the Python programming language and we focus on the most popular A.I. frameworks like PyTorch and Tensorflow.
If you are new to A.I. development or have questions, please post them below the video. We also offer a self-paced, on-demand digital course teaching you everything you need to start building our own A.I. projects. You can find out more by visiting our website at leaky.ai.
Thank you for visiting us and hope you enjoy the videos.
Check-Out Our Website
www.leaky.ai
#pytorch #python #deeplearning #artificialintelligence #machinelearning
มุมมอง: 213

วีดีโอ

PyTorch DataLoaders Overview and Examples (batch_size, shuffle, num_workers, pin_memory, drop_last)
มุมมอง 2.7K2 ปีที่แล้ว
PyTorch DataLoaders are super powerful and a critical part of any PyTorch deep learning project. They help you automate the creation of mini-batches of data for the training process and also speed up up the overall training and testing process through parallelization. In this video, you will get a quick overview of how to use PyTorch Dataloaders. Dataloaders are an important component when buil...
Hands-On A.I. Programming with PyTorch Course - 2 Minute Overview (Python, PyTorch, Colab)
มุมมอง 972 ปีที่แล้ว
This is a 2-minute overview of our popular Introduction to A.I. Programming Course. This is a a fully self-paced hands-on course introducing you to the art of A.I. programming with the popular deep learning A.I. library PyTorch. The course will guide you through step-by-step all the basics of developing real-world A.I. projects including how curate datasets, build neural networks, training and ...
Build your First Neural Network - 15 Minutes, 20 Lines of Code (PyTorch, Google Colab)
มุมมอง 3.7K2 ปีที่แล้ว
In this free 15-minute tutorial, you will build your first neural network from scratch. No previous experience is required. You will be developing your project using Python, PyTorch and Google Colab. You will build and train a neural network to mimic a mystery function. Follow along the tutorial here: www.leaky.ai/buildyourfirstneuralnetwork Sign up for our A.I. Trends and Free Tutorials Email ...
Google Colab Overview (5 Minutes)
มุมมอง 4202 ปีที่แล้ว
In this free 5-minute tutorial, you will get an overview of how to get started with Google Colab, a free service that lets you develop Python projects using your web browser. You will get an overview of how to access Google Colab, develop your own code and change hardware acceleration settings. Level: Beginner Time: 5 minutes Equipment: Google Account (free), Chrome Browser (free) Follow along ...
Is your Dataset Balanced? How to Check (Python, PyTorch)
มุมมอง 2.1K2 ปีที่แล้ว
In this 10-minute tutorial, you will get an overview of why it’s important to always check if your dataset is balanced when developing A.I. projects. You will write your own dataset balance checker by following along with the instructor using Google Colab. After completing this tutorial, you will be able to verify if your dataset is balanced and take the proper action to fix it if necessary! Th...
Predict Sales Using a Neural Network (PyTorch, Google Colab)
มุมมอง 13K2 ปีที่แล้ว
In this free tutorial, you will build your first neural network from scratch! You will be developing your project by coding in Python and using the popular deep learning library PyTorch. You will complete this tutorial using Google Colab so no environment or setup is needed to get started. You will be analyzing a synthetic dataset from a fictional lemonade stand and train your neural network to...
Setup Your PC for A.I. Programming (Windows, PyTorch, Jupyter Notebook)
มุมมอง 6152 ปีที่แล้ว
In this 20-minute lesson you will learn how to setup your PC for A.I. programming. We will be installing PyTorch, Jupyter Notebook and all other required software using the Anaconda package manager. This tutorial is designed for Windows machines but can be easily adapted for MacOS as well. Level: Beginner Time: 20 minutes Equipment: Your own PC or laptop Follow along the tutorial here: www.leak...

ความคิดเห็น

  • @murilosuzuki1264
    @murilosuzuki1264 5 หลายเดือนก่อน

    hey man, great video! I tried to train it on the function a*b (I just changed the function at the second code block in "return torch.tensor(a*b)"), but the loss is always very inconsistent and the output value is never even close to right. How should i go about fixing it?

    • @leakyai
      @leakyai 5 หลายเดือนก่อน

      Nice work! Could you post your code to GitHub and send me a link? I will then take a look over the weekend and get back to you with a few suggestions.

  • @Amandaaaaaa123
    @Amandaaaaaa123 9 หลายเดือนก่อน

    Hey when I got to the part #Train our network a using the entire dataset 5 times, why is my Total Loss NaN?

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

      Hi, there could be a couple of reasons you are getting NaN (Not a Number). Try to check your code vs the solution which you can find here: colab.research.google.com/github/LeakyAI/FirstNeuralNet/blob/main/FirstNeuralNetworkSolution.ipynb

  • @Amandaaaaaa123
    @Amandaaaaaa123 9 หลายเดือนก่อน

    thanks so much bruh love you

    • @Amandaaaaaa123
      @Amandaaaaaa123 9 หลายเดือนก่อน

      so it trains the model so that it can mimic the mystery function while minimizing loss right

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

      That's exactly right! If the loss is going down, it means the neural network is learning how to mimic the mystery function. As a next step, I would encourage you to learn more about training models, especially why there is a need to split our dataset into a separate training, validation and testing set. This is to ensure our model generalizes as it trains and does not overfit or underfit. In this example, we have just trained the model directly on the data. In the realworld, you will want to always ensure your model is trained to generalize the data being used.

  • @astik2002
    @astik2002 10 หลายเดือนก่อน

    Sir please start uploading more of Neural Network, your explanation of concepts is so crystal!

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

      Thank you so much for your kind words, we are working on new content and hope to release more soon. Happy learning!

  • @Maestro2050
    @Maestro2050 11 หลายเดือนก่อน

    and whats next from here?

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

      Hey Maestro2050, I would encourage you to learn more about deep learning in general, and then try different projects. Hugging Face is a great place to go as it hosts a massive open source repository of fantastic neural network models that can do amazing things (detect items in an image, convert text from one language to another, create a ChatGPT style chatbot etc.). I would explore that as a next step and build some projects in areas that are you passionate about.

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

    if we want to group for health diagnostic - for example certain medicine is effect in 1<2 threshold certain for 2<3 threshold and certain 3<5 . I don't know how parameter can be set? Similarly I want to build KMeans cluster and on real time I want to make decision with customer - my knowledge of machine learning and the projects available are unable to help. I hope if you can answer to give me certain direction

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

      Hi, it will depend a lot on your data. If your data is naturally unlabeled, then you will want to choose an unsupervised approach and kmeans is a great start. It will cluster results it believes to be similar. Lots of parameters can be specified for kmeans. In this tutorial, the neural network is taking in labeled data (input data + number of lemonades sold as the label) so we are using a supervised approach. In this case, we train a simple neural network where we submit several known example combinations (inputs + number lemonades as the label) for the neural network to train on. If you have data similar to this (ie, known inputs and associated outputs), then you can opt to try to model with a neural network in a similar fashion. If your label is not regression (as with number of lemonades in this case), you can also convert the network instead to predict classes (classification) using a similar approach. Hope that helps!

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

    Hi! Nice tutorial, it was a lot of help. But I have one quick question. The following error arose when running "loss = criterion(ypred, y[i])". Do you have any idea why this happened? AttributeError Traceback (most recent call last) <ipython-input-10-e3e955ff3a6e> in <cell line: 10>() 16 17 # Measure how well the model predicted vs actual ---> 18 loss = criterion(ypred, y[i]) 19 20 # Track how well the model predicted 2 frames /usr/local/lib/python3.10/site-packages/torch/nn/functional.py in mse_loss(input, target, size_average, reduce, reduction) 3279 mse_loss, (input, target), input, target, size_average=size_average, reduce=reduce, reduction=reduction 3280 ) -> 3281 if not (target.size() == input.size()): 3282 warnings.warn( 3283 "Using a target size ({}) that is different to the input size ({}). " AttributeError: 'list' object has no attribute 'size'

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

      I am using torch version 1.13.1

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

      Hi! Looks like the inputs/outputs might be mis-aligned for some reason, could you check that you have the following code when creating the input variable x and output/label variable y? # Create our PyTorch tensors and move to CPU or GPU if available # Extract the inputs and create a PyTorch tensor x (inputs) inputs = ['Weekend','Sunny','Warm','BigSign','Price'] x = torch.tensor(df[inputs].values,dtype=torch.float, device=device) # Extract the outputs and create a PyTorch tensor y (outputs) outputs = ['NumberSold'] y = torch.tensor(df[outputs].values,dtype=torch.float, device=device)

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

      You can also check your code vs the solution posted here: github.com/LeakyAI/FirstNeuralNet/blob/main/FirstNeuralNetworkSolution.ipynb

  • @nayanuranggarahayu-6945
    @nayanuranggarahayu-6945 ปีที่แล้ว

    Hello sir. i am trying to make model using ANN on excel. but i am little bit confused how to forecast or predict the future based on the model. i tried to forecast with some scenarios using the weight that i got, but the result was 1 in maximum and 0 in minimum cause the sigmoid activation. In my understanding forecasting is to predict future. thanks

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

      Hi, there are a lot of components to make an effective ANN using tabular data from sources like excel. First, you must have enough data so the model is able to properly train. There must be a correlation between the inputs and desired forecasted variable for the model to train properly. Normally, if you are building a model that predicts a value (regression), you do not want to have an activation function (sigmoid, tanh etc.) in the last layer so the model is free to predict a value and not be constrained. However, if your model is used for classification instead (for example, sentiment analysis or predicting TRUE/FALSE etc.) then a sigmoid activation function would be appropriate in the last layer.

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

    I found this error [ RuntimeError: both arguments to matmul need to be at least 1D, but they are 0D and 2D ] when i run this code [ import torch.optim as optim criterion = torch.nn.MSELoss() optimizer = optim.SGD(model.parameters(), lr=0.001, momentum=0.9) for epoch in range(5): totalLoss = 0 for i in range(len(x)): y_pred = model(x[i]) loss = criterion(y_pred, y[i]) totalLoss+=loss.item() optimizer.zero_grad() loss.backward() optimizer.step() print("Total loss", totalLoss)

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

      Dear Hiwhy, this portion of your code here looks ok to me, your error could be up earlier in your project and and likely happening around the definition of x and y. If you could send me the entire project code I would be happy to take a further look.

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

    Hi, The video is clear until you use a synthetic data generator formula. How did you come up with the following conclusion: if weekend: numlemonssold = (sunny*5 + int(500 / price)) if bigsign: numlemonssold = 1.3 * numlemonssold if warm: numlemonssold = 2 * numlemonssold if sunny: numlemonssold = 1.25 * numlemonssold numlemonssold = int(numlemonssold)

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

      Dear Katalin, in this beginner tutorial you are using a very simple synthetic dataset which allows you to focus instead on building and training of a simple neural network. The code creates the dataset using a simple formula to make it easy for the neural network to learn from the data and start making predictions. In the course (find it on leaky.ai), you will tackle real world datasets which require a lot more upfront work before you can use them with neural networks (cleaning, standardizing values, dealing with empty fields, non-linearities etc.). You will learn those techniques in the course and also how to build more advanced neural networks that can tackle real world, complex datasets.

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

    Amazing video thanks a lot

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

      Glad you liked it!

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

    Hi, thank you for the video. I noticed you did not split the data into train and test data, maybe because you know the linear relashipship between X and Y. I am trying to build a NN, but I do not get good results. Could you please tell me how to split the data into train and test using PyTorch? Thank you!

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

      Great question, yes indeed you should always break up your data into at least a training and a test dataset (usually, we also use a validation set). We cover a lot of this in the hands-on course itself: www.leaky.ai/introduction-to-ai-programming-with-pytorch-course-beginner How you do this will depend a bit on how your your data is structured. A simple approach uses Python slicing: # Assume you have a dataset split into x (input) and y (output/label) import numpy as np # Build a list of indices and shuffle them randomly indices = list(range(len(x))) np.random.shuffle(indices) # Allocate 80% of the data for the training set trainingPercent = .8 split = int(total*trainingPercent) # Now simply slice the dataset into train and validation train_set = Dataset(x[indices[:split]], y[indices[:split]]) test_set = Dataset(x[indices[split:]], y[indices[split:]]) You can also use sklearn, they have a great function that does this for you: from sklearn.model_selection import train_test_split You can find a good example of how to use it here: towardsdatascience.com/how-to-split-data-into-three-sets-train-validation-and-test-and-why-e50d22d3e54c

  • @user-lf4es6yg9p
    @user-lf4es6yg9p ปีที่แล้ว

    Ive been trying to learn PyTorch for a while, but all the other videos only show you crazy functions that I cant even understand what they do... Best tutorial so far. You made it simple for me. Divided things into small parts, made an example that people can also do while watching. Thanks brother!

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

      Thank you so much for your kind words and feedback! Yea, PyTorch can be tough to learn so I try to take a more simplified step-by-step approach to teaching. There are also more tutorials on the website: www.leaky.ai/ PyTorch Dataloaders, for example, are very powerful and heavily used when building PyTorch projects. You can checkout the Dataloader tutorial to get started as a next step (www.leaky.ai/dataloader). Have a great day!

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

    Hello, thank you so much for your content. Before I saw your video, I watched about 8-10 videos on creating AI on PyTorch. Still, only you could explain everything qualitatively and I finally started at least something in this understanding + I liked the interaction system with you, when I had to fill in small parts of the code, and you explained these parts. PS I hope you can become more popular in the future. you make lessons more valuable than lessons from videos with 1-2 million views.

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

      Thank you so much for your kind words, we are absolutely thrilled that you were able to benefit from the tutorial! We hope to have more videos available soon and you can also find additional tutorials on the website (www.leaky.ai). Have a wonderful day and good luck with your A.I. journey!

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

    Hello , im applying these steps to a different data set and i reached the point where i calculate the totalLosstime and i get printed NaN, what is the problem

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

      Hey Mazin, that is great that you are trying to apply this to a new dataset! Keep in mind, the model is very simple here and therefore will usually work with limited and simple datasets. In general, NaN values can come from different sources including your new dataset (inputs) but also the gradient calculations that are calculated during training potentially. Try to simplify the dataset itself and see if it eliminates the issue. If the issue is not the dataset, you can try to reduce the training loop to one iteration and then experiment with the model size/shape itself (adding additional layers and possibly broadening the width of the layers). Once you have eliminated the NaN, you can then gradually bring back the other components of the dataset and also increase your training iterations. Hope that helps!

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

      @@leakyai i am using your dataset, and still getting Total Loss: nan How can i fix the issue?

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

      @@sohanzz Yea I have the same problem. I am using a different dataset and get Nan as total loss as well

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

      NaN is the python code for 'Not a Number' so somewhere in the calculation it becomes something different. check the type by using "Type(variable)", then you can backtrack where the error comes from.

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

    This must be the 'cleanest' tutorial i have seen in ML/ DS

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

      Thank you so much for your feedback!

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

    Thank you soo much for the video its extremelly well explained, it helped me soo much

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

      Thank you so much for letting me know! So glad you found it helpful! If there are other topics you would like, please do send them over as it will help us prioritize the content!

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

    Thank you! It was easy to understand, and I've managed to build my first neural network, following this video!

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

      Thank you so much for sharing, that is awesome! If you want, you can now attempt the “Predict Sales” tutorial where you will use a neural network to predict lemonade sales by training it on a synthetic dataset. You can find that video here th-cam.com/video/SugVN2t3M8I/w-d-xo.html or you can follow along the written version here www.leaky.ai/projectlemonade. If you have any questions, please don’t hesitate to post them below the videos, we are always here to help! Thanks for watching!

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

    Great Video!! Looking forward a video creating a binary classification CNN in Pytorch and Colab!

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

      Thank you so much Alejandro for your feedback! Great suggestion, we will put it on our list of future videos to get done! If possible, please help us get the word out for the channel by sharing it with anyone you know that might benefit from the free tutorials! Thanks for watching!