Coding A Neural Network FROM SCRATCH! (Part 2)

  Рет қаралды 15,743

John Sorrentino

John Sorrentino

Күн бұрын

Пікірлер: 52
@FlatterBaker
@FlatterBaker 11 ай бұрын
I smell an underrated channel. You are literally the savior of my science fair project, thank you so much.
@DarthAnimal
@DarthAnimal 2 жыл бұрын
The Brain function can be heavily simplified You can put the two edge cases outside of the loop, caling layers[0], and layers[layers.length-1], and having the for loop start with i=1, and run while 1 < layers.length -1
@willysmb-bo2vn
@willysmb-bo2vn Жыл бұрын
Hey! I'm wondering when Part 3 is coming out. Can't wait to see it!
@PatrykPonichtera
@PatrykPonichtera Жыл бұрын
I've seen a lot of videos about Neural Networks and yours is the one that explains it in an understandable manner (Or maybe the 10th time is the charm) I'm curious to see the next one
@drewdowsett
@drewdowsett 2 жыл бұрын
A great series. Not only for content, but well edited too. Cheers John.
@asyncmanagement
@asyncmanagement 2 жыл бұрын
we need the continuation, really
@voil6161
@voil6161 2 жыл бұрын
I was following along in python. Here's the code if anyone wants it. I didn't test it though because I don't really know how to use it. Tutorial was too short ): networkShape = [2, 4, 4, 2] class Layer(object): def __init__(self, n_inputs, n_nodes): self.n_nodes = n_nodes self.n_inputs = n_inputs self.weightsArray = [n_nodes, n_inputs] self.biasesArray = [n_nodes] self.nodeArray = [n_nodes] def forward(self, inputsArray): self.nodeArray = [self.n_nodes] for i in range(self.n_nodes): # Sum of the weights times inputs for j in range(self.n_inputs): self.nodeArray[i] += self.weightsArray[i, j] * inputsArray # Add the bias self.nodesArray[i] += self.biasesArray[i] def activation(self): for i in range(self.n_nodes): if self.nodeArray[i] < 0: self.nodeArray[i] = 0 def awake(): global layers # layers = Layer(len(networkShape) - 1) layers = [] for i in range(len(networkShape) - 1): # layers[i] = Layer(networkShape[i], networkShape[i + 1]) layers.append(Layer(networkShape[i], networkShape[i + 1])) def brain(inputs): for i in range(len(layers)): if i == 0: layers[i].forward(inputs) layers[i].activation() elif i == len(layers) - 1: layers[i].forward(layers[i - 1].nodeArray) else: layers[i].forward(layers[i - 1].nodeArray) layers[i].activation() return layers[-1].nodeArray
@TheAstrocricket
@TheAstrocricket Жыл бұрын
sick
@deffman32tech
@deffman32tech Жыл бұрын
Thanks!
@AgentCryo
@AgentCryo 3 ай бұрын
why python?
@mehmatrix
@mehmatrix 2 жыл бұрын
Great video. Thanks for the effort. I'm looking forward to see the part 3. Cheers,
@RealChristopherRobin
@RealChristopherRobin 2 жыл бұрын
Let's gooooo, part 3 please!
@slarcraft
@slarcraft 7 ай бұрын
Nice video! In general I'd say a neural network is still a black box even if you built it and know the values of all the nodes, weights, biases and layers.
@patricksturgill9441
@patricksturgill9441 Жыл бұрын
Hopefully you'll finish this eventually! I enjoyed the last two videos.
@AlMgAgape
@AlMgAgape Жыл бұрын
part 3 how to set up in unity?
@DanielYong-o1k
@DanielYong-o1k Жыл бұрын
isn't the 'layer' in layer[ i ] = new Layer( networkShape[ i ], networkShape[ i + 1 ] ); supposed to be 'layers' ?
@bencebob8055
@bencebob8055 Жыл бұрын
thank you so much! this is exactly what i need for my uni project
@wyrdokward2290
@wyrdokward2290 Жыл бұрын
Great video ! I'm really looking forward to see how the network will be trained
@Bloodbone
@Bloodbone 2 жыл бұрын
Hey! I wonder when episode 3 will come out?
@JohnnyCodes
@JohnnyCodes 2 жыл бұрын
Hey! I’m almost done with it, hoping to have it out in less than a week!
@animalracer3728
@animalracer3728 Жыл бұрын
@@JohnnyCodesCan’t wait for it!!!
@gustavosalmeron2013
@gustavosalmeron2013 Жыл бұрын
That was an excellent, practical video on neural networks! As someone just beginning to dig into this subject, I love it! Also, clean and neat code. Enjoyable to read (although I'm not a fan of nesting classes).
@gustavosalmeron2013
@gustavosalmeron2013 Жыл бұрын
Also, your channel is criminally underrated.
@paufernandezpujol987
@paufernandezpujol987 2 жыл бұрын
Hi, is part 3 coming out?
@t.p.5088
@t.p.5088 7 ай бұрын
best video ive ever seen not gonna lie
@gagaoqphs2052
@gagaoqphs2052 Жыл бұрын
Please Upload Part 3
@simi8220
@simi8220 Жыл бұрын
Part 3?
@raouftouati4711
@raouftouati4711 2 жыл бұрын
just amazing 🤩🤩
@danielcezario2419
@danielcezario2419 Жыл бұрын
amazing !!! waiting the training part
@TheZazatv
@TheZazatv Жыл бұрын
O man thank you! Such a gem content out here :) I'm a Swift Dev the code is not hard to grasp
@TheZazatv
@TheZazatv Жыл бұрын
btw is part 3 coming up or nah?
@JohnnyCodes
@JohnnyCodes Жыл бұрын
@@TheZazatv Yeah been really busy with work and starting my own company (Ironically ita a video editing company). I am hoping to finish it this week but I guess that has always been the goal lol. But I am hoping this week will be the week
@TheZazatv
@TheZazatv Жыл бұрын
@@JohnnyCodes oh nice we’ll be patiently waiting. And congrats on launching ur company 🫰
@bigmike7112
@bigmike7112 Жыл бұрын
@@JohnnyCodes Still waiting :D
@aesvarash3256
@aesvarash3256 2 жыл бұрын
I wonder that the shape of network . I mean how many hidden layers and nodes should we use for each sample . And also wondering about third part .
@erinleighlynch9400
@erinleighlynch9400 Жыл бұрын
:') Episode 3 where are you... this is the new Half Life 3 for me. Am I wrong in thinking the weights and biases were never given values here? should those be made in this class too?
@JohnnyCodes
@JohnnyCodes Жыл бұрын
I believe you are correct the weights and biases were not given values yet, they are going to be randomly generated and then randomly modified each time the creatures reproduce. This is going to be in part 3............ someday... But luckily someone lifted the curse and I can now finish part 3 lmao, I responded to this amazing comment today by W_Shorts: kzbin.info/www/bejne/f5fbZJ6OaruEnpY&lc=UgzIeWiWP2lb2gqR8_h4AaABAg.9lUU-CvLP8G9od6BhfRwBh
@sonnykong1312
@sonnykong1312 Жыл бұрын
drop the training video right now!
@morybest
@morybest 2 жыл бұрын
very useful John
@adirmugrabi
@adirmugrabi 5 ай бұрын
this is a much better way to do the forward pass: public void Forward(float[] inputsArray) { for (int i = 0; i < n_nodes; i++) { nodeArray[i] = biasesArray[i]; for (int j = 0; j < n_inputs; j++) { nodeArray[i] += weightsArray[i, j] * inputsArray[j]; } } } this way you don't create a new array every time. also the opening "{" is in the correct location.
@thimodemoura4472
@thimodemoura4472 Жыл бұрын
i need that next video i have no idea what im doing :( i have this code and i think i understood how it works after starring at it for an Eternity BUT how can i make use of it now....
@adirmugrabi
@adirmugrabi 5 ай бұрын
if the activation function always happen right after forward. why not just combine them?
@pauldevred1393
@pauldevred1393 Жыл бұрын
please, do the third part
@sync_areagamer1384
@sync_areagamer1384 2 жыл бұрын
amazing
@radsy5821
@radsy5821 Жыл бұрын
Good tutorial, but as others have pointed out there is a compile error both in the video and the github code in Awake(). layer in the for loop should be layers. Makes me wonder if was ever tested?
@JohnnyCodes
@JohnnyCodes Жыл бұрын
Yeah I am not sure how that got in there. The code definitely works because all of the clips of the training are created using this code so I must have done some refactoring to improve the names of variables for the video and had a typo. Will fix that soon
@sync_areagamer1384
@sync_areagamer1384 2 жыл бұрын
very good :)
@TheRealTalGiladi
@TheRealTalGiladi 8 ай бұрын
Thank you! I would have kissed you for that great explanation!
@AThingProbably
@AThingProbably Жыл бұрын
what
@Funny9689
@Funny9689 2 жыл бұрын
This is useless, you literally just implemented matrix dot in C#. Most of the difficulty in making a neural network is just backprop, jfc
@mehmatrix
@mehmatrix 2 жыл бұрын
Clearly this is a tutorial for beginners, there is part 3 coming up and the most complicated things are built on top of simple concepts.. like matrix dot products 🤷‍♂ when you make a video that could explain backpropagation in 17 mins to beginners, please share with us. Cheers,
@Nabuuug
@Nabuuug 2 жыл бұрын
The true useless entity here is you, my dear sir.
Training A Neural Network From SCRATCH! (Part 3)
12:00
John Sorrentino
Рет қаралды 7 М.
AI Cars Learn To Drive!
6:56
John Sorrentino
Рет қаралды 14 М.
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
neural network from scratch in C
8:58
Mark Kraay
Рет қаралды 86 М.
How I animate 3Blue1Brown | A Manim demo with Ben Sparks
53:41
3Blue1Brown
Рет қаралды 1,2 МЛН
Create Life From a Simple Rule
14:37
Brainxyz
Рет қаралды 794 М.
My Computer Taught Itself to Play Minecraft
14:47
Poppro
Рет қаралды 1 МЛН
The Biggest Mistake Intermediate React Developers Make
18:32
Cosden Solutions
Рет қаралды 32 М.
How to Create a Neural Network (and Train it to Identify Doodles)
54:51
Sebastian Lague
Рет қаралды 1,9 МЛН
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 1,5 МЛН
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 4,3 МЛН
Genetic Algorithm C# - Generic Implementation
23:07
Kryzarel
Рет қаралды 59 М.
I Built a Neural Network from Scratch
9:15
Green Code
Рет қаралды 490 М.
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН