Neural Networks (E02: predictions – python)




[ad_1]

In this episode we look at how neural networks can be represented with matrices, and create a simple feedforward network in python.

Note: at 2:31 the second bias vector should only have two rows, not three.

Code:
https://github.com/SebLague/Neural-Network-python

I owe a lot to this excellent online book on neural networks:
http://neuralnetworksanddeeplearning.com/

Learn more about weight initialization:
http://cs231n.github.io/neural-networks-2/#init
(note: numpy.random.randn and numpy.random.standard_normal are functionally equivalent, the latter just takes a tuple for the shape parameter).

Support the creation of more tutorials:
https://www.patreon.com/SebastianLague
https://www.paypal.me/SebastianLague

Source


[ad_2]

Comment List

  • Sebastian Lague
    November 11, 2020

    I did not know this channel had a neural networks tutorial! Time to go to episode one

  • Sebastian Lague
    November 11, 2020

    Technically, you could have just done list(zip(…)) 4:30

  • Sebastian Lague
    November 11, 2020

    As a JavaScript coder i am so incredibly lost

  • Sebastian Lague
    November 11, 2020

    im 12 and i actually kinda understand all of it

    go home adults

  • Sebastian Lague
    November 11, 2020

    I spent half an hour having to install sublime text, import numpy, figuring out you have to do .py when saving something, and copy and past the scripts because I though something was wrong with the previous text editor I was using. The real problem was I forgot to put the “a” after return, and it was just returning nothing. Whatever PyCharm is living hell to work with anyways

  • Sebastian Lague
    November 11, 2020

    I understood none of that, but I watched it anyway.

  • Sebastian Lague
    November 11, 2020

    I had a lot of terrible experiences in calculus and precal classes, my paws are getting sweaty just looking at those brackets and when you showed that 2 by 3 matrix my hard stopped! This is really informative, almost soothing, but at the same time my fight or flight response is getting activated.

  • Sebastian Lague
    November 11, 2020

    I got the error numpy has no attribute matmul in NeuralNetwork

  • Sebastian Lague
    November 11, 2020

    I'm recreating that in Lua and I think I'm ready to die

  • Sebastian Lague
    November 11, 2020

    Which ide you are using,
    Is it pycharm or vs

  • Sebastian Lague
    November 11, 2020

    you mistakenly added a 3rd bias in b2..

  • Sebastian Lague
    November 11, 2020

    (4:004:30) i didn't think python could get any easier until whatever that was.

  • Sebastian Lague
    November 11, 2020

    I'm curious about what colour scheme he's using for his code. Any ideas?

  • Sebastian Lague
    November 11, 2020

    2:50 b2 Is 2×1 not 3×1

  • Sebastian Lague
    November 11, 2020

    "Everywhere I go.. I see his number.."
    "Who's?"
    "Euler's."

  • Sebastian Lague
    November 11, 2020

    I wanted to learn neural networking and here I go !

  • Sebastian Lague
    November 11, 2020

    I think I've seen similar classes in U of Alberta, but I think it's in 500 level :v

  • Sebastian Lague
    November 11, 2020

    I understood something but then also nothing. I guess I have to watch it at least 99 times and draw graphically what every line of code does xD bruh

  • Sebastian Lague
    November 11, 2020

    Could someone make this clear to me? Im not sure I fully understood.
    They way I understood it is that the hidden layer has 3 neurons. These neurons all have values of 0-1. This value is calculated and represented as a1, a 3×1 matrix that holds the 3 values.
    I then dont undserstand how the 2 output neurones (matrix 2×1) is calculated.
    I understand you multiply a1 by w2 and add b2, (represented with matrixes: 3×1 X 1×3 + 2×1) and then do the sigmoid function to normalize the result and make it fit between 0 and 1. I just dont understand how the 2×1 output matrix is created. I did it on paper and got a 3×1 matrix.
    I apreciate the help.

  • Sebastian Lague
    November 11, 2020

    Sublime text 🙂

  • Sebastian Lague
    November 11, 2020

    Great, now time to do it in c#

  • Sebastian Lague
    November 11, 2020

    Him: (quantum rocket brain mechanics)
    Me, who has no idea what's going on: nodding

  • Sebastian Lague
    November 11, 2020

    wow yet again making this so easy to understand

  • Sebastian Lague
    November 11, 2020

    Just getting into neural networks and these videos are great visualization. Does anyone know how he was visualizing his models? Was it a graphical python library or something else?

  • Sebastian Lague
    November 11, 2020

    @ 7:53 Is there any reason to us e over any other rational or irrational constant (such as pi or 2) in your activation function?

Write a comment