Neural Network from Scratch in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ค. 2024
  • How do you code a neural network from scratch in python? What is a neural network and how does it remember things and make decisions? That's what we examine in this tutorial. We will explore the basic math behind the inner workings of a feed-forward neural net and I try to explain it as easily as possible. This is supposed to be a neural net for dummies video. :) And along the way, we will together code our own neural network in Python from scratch.
    If you are interested in deep learning, machine learning, ai or data science, this tutorial might be a good start in the world of artificial neural networks for you! The python code explained in the video tutorial is linked here in the description.
    🙏 Support me: / kiecodes
    🛰 Join our Discord, to interact with other Coders and me: / discord
    🧠 Pick my brain: calendly.com/kiecodes/ai-cons...
    Check out my newest video: • How to use the OpenAI ...
    The code written in this video can be found on GitHub:
    github.com/kiecodes/intro-neu...
    Questions of the day:
    ■ What is your favorite Whisky?
    Timestamps:
    00:00 Intro
    00:59 What you will learn
    01:50 What is a neural network?
    03:48 The math of a neuron
    09:39 The activation function
    12:25 Programming a neuron
    15:42 Limitations of one neuron
    17:27 Constructing the XOR-Net
    18:38 Programming the XOR-Net
    ---
    This video contains advertising content.
    ---
    Attribution:
    ■ Biological Neuron Illustration By Quasar Jarosz at English Wikipedia, CC BY-SA 3.0, commons.wikimedia.org/w/index...
    #python #machinelearning #neuralnetworks
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 92

  • @KieCodes
    @KieCodes  3 ปีที่แล้ว +7

    Hey Coders! 🤓
    In this video, we will write our first neural net from the ground up. No external libraries needed. On the way, we will also explore the math of a neural net. And I really tried to make it understandable, even if you don't consider yourself a math genius. Please let me know if this video helped you to understand NNs a little bit better. Cheers! 🥃

    • @momodoubjallow2585
      @momodoubjallow2585 3 ปีที่แล้ว +1

      You nailed it once again

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Thank you! I am glad you like it.

    • @StefanKastner
      @StefanKastner 3 ปีที่แล้ว +1

      This is really well done and explained. Thank you for this. The only thing that irritated and annoyed me throughout the video is the "blubb" sound when you showed an image or changes to them.

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Hey Stefan, thanks for your kind words and your feedback. I am still figuring out my style on all regards and constructive criticism is always more than welcome. So thank you again! 🙏

  • @mikesmith853
    @mikesmith853 3 ปีที่แล้ว +4

    Brilliant! Thanks for putting this together. Looking forward to the next one!

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Hey Mike! Thank you for your kind words. 🙏 I am already working on the next one.

  • @nikibowe
    @nikibowe 3 ปีที่แล้ว +6

    I found you through your genetic algorithms video, you are an amazing teacher and you really got me excited about learning again :)

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Wow. Thank you for your kind words. Comments like yours really help me finish the next video.

  • @mehdi7187
    @mehdi7187 3 ปีที่แล้ว +5

    You channel is so underrated, you deserve so much more subscribes ! Many thanks to your efforts, you are great !

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Thank you. 🙏

  • @kaivalyapatkar9288
    @kaivalyapatkar9288 ปีที่แล้ว +3

    This is unbelievable! So many concepts clarified in 20 minutes! Thank you so much for your efforts!

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

      Thank you very much! 🙂

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

    Thanks for the video, the most simple explanation of principal of work neural network 🎉

  • @komalgupta2226
    @komalgupta2226 3 ปีที่แล้ว +8

    just today found you searching about genetic algorithms and fell in love with that😊. i request you to make a tutorial series about machine learning plzzzz

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      I am on it. My coming videos will be about neural nets, genetic algorithms and other ML techniques. It is really an exciting topic to talk about. Thank you for your kindness! 🙏

  • @jewpcabra666
    @jewpcabra666 3 ปีที่แล้ว +1

    Great stuff! Looking forward to the future videos!! Exciting 2021

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว +1

      Thanks Elliot! Me too. I hope it will be fun ride. 🙏

  • @chibuzor_
    @chibuzor_ 2 ปีที่แล้ว +1

    Great video! Best explanation I’ve come across. You’ve earned a subscriber. Keep it up!👍🏾

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

      Thank you so much! 🙏

  • @NeerajGupta-ot9eq
    @NeerajGupta-ot9eq 2 ปีที่แล้ว +4

    Ohhhh my lords... this was one of the, if not, THE BEST video on neural networks(machine learning) that I came across on this platform. I love your explanation style and the way you simplify everything... I won't lie, I had given up on Machine Learning and Artificial Intelligence because there was just sooooo much to learn at the same time. This video alone helped me reignite the fire I needed to start learning this topic with great curiosity. Thank you so much for making such an amazing video!
    (I'm definitely recommending this channel to all of my juniors at my college)
    💜💜💜

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

      Oh wow. Thank you. Comments like yours keep me going. 🙏

  • @eugenblatz
    @eugenblatz 3 ปีที่แล้ว +1

    Can't wait any longer, must watch this video 😳

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Now is your time. 😎

  • @TheMLover
    @TheMLover 2 ปีที่แล้ว +1

    Duuuude, you are incredible! Please dont stop researching neural networks

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

      Thank you. 🙏

  • @empowercode
    @empowercode 3 ปีที่แล้ว +1

    Hey! I just found your channel and subscribed, love what you're doing!
    I appreciate how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your TH-cam Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos!
    Cheers, happy holidays, and keep up the great work!

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Thank you for your kind words, EmpowerCode. 🙏

    • @empowercode
      @empowercode 3 ปีที่แล้ว +1

      @@KieCodes No problem!

  • @FailYior
    @FailYior 2 ปีที่แล้ว +1

    Genuine coder produces genuine NFTs. You'll make big name soon.

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

      Thank you. 🙏

  • @rtross
    @rtross 3 ปีที่แล้ว +1

    Fascinating stuff. I'd like to learn more about the types of problems and also the types of data-structures that neural nets are suited to.

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Thanks Robert! I will try to address that. 🙂

  • @aisyjeff95
    @aisyjeff95 2 ปีที่แล้ว +1

    you are amazing. your videos helped me a lot in my phd research. wish I could buy you a coffee

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

      You are more than welcome my friend. 🙏 Rock on! 🚀

  • @paulbrown5839
    @paulbrown5839 3 ปีที่แล้ว +1

    Nice video man. Well explained

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Thank you. 🙏

  • @kadansalmon6292
    @kadansalmon6292 2 ปีที่แล้ว +1

    I don't usually write youtube comments, but i have to say that this video explained the concept so well

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

      Thank you. 🙏

  • @joaogranate6821
    @joaogranate6821 3 ปีที่แล้ว +1

    Nice one man! Anything soon about Harmony Search algorithms?! Can't wait for more videos!

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Thank you! What do you mean by Harmony Search algorithms? Do you have any links regarding to this?

  • @v-for-victory
    @v-for-victory 2 ปีที่แล้ว +1

    Really good videos and very entertaining.

    • @KieCodes
      @KieCodes  2 ปีที่แล้ว +1

      Thank you. 🙏

  • @user-rp6dd8sn4z
    @user-rp6dd8sn4z ปีที่แล้ว +1

    Bro, we missed you!)

    • @KieCodes
      @KieCodes  ปีที่แล้ว +1

      Thank you. I will be back.

  • @meguellatiyounes8659
    @meguellatiyounes8659 3 ปีที่แล้ว +1

    Great video

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Thank you for your kind words, Meguellati Younes. 🙏

  • @AdamWong
    @AdamWong 3 ปีที่แล้ว +1

    Disappointed that you don't like Lagavulin or Laphroaig. Those are my favourite. But fantastic video! You got a sub!

    • @AdamWong
      @AdamWong 3 ปีที่แล้ว +1

      On second glance you must not like peat eh

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      I used to be a fan of Laphroaig but somehow got away from smokey Whiskys.

  • @curtezyt1984
    @curtezyt1984 ปีที่แล้ว +2

    bro where are you other next videos on this topic ?

  • @abdallamohsen458
    @abdallamohsen458 ปีที่แล้ว +1

    for a moment i thought you gonna implement neucler bumb because of your acsent

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

    Sir on quantum artificial intelligence🤖 please

  • @veronicanatividade
    @veronicanatividade 3 ปีที่แล้ว +1

    OMG! You don't like Talisker 10! Despite that, thank you for the very well explained tutorial!

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      You are very welcome. 🙏

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

    Maybe we can use difrent activation for single neuron. Or mix of some activation

  • @jeremieleibl8462
    @jeremieleibl8462 2 ปีที่แล้ว +1

    Hey! It's been a while since I've seen you active, I hope you're doing well!

    • @KieCodes
      @KieCodes  2 ปีที่แล้ว +1

      Thank you. I am okay. My normal life as a software developer currently gets the best of me unfortunately.

    • @jeremieleibl8462
      @jeremieleibl8462 2 ปีที่แล้ว +1

      @@KieCodes no problem, I get that😅
      Take care!!!

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

    Great angle. Not seem anywhere else! (and I watched more than 20 videos of basics of AI!)
    Liked your videos a lot.

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

    1:14 Is it like training a neural network with a certain amount of data?

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

      Hey I am not sure what you are asking giving the timestamp. Could you elaborate?

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

      I'm sorry, I got hung up on your words "given task". I was thinking, does that refer to neural network machine learning?@@KieCodes

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

    If you have multiple layers, how do you determine what the next {forward} bias and weights are?

    • @KieCodes
      @KieCodes  8 หลายเดือนก่อน

      What do you mean by determine?

    • @deeber35
      @deeber35 8 หลายเดือนก่อน

      @@KieCodes The biases for any following layers are just randomly selected, like done for layer 1?

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

    Thanks for the video. Im new to python, but not to programming and ai, but I just want to throw this in, I don’t think that neural networks work at all like real neurons, why do I say that, because we humans don’t spend hours and hours learning what an object is, we see it once and that’s it. that’s it.

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

      Humans have a better training algorithm.

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

      But how do you explain we don't know how to walk when we are born '-'

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

      @@cristianhenriquez1355 Well, we learn, but what i m saying is that we don’t learn the way neural networks learn, because we can feel the data, computers cannot, we also don’t need to see millions of images to know what a face is, or we don’t need to see millions of people walking to learn how to walk, we also learn how to do things in different ways, one person will learn something, but not do it exactly like the other person, and we are always learning and no one is training us.

  • @crankhere9849
    @crankhere9849 3 ปีที่แล้ว +1

    Are you referring from Neural Networks, Fuzzy Logic and Genetic
    Algorithm: Synthesis and Applications

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Hey, no I don’t. I just googled it and found out it is a book. Maybe I should read it. Have you? Is it good?

    • @crankhere9849
      @crankhere9849 3 ปีที่แล้ว

      @@KieCodes We have it in our syllabus, it used same logic, xor example. and few diagrams, felt like you are referring same

    • @crankhere9849
      @crankhere9849 3 ปีที่แล้ว

      I dont like books, i just scroll on how it looks and found that.

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      No. XOR is just very very common example to explain the linear separation problem. I learned that example from Andrew Ng, maybe he read that book. 😅

    • @crankhere9849
      @crankhere9849 3 ปีที่แล้ว

      @@KieCodes 😁

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

    sir how can we get the value of NAND as [1.5,-1,-1] OR as [-0.5,1,1] and AND as [-1,1,1]. Can you please explain this? Thank you so much sir.

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

      do you know it yet?

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

      Please explain this part as I am not sure where how these numbers were defined?

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

    whats the next video after this?

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

      Thats a good question …

  • @droneguy69
    @droneguy69 3 ปีที่แล้ว +1

    That was painful, interesting but painful.

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      I hope it was not too painful and you’re good now. 😅

    • @droneguy69
      @droneguy69 3 ปีที่แล้ว

      @@KieCodes lol

  • @masumasi
    @masumasi 3 ปีที่แล้ว +2

    Show me the Neurons!

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Here they are! 😎

  • @greob
    @greob 3 ปีที่แล้ว +1

    Are these sound effects from Half-Life 2?

    • @KieCodes
      @KieCodes  3 ปีที่แล้ว

      Haha. Nooo. 😅

  • @saydome
    @saydome 2 ปีที่แล้ว +1

    "Congratulations, you just programmed your first neural net in Python" - whoopsie, i hate Python sorry, so i just translated the example to c++, hope it still count....

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

      Great stuff!