Build a Neural Net in 4 Minutes

How does a Neural network work? Its the basis of deep learning and the reason why image recognition, chatbots, self driving cars, and language translation work! In this video, i'll use python to code up a neural network in just 4 minutes using just the numpy library, capable of doing matrix mathematics.

Code for this video:

I created a Slack channel for us, sign up here:

Please Subscribe! That is the thing you could do that would make me happiest.

I recently created a Patreon page. If you like my videos, feel free to help support my effort here!:

2 Great Neural Net Tutorials:

(please subscribe for more videos like these! )

1.

2.

Awesome Tutorial Series on Neural Networks:

The Canonical Machine Learning Course:

Curious just how inspired neural networks are from brain architecture? Take some time to learn about the human brain! This is my favorite intro to neuroscience course:

Follow me:
Twitter:
Facebook: Instagram: Instagram:
Signup for my newsletter for exciting updates in the field of AI:

Hit the Join button above to sign up to become a member of my channel for access to exclusive content! Join my AI community: Sign up for my AI Sports betting Bot, WagerGPT! (500 spots available):

Joe Lilli
 

  • @MyFrenchfries says:

    This is amazing! You managed to squeeze all that info into a 3 min video, but I had to watch it like 5 times, so my mind can keep up with your voice. lol

  • @Vancha112 says:

    alright, first of all, amazing video’s! but i would like to point out that when running this program, in addition to the import numpy as np you corrected in the video yourself, there are a couple of other problems 🙂

    on line 7: return 1/(1+np,exp(-x)), the comma after np has to be changed to a dot.
    on line 10: X = np.array([[0..,1]], the last square bracket has to be removed because it would make for invalid syntax, and the dots should be comma’s.
    on line 28: for j in xrange(60000):, the xrange has to be changed to just range, xrange is not recognized.

    i guess that’s about it, after running it now it works like a charm!

    thanks again!

    here are the same lines after the corrections:

    line 7: return 1/(1+np.exp(-x))
    line 10: X = np.array([[0,0,1],
    line 28: for j in range(60000):

  • @plaaosert says:

    watch for 3 minutes, understand for 3 hours

  • @fuzzypenguino says:

    completes python class
    realizes knows nothing about python

  • @villikuha7387 says:

    would be pretty fucking helpful to mention what the objective of the network is. now it’s just “layer layer layer prediction layer layer error DONE next video”.

  • @troy8423 says:

    I get that your channel is branded by these quick videos, but you should consider doing a follow up “explanatory” video; I think a lot of people would find it helpful

    • @SirajRaval says:

      thanks Troy. I want the live streams to be that, but they aren’t really connected directly to the quick videos. I can do that more often

    • @kinsleyKJV says:

      please do more of those explanatory vids,coz these ones are just too fast my man

    • @CharltonLepkofker says:

      +Siraj Raval Yes I totally agree with this comment and I think many other people will too once this channel scales. I’m a high schooler trying to learn computer science on my own and this stuff is obviously way above my head, but I still find it incredibly enjoyable. However, a more in-depth, elucidative video would be great for people like me to really let the concepts sink in. Your content is great though!

  • @Attakijing says:

    the people saying “you should slow down” are not aware that they probably wouldn’t have clicked on a video titled “build a neural net in 24 minutes”

    • @Th4w says:

      I would. In fact, I’d prefer a 10-hour version.

    • @MrBroybros says:

      But I wouldn’t. High schoolers don’t have 10 hours on hand lol.

    • @sworoopmahapatra6921 says:

      Then label the video as “in 11 lines”, instead of “4 minutes”. and take more time in explaining.

      The video is awesome, but some of us are not fast learners. We need some explaining as well. 🙂

    • @nandfednu3502 says:

      I feel like the internet should be the safe space wherein I dont have to learn at a snails pace to avoid that social distaste that comes along with self-identity tied to rat race by those whose wits leave them in disgrace?

    • @honkytonk4465 says:

      Nand Fednu do you identify as a PJW?(programming justice warrior)

  • @osmanbaskaya7400 says:

    1. import numpy as np
    2. deriv=False # should be equal sign in nonlin function. deriv variable’s default value.
    3. same function 1/(1+np.exp(-x)) # not comma.

  • @StephenRoseDuo says:

    bro import numpy as numpy?

  • @cristiansoare8456 says:

    *walks away from computer and starts reconsidering life choices*

  • @nands4410 says:

    There’s something in you that makes me watch more of your videos even if I don’t understand them unlike those boring MIT/IIT lectures.
    Makes me feel smarter.

  • @robertmielewczyk9804 says:

    if you watch it at 2x speed you can build your network in 2 minutes!!!!!

  • @mailoisback says:

    Always watch at 2x speed to learn 2x faster. Time is precious!

    • @SirajRaval says:

      so precious

    • @benrex7775 says:

      I do the same. If you ignore music videos I watch nearly all videos on YouTube twice the speed. I would say about three times the speed would be the limit for me in videos with speaking in it but YouTube doesn’t offer that.

    • @raisalengko9056 says:

      More fast more close to God. Wait till your nose got bleeding. Then you’ll learn how to fly

    • @Martinit0 says:

      Here’s a trick I learned from a friend playing poker online: open several browser windows. Learn in parallel x10 faster !

    • @jacksonzheng3103 says:

      Also I always make sure I have a spare few ram sticks lying around ready to plug into that DIMM slot on the back of my head for those high intensity moments.

  • @StingerSecSol says:

    I didn’t understand much of the code you shared, but copied it into the IDE and it ran after a little troubleshooting. Now I get to play with it and figure out exactly what each line does. Thank you for putting out a short but working program to explain it. Love your videos!

  • @DanielGallagherMusic says:

    First, I like that he kept his promise (too many videos say under 4 minutes and it’s like 12 minutes long). Second, the speed is actually great for learning efficiently, in that you can just watch it all the way through, and pause rewind where you need to. This makes it really accessible to learners at many different levels so people can easily take it at their own pace. Third, just plain ole good explanation. Bravo. *round of applause*

  • @MegaJefflin says:

    1:17
    the first line of code should be
    import numpy as np
    and at line 8 is
    return 1/(1+np.exp(-x))
    at line 12
    X = np.array([0, 0, 1],

  • @Goldenfightinglink says:

    I remember watching this back in late May, knowing nothing of what you’re going through. After messing around for a short while in python, I have a vague sense of the blur in front of me

  • @danielgonzales2047 says:

    Thank you for posting the suggested articles in your description. Those are helping out soooo much for understanding neural networks!!!!

  • @eleos5 says:

    Thank you so much for this! I love this style. It tells me everything I need to know and I can learn those things at my own pace by watching other videos about it.

  • @Learning_Daily says:

    Have you ever experienced frustration in learning something new to you, then you come across a video which gives you that “Ah ha, it all clicks!” moment? This video did that for me, thanks!

  • >