Build a Neural Network with Pytorch - PART 1

Ғылым және технология

In this lesson, I will demonstrate how to build your own neural network with Pytorch and word embedding!
This network is designed to create a story based-off several books that I've trained it on, and therefore I named it StoryTeller.
In this video, you will learn how to manually batch data, create a neural network class, and define the structure of your model.
I'll explain my trail of thought and the considerations when building such a model, and I'll also introduce you to Pytorch, which is a very powerful tool for Machine Learning and AI.
This is just an introduction, as I didn't include validation or pre-processing of our dataset, which are also very important steps that I've skipped to save some time (YES, it takes more than 35 minutes to build a proper model!)
I highly recommend downloading/copying the starter notebook from my Google Drive, and proceeding to Part 2 of this lesson once you're done structuring your model.
#pytorch #python #neuralnetwork #ai
⭐Train a Neural Network - StoryTeller PART 2 ⭐
• Train a Neural Network...
********************************************************************************
LEARN ABOUT BASIC AI CONCEPTS - FOR MACHINE LEARNING BEGINNERS:
********************************************************************************
⭐My Perceptron Tutorial - a single node in a Neural Network ⭐
• Perceptron Algorithm w...
⭐My Error Function Tutorial - Binary Cross-Entropy Loss ⭐
• Cross Entropy Loss Err...
Starter Notebook and Files:
drive.google.com/drive/folder...
Timestamps:
0:00 - Introduction
1:41 - Convert dataset from strings to integers
3:00 - Word to Index
4:58 - Batch Data / Train Data Structure
7:47 - Neural Network Structure
8:44 - _init_ Function
11:32 - Forward Function
14:52 - Print Model Structure
15:47 - See you in part 2!
Connect on LinkedIn:
/ mariyasha888
Follow me on Facebook:
/ mariyasha888
Follow me on Instagram:
/ mariyasha888
Check out my Github:
github.com/MariyaSha

Пікірлер: 50

  • @inspisiavideos8542
    @inspisiavideos85423 жыл бұрын

    Hey I just found your videos. They are great! I just finished my Associates degree but I learned more by watching vids like this one.

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Wow, thank you so much!!! I'm glad I could help :D

  • @bugtori

    @bugtori

    Жыл бұрын

    did u finish ur associates in ohio

  • @grahamhilton3110
    @grahamhilton31103 жыл бұрын

    I have just finished an MSc in Advanced Computer Science and love your videos :)

  • @shanedogg6742
    @shanedogg67422 жыл бұрын

    Finallyy someone who can get to the meats and potatoess! Best video I've seen!

  • @MisterYoupinet
    @MisterYoupinet3 жыл бұрын

    Deserves more views. thanks for sharing

  • @Shifterwizard
    @Shifterwizard2 жыл бұрын

    Could you provide a breakdown of neural networks in general, on the coding side, similar to your OOP/classes video? One where you go over the basic parts of an individual neural network, one at a time, and common variations or pitfalls, in that OOP/classes video's visual style?

  • @ademhilmibozkurt7085
    @ademhilmibozkurt70853 жыл бұрын

    Awesome video !

  • @akaabdullah
    @akaabdullah3 жыл бұрын

    Hello mam just found your channel randomly but surely one of the best channel recomended by youtube

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Yeyyy! Thank you so much AkA Abdullah! welcome aboard! 😃😃😃

  • @MariusCheng
    @MariusCheng3 жыл бұрын

    Awesome lesson, i like this

  • @apurvakumardani172
    @apurvakumardani1723 жыл бұрын

    Can you convert python code into apk with buildozer for me? My lappy shows errors there. I need help

  • @DEFTNoah
    @DEFTNoah3 жыл бұрын

    do you have any experience with image classification using VGG16 or other CNN models?

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    I sure do! how can I help you? :)

  • @DEFTNoah

    @DEFTNoah

    3 жыл бұрын

    ​@@PythonSimplified, drive.google.com/file/d/1iKOElH8XJyEHoOMaDRM68EPeUbTB6bzt/view?usp=sharing , I used this model.py for training but due to lack of dataset my model is over fitting. Can you take a look on it and tell if this is the right approach to use? and Now I've dataset up to 2000+ different images(not ready for training), what's the best approach to get them ready? For example, I'm working on a Citrus Leaf Disease detection and I've data set of 4 classes. So now, Should I crop each leaf, so there's no any other leaf in one pic? I'm kind of confuse about this. I've seen some models training online which other objects rather than the 1 object. I don't think I convey my point very clearly but If you're free, Please take a look.

  • @Coco042092
    @Coco0420923 жыл бұрын

    Holy cow, this girl is gorgeous and brilliant. Thank God for discover this channel. Gretings from Mexico. 🙋‍♂️

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Thank you so much for the lovely comment, Alfredo! 😀 Welcome aboard and greetings from up North in Canada 😊🍁

  • @shimaalcarrim7949

    @shimaalcarrim7949

    Жыл бұрын

    ​@@PythonSimplified I love how cocky you sound 🤣 & you explain hard stuff like you're explaining how to do laundary

  • @__--JY-Moe--__
    @__--JY-Moe--__3 жыл бұрын

    nice!

  • @narnittetube4494
    @narnittetube44943 жыл бұрын

    I watch all your videos and I really enjoy your level of understanding. Can you share your study background with us..............??????

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Thank you, I'm super glad you liked my videos! 😃 I'm a self-taught programmer, started building websites once I got my broadband internet connection (I believe I was 12) and never stopped learning since! I've been doing lots of online courses and building my own projects from scratch. Recently I've started a distance-learning BSc in Computer Science and it really connects all the dots together, especially on the math side of things! All I do is trying to explain things without fancy long words, keeping it really straight-forward with lots of examples 😁

  • @judedavis92

    @judedavis92

    3 жыл бұрын

    @@PythonSimplified hi there. How did you start your distance-learning BSc? As in, which website/platform did you use? Thanks.

  • @sentrygunner
    @sentrygunner3 жыл бұрын

    Hey do you have a Facebook group or something? The way you teach is pretty understandable and concise! Subbed!

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Thank you sentrygunner, welcome aboard! 😃 I'm not using Facebook, but I'm working on a really cool website/blog where we can all chat conveniently! In the meanwhile, there's Github (MariyaSha is my username) and if you have any questions or code errors - just start a new issue and I'll be notified automatically. I'll definitley look into starting a group on discord/telegram/reddit/other. At the moment I'm still searching for the most efficient way to communicate with thousands of wonderful people! 😁 Will update when I figure it out! 😉

  • @lakeguy65616
    @lakeguy656163 жыл бұрын

    I think you are using the phrase "batch_size" when you mean input_features (X subscript 0 ... X subscript 4)... you are using the previous 5 words to predict the 6th word in a sequence. (I enjoy your videos. keep up the good work!)

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Thank you lakeguy! I'm really glad you liked them! 😃 I was hoping to focus more on AI with this channel but people keep demanding GUI stuff instead 🤣🤣🤣 I would say that "number_of_input_features" is probably a more accurate way to describe "batch_size" but it's just a bit too long for my liking hahaha 😅 However, the "batch_size" I've specified in the vodeo is not exactly the input features themselves, but it's the number of features I would like each batch to include. input_features would be an accurate description in the following example: for input_feature, input_target in data: print(input_feature) You can see an example of this when we train this network in part 2 of this project (I saw you commented there too so I'm assuming you already got there 😁)

  • @magowiz82
    @magowiz823 жыл бұрын

    I wasn't able to use your notebook, the problem is with file paths, it doesn't seem to resolve them, even escaping spaces in "My Drive" with backslash.

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Hi Marcello, you need to replace my path with your path. Your Google drive looks different than mine and it has different folders. You don't need to remove spaces or anything - just specify a location that exists in you drive as you're not supposed to have access to mine 😉

  • @magowiz82

    @magowiz82

    3 жыл бұрын

    @@PythonSimplified mmm... Maybe I understood what went wrong, I dowloaded data, placed files in my drive, updated paths but perhaps what I did wrong is that I opened/used the notebook direcly from the link you posted. Perhaps I should have downloaded the whole folder, upload it to my drive and then open nb from my drive. Do you think that could be the issue? Anyway I think you did a great thing with this channel, I think that, like the for dummies books did their job teaching but keeping simple, you are using same kind of approach, plus you are smiling most of the times, it doesn't seem forced, also the way perform makes people at ease with your lessons. Oh and thank you for responding so quickly.

  • @magowiz82

    @magowiz82

    3 жыл бұрын

    @@PythonSimplified I was able to run preprocess_coraline after copying all to my drive and also open the notebook from there. So I found the problem.

  • @ManojKumar-tu1ts
    @ManojKumar-tu1ts3 жыл бұрын

    hi Mariya , can you explain what does happen in the backend , I mean when we use functions like train etc we just see that the machine gets trained from the data but what calculations will happen inside and what does the computer do to understand the data set(we never try to learn about it). please explain this because the pytorch usage or else using tensorflow is being done by many people but many lack the knowledge of the backend which is good to know so please try to do some videos on this concept . I also suggest you that don't do this concepts until you hit some larger number of subscribers because people are being obsessed with frameworks and forgetting to know how are those made , so these might not get better reach now but when you have a good amount of subscribers then it would give you a good value forgot to mention ...... your videos are great : )

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Thank you so much Manoj! I am very excited to read your comment because you are describing the exact same reason why I've created this channel in the first place! 😁 The concepts and math behind Artificial Intelligence is something you will start seeing on this channel in the very very near future (I'm not waiting for anybody, they can always join us 😉). I haven't seen many sources that explain these concepts in a simple way, so I feel obligated to share my input and try to help! You totally read my mind! Thank you so much for your support! 💖

  • @Mr-Casko
    @Mr-Casko Жыл бұрын

    Hey you look diferent???.... your a verry beatifull person ...God Bless ...please excuse my prior opinions i think your a valuable asset and i apreciate your resilience... thanks for helping me learn more also 🤙

  • @gaatutube
    @gaatutube2 жыл бұрын

    This lecture assumes you already know what pytorch is, what embedding_dim and linear1 linear2 etc. mean. There is no explanation of these terms in this lecture. :-( I might come back some day and watch this video again once I have the preliminary mathematical understandings. I do appreciate all the hard-work you are putting into making these videos (and I have enjoyed several other videos you have made ... but this clearly out of my league for now).

  • @richarddiaz9930
    @richarddiaz99302 жыл бұрын

    You know that’s crazy I had to make flashcards a lot of a lot of flashcards to remember projects or words thank you … but I do love to play with my circuit board yeah I know how many raspberry pies I buy computers I buy it’s a lot lol

  • @zanpajntar1
    @zanpajntar13 жыл бұрын

    Coding is easy with her.

  • @MelvinAdekanye

    @MelvinAdekanye

    3 жыл бұрын

    You know what else is easier with her. Explaining things. She makes it so easy.

  • @1conscience0dimension
    @1conscience0dimension2 жыл бұрын

    I think this is not needed to pass something in super() when inheriting a class. super().__init()__ should be enough

  • @anjanbora7943
    @anjanbora79432 жыл бұрын

    💋💋💋💋💋💋💋💋💋💋💋💋💋💋💋

  • @CoricComPlus
    @CoricComPlus3 жыл бұрын

    А почему ролики на английском? Что за комплексы?

  • @aries-eganmacdgbbit567
    @aries-eganmacdgbbit5673 жыл бұрын

    baby. Can you be my personal teacher. I am looking for a teacher. but i don't understand english. I have to use translation

  • @daniellachiche270
    @daniellachiche2703 жыл бұрын

    Machine Learning FOR BEGINNERS 1, 2 3, of course, but Pytorch 4 and 5 are too much for a beginner.

  • @droneguy69
    @droneguy693 жыл бұрын

    Are you single?

  • @PythonSimplified

    @PythonSimplified

    3 жыл бұрын

    Nope, I'm engaged! 💍

  • @marcioalexandre7610
    @marcioalexandre7610 Жыл бұрын

    This video was more confused... I have not understood what you did at the beginning and stopped.

  • @future_philosopher
    @future_philosopher Жыл бұрын

    Hello! I need some help with data = coraline + alice + brothers_grimm data[:10] this is the output i'm getting: ['parent', 'indirectobject3', '0', '139674796863440', 'resources', 'procset', 'pdf', 'text', 'extgstate', 'indirectobject33'] not sure what's going on.. would appreciate any help! Thank you for the amazing videos you make.

Келесі