Create a Simple Neural Network in Python from Scratch

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 พ.ค. 2024
  • In this video I'll show you how an artificial neural network works, and how to make one yourself in Python. In the next video we'll make one that is usable, but if you want, that code can already be found on github. I recommend watching at 1.5x speed, unless you're coding along.
    Coding starts at 2:30
    Part 2: • Create a Simple Neural...
    Github code for complete neural network: github.com/jonasbostoen/simpl...
    Additional reading:
    ♦ / how-to-build-a-simple-...
    ♦ iamtrask.github.io/2015/07/12...

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

  • @JonasBostoen
    @JonasBostoen  5 ปีที่แล้ว +169

    In the next video we’re going to be making a blockchain in JavaScript, so subscribe if you’re interested in that stuff!

    • @SoumilShah
      @SoumilShah 5 ปีที่แล้ว

      great video so made everything so easy

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

      Dow stupid schools blocked pip and zip archives so I can't install numpy

    • @itstatanka
      @itstatanka 4 ปีที่แล้ว

      Which compilar did you use?

    • @siddhant5697
      @siddhant5697 4 ปีที่แล้ว

      in which software r u coding??

    • @frankynakamoto2308
      @frankynakamoto2308 4 ปีที่แล้ว

      Polycode
      Can the neurons and inputs be placed together, like neurons with much built in data??
      Also I need a very powerful neural network for several different purposes, speech, faceID and math solving problems, do you have something that you made that is open source that you can share with me??

  • @johnc3403
    @johnc3403 4 ปีที่แล้ว +177

    "stay with me, it's gonna be ok"... dude, that's such a lovely sentiment. You were born to teach I think, with that ability to keep pupils onboard. Very good video my man, thank you so much..

  • @hfe1833
    @hfe1833 5 ปีที่แล้ว +729

    What the?....this is it, finally I found good tutorial

    • @Pancake3000
      @Pancake3000 4 ปีที่แล้ว +9

      same lol Ive finally can actually flippin understand thank much
      +1 sub
      i can english.

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

      I agree

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

      ye someone finally explains what it is XD

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

      same!

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

    “Stay with me, it’s gonna be okay” that makes me feel like I’m actually learning something and not just being told something

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

      (I know I’m late but) Literally came to the comment section about this 😂

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

    My friend, your explanation in 15 minutes gave more clarity to me than hours of crash course tutorials online. So simple and well explained. Awesome stuff my man!

  • @morphman86
    @morphman86 4 ปีที่แล้ว +171

    After watching hyper-advanced tensorflow/keras stock market prediction tutorials for a while, being completely lost, I stumbled on this.
    I finally, after weeks of trying to learn NN and decades of practical programming experience, understand it.
    The iterative backpedaling was what confused me with all of those other videos, but taken down to its most simple form, like in this video, I can now see that it's merely looking at what it got, what it was trying to get and make adjustments to the appropriate synapses based on that, then trying again.
    It's not the maths that confused me, it's how the machine actually learned. And that was perfectly demonstrated in this video. Thank you!

    • @RandageJr
      @RandageJr 4 ปีที่แล้ว

      Do you know where I can find these tutorials? It would be very helpful for me, thanks!

    • @jacobokomo1880
      @jacobokomo1880 4 ปีที่แล้ว

      kindly feel free to share with us Who was the teacher who took you through the Previous Tutorials. However, This teacher is doing well. Credits 💪

    • @GovindKumar-bt2ne
      @GovindKumar-bt2ne 4 ปีที่แล้ว

      B

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

      @Isaiah _ Neural Network

    • @KennTollens
      @KennTollens 4 ปีที่แล้ว

      I agree too. So many videos complicate and dance around simple mechanics. Knowing the flow of the engine and the simple concept of what is happening, the other videos might make more sense now that I can put it into context.

  • @mattisaderp8929
    @mattisaderp8929 4 ปีที่แล้ว +186

    "stay with me it's gonna be okay"

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

    This tutorial is a perfect blend of talking/programming and slides. Its also quick and to the point 8)

  • @brehontechologies
    @brehontechologies 5 ปีที่แล้ว +12

    Finally, a clear, straightforward tutorial to code along. GREAT JOB!

  • @calmo15
    @calmo15 4 ปีที่แล้ว +116

    Amazing video, too few sources do the absolute basics. however, can you please crank your volume up!

  • @paulschmidt8742
    @paulschmidt8742 4 ปีที่แล้ว +42

    Bro, it was much easier then I thought. Thx for explaining.

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

    What a fantastic way of explaining it. Whilst this is obviously not immediately useful, It's a sort of toy approach that gives you a building block to understand the greater scope.

  • @robertdraxel7175
    @robertdraxel7175 5 ปีที่แล้ว +17

    Most useful video on the internet for a total beginner, for anyone new to AI. Thanks.

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

    At the 10 minute mark and I just wanted to say that your explanations are clicking left and right with me thank you!!!!

  • @Oleg-kk6xv
    @Oleg-kk6xv 4 ปีที่แล้ว +2

    Thank you very much. I constantly see these videos about the theory of Machine Learning and AI but I have never found an in-depth start from scratch tutorial with mo libraries, all while explaining everything. Thank you!

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

    I watched a lot of videos about Machine Learning because I wanted to unterstand how that works. Non of these Videos explained so good like yours how a neuron and the adjustment actually works. Good work, now I finally understood it.

  • @coleboothman1158
    @coleboothman1158 5 ปีที่แล้ว

    Hey dude just saw this video from your post on /r/programming - This video is awesome! You're great at explaining everything. Neural nets can sometimes be confusing but this makes a lot of sense to me. Thanks so much!!

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

    The best one who can give you the right explanation of creating of a neural network from scratch.

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

    So far the best simplest and practical tutorial I got. U cleared all my doubt and little background in python helped me lot.

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

    This is what I'm looking for, on how to train your datasets by adjusting weights. Thank you so much!

  • @ankitds1369
    @ankitds1369 4 ปีที่แล้ว +8

    in output after training : you can use this, and this will round off the decimal as a round off value - print(np.round(outputs,1))

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

    Wow, I’ve been looking for a tutorial just like this for a long time! Subscribed! Please keep making videos!!

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

    Man, this was so to the point! Thanks for your efforts. Best NN basics tutorial I've found so far! Very very useful!

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

    Wow... The perfect tutorial.. I have been searching in the internet for a tutorial on how to make neural networks from scratch .
    now I got it.. this is soo cool...
    Very detail explanation...

  • @k.chriscaldwell4141
    @k.chriscaldwell4141 4 ปีที่แล้ว +4

    Superb! Using the seeded weights so that you and the viewer get the same results was a brilliant touch. Helps the viewer know if he miscoded or not. Thanks.

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

    2 minutes in and I already have a better understanding than 2 semesters worth of lectures

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

    Line no 16 : synaptic_weights=2 * np.random.random((3,1))-1
    this line makes an array of 3X1 or a matrix of size 3X1. I did not understand this line before I tried this line separately.
    This makes an easy grasp of the random concept, but as I learned in Soft Computing in my Btech, you can directly initialize the weights as 1, which will then get adjusted during training.
    you can also replace the line with it : synaptic weights=np.array([[1,1,1]]).T
    THANKS TO YOU for making this short and easy tutorial!

    • @Retriiiii
      @Retriiiii 3 หลายเดือนก่อน

      Hey can you tell me why are we multiplying 2 and subtracting 1?

    • @nocopyrightgameplaystockvi231
      @nocopyrightgameplaystockvi231 3 หลายเดือนก่อน

      ​@@Retriiiiiwhere??

    • @Retriiiii
      @Retriiiii 3 หลายเดือนก่อน

      @@nocopyrightgameplaystockvi231
      2 * np.random.random((3,1)) -1
      ^ ^

  • @ciencialmente9969
    @ciencialmente9969 4 ปีที่แล้ว +202

    1:39
    "so we need a little meth"

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

    This is by far the best explanation. I guess by keeping the complexity level of chosen example pretty low, you landed the message perfectly, thanks !!

  • @shimuk8
    @shimuk8 5 ปีที่แล้ว +9

    I joined my university 2 months late, absolutely had no idea how to learn the lost neural network project topic and then I saw your video !!! Thanks a lot dude !!! For saving my semester HAHAHA

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

      meaaaww hahaha nice, share it to any of your buddies if you think they need it ;-)

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

      @@JonasBostoen Oh yes already did that,,, right now you have blessings of many helpless students LOL

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

    At last... the video that doesn't just explain stuff but, but actually tells you what to do too!

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

    This was a such a great tutorial. Very clear, concise and well paced.

  • @JonasBostoen
    @JonasBostoen  6 ปีที่แล้ว +119

    Coding starts at 2:30

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

      Polycode ping your comment so others will see it!

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

      @@ChillGuyTH-cam maybe his firewall blocks icmp packets

    • @rr.studios
      @rr.studios 3 ปีที่แล้ว +1

      @@du42bz I read that as "pimp packets"

  • @REVscape95
    @REVscape95 5 ปีที่แล้ว +20

    waiting for the next video, this type of explanation really helps

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

    I have been looking for a toy example of Neural Networks, thanks to your video I get to see one. Your video is very concise. Thank you. Also, thank you for sharing your Python code.

  • @timothec.8216
    @timothec.8216 4 ปีที่แล้ว +2

    Thanks a lot. This is much more comprehensible than all I have watched and read

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

    Best tutorial on neural networks i have seen till now....thanks buddy😘

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

    Nice work! Finally found someone that can teach the way I can understand it..
    I subscribed and look forward to watching all your videos!

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

    Simple, Clear and straight to the point. Great Job!!!

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

    Dude this video was really helpful! Thank you for explaining the basics of neural networks! :D

  • @SureshSingh-en5uj
    @SureshSingh-en5uj 4 ปีที่แล้ว

    FINALLY!!.... I have been looking for such tutorial which teaches from scratch... That's Very good of you to do so... Keep it up bro.. Make more videos like this... BTW I am new to your channel. Just subscribed

  • @harlongbitimung4108
    @harlongbitimung4108 4 ปีที่แล้ว

    This video has taught me more than anything about ANN.

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

    Just a note on sigmoid_derivative, for myself as much as anyone else. Since you're inputting the output of sigmoid to sigmoid_derivative, he's using that sigmoid satisfyies the differential equation
    y'(x) = y * (1 - y)
    so we can compute the derivative sigmoid'(x) by inputing sigmoid(x) into [y --> y(1-y)]. That's very clever!

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

      But you should run the outputs through the sigmoid derivative, right? And the outputs are sigmoided by default, so shouldn't you use the sigmoid twice?

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

    I watched lot of Ann videos on TH-cam, and all of them missing something which I am not getting
    But thanks to you I got what I need. Especially explaining the working. Thank u again

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

      Akmal Eache thanks man

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

    What a great video! Keep up with the good work, thanks for sharing your knowledge

  • @jeffwads
    @jeffwads 4 ปีที่แล้ว +5

    It helps to have someone who actually knows how to break a "problem" down to its bare essentials. Excellent work.

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

    Completely new to this and you made it very easy to understand. Thank you and good job!

  • @Pancake3000
    @Pancake3000 4 ปีที่แล้ว

    This is the thing that finally helped me understand! Never stop doing the grade vids!

  • @landaravi
    @landaravi 4 ปีที่แล้ว

    This is the tutorial actually I'm searching for understanding of Neural network... Thanks a lot...

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

    Thanks this was so helpful it really cleared up a lot of my questions about the topics other videos said let’s not talk about that yet..., thanks again these videos are super helpful keep up the amazing work

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

    Incredible! I think this is the first video that has helped me understand the formulas behind a neural network! However, I was wondering how you implement the calculation of biases into the actual code and Backpropagation steps and formula?

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

    what a excellent explanation of complex subject! Please keep up the videos.

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

    thx for the totorial gived the neural network my own training data and it worked geat!

  • @title601a
    @title601a 5 ปีที่แล้ว

    NICE!!!!! Finally, I can understand what is NN and backpropagation. Simple and Easy to understand. Thank a lot to Polycode :)

  • @this-is-bioman
    @this-is-bioman 5 ปีที่แล้ว +6

    Holy cow! I love this video!

  • @madanvishal1
    @madanvishal1 4 ปีที่แล้ว

    Excellent Explanation making things crisp and clear

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

    So i tweeked training outputs to 1,1,1,0 with an interation in range of 100,000 and the computer gave me a perfect answer to the third output of 1. The other outputs where close to true answers but i didn't think the computer could give a 100% true answer. I guess im confused that it didn't take that many training loops to give that answer.
    Btw great video finally got me to get the computer out and start!

  • @SuryaPrakashVIT
    @SuryaPrakashVIT 4 ปีที่แล้ว

    Wonder full video, this will definitely turn upside down of my project. Thank You so much!!! :)

  • @dridihamza7157
    @dridihamza7157 4 ปีที่แล้ว

    this is on of the best yet simple explanation. keep up

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

    You did a great job, you should make more videos. May be explaining how to make a more complex neural network.

  • @charlesgrinstead580
    @charlesgrinstead580 4 ปีที่แล้ว

    Very clear and well explained. Thank you!

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

    Great tutorial, better than the usual,"Just use this library...."

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

    Your video is a life saver, thanks! Hope you make more such videos!

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

    Love your vids dude! Keep it up! ;)

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

    i need more, thats awesome

  • @marco.nascimento
    @marco.nascimento 5 ปีที่แล้ว

    Very nice!! Consise but well explained, good work.

  • @4Dtechcurious
    @4Dtechcurious ปีที่แล้ว

    This is Informative, love it!

  • @atibyte
    @atibyte 4 ปีที่แล้ว

    Nice and simple explanation, thank you!

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

    Amazing tutorial, keep up the good work

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

    Dude!!! This is enlightening! Thanks

  • @industrialdonut7681
    @industrialdonut7681 4 ปีที่แล้ว +32

    15 minute video... takes me 2 hours to get through XD

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

    Nice presentation. Made it feel very simple

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

    Finally a video I can understand! Thank you

  • @TheThiagosp1
    @TheThiagosp1 4 ปีที่แล้ว

    Amazing video! very well explained. Congratulations

  • @cking9145
    @cking9145 4 ปีที่แล้ว

    You are my hero! My prof is so bad explaning exact the same things over I guess 4 or 5 lesson of 3 hours each. And you just need some minutes ... haha I subscirbed you immediately. I need more of it!

  • @samayvarjangbhay8987
    @samayvarjangbhay8987 5 ปีที่แล้ว +6

    finally a properly structured tutorial

    • @0siiris
      @0siiris 5 ปีที่แล้ว

      Nice profile pic 😂

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

    Thanks for explaining .. Nice job!

  • @Adam-ze3pr
    @Adam-ze3pr 2 ปีที่แล้ว

    Hai, thank you, this is very easy to catch for newbie like me. Simple and clear. Keep going 👍

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

    Excellent explanation!!!!!! Thank you very much

  • @alslaboratory570
    @alslaboratory570 4 ปีที่แล้ว

    Thanks so much! After days of looking, found a great tutorial and can expand my knowledge!!!

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

    Very clean! VERY NICE! 🙏😍 Great Video! 😊😊😊 thank you

  • @user-qm9dp9ej5r
    @user-qm9dp9ej5r หลายเดือนก่อน

    you are so wonderful , i quite understand by you basic and easy to learn method, thanks

  • @newdawn8691
    @newdawn8691 4 ปีที่แล้ว

    Great Job, Very well explained.

  • @chriswritt8268
    @chriswritt8268 5 ปีที่แล้ว

    Great explanations! Keep it up!

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

    Very well explained!

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

    Good explanation. Valuable content.

  • @chrispap5496
    @chrispap5496 4 ปีที่แล้ว

    Thanks for this awesome tutorial!

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

    One of the best coding videos!

  • @laurentiubistrian6372
    @laurentiubistrian6372 5 ปีที่แล้ว

    thanks for the detailed explanation!

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

    This video is 100% gold, thank you !

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

    Great Stuff, Keep it up !!

  • @anilsarode6164
    @anilsarode6164 5 ปีที่แล้ว

    Thanks a lot .....love the way you made the video

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

    Thank you for this wonderful video :) !

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

    wow couldnt be better explained, keep the good job.
    there are not many sources for newbs machine learners, specially with no libraries !!

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

    Thanks so much for this video, it helps me so much!

  • @louiebostoen6663
    @louiebostoen6663 6 ปีที่แล้ว

    Very helpful, subscribed!

  • @mirosaide8786
    @mirosaide8786 4 ปีที่แล้ว

    Well explained. Congrats.

  • @SoulEaterZika
    @SoulEaterZika 4 ปีที่แล้ว

    Thank you so much. This tutorial is direct, clear and instructive. 1 more inscribed.

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

    Hi Sir! Such a awesome video! Thank you very much for that!!!

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

    Lots of people can code only few can teach.. well done