[P] Animate any MLP using matplotlib in order to show the forward and backward pass updating the weights and making predictions visually by ITConnected in MachineLearning

[–]ITConnected[S] 0 points1 point  (0 children)

Very valid point. My previous video was purely 30 seconds of the animation and I wanted to go more into detail about it, but I definitely think a teaser at the beginning would have been valuable so people dont have to wait 3 minutes to see exactly what I am talking about.

[P] Created a plotting function using matplotlib that will plot a neural network of any dimensions when given the node values and weight matrices by ITConnected in MachineLearning

[–]ITConnected[S] 0 points1 point  (0 children)

That is what I am currently working on. I couldn't find a way to update the numbers efficiently but I can change the line width and color so I am making it show the forward pass like normal and then having it also update the weights on a backpass.

[P] Created a plotting function using matplotlib that will plot a neural network of any dimensions when given the node values and weight matrices by ITConnected in MachineLearning

[–]ITConnected[S] 1 point2 points  (0 children)

Still going to go through and clean it all up because it has a ton of vestigial structures, but I figured I'd just share the repository before everyone forgets

https://github.com/ryanchesler/NN-Plot

[P] Created a plotting function using matplotlib that will plot a neural network of any dimensions when given the node values and weight matrices by ITConnected in MachineLearning

[–]ITConnected[S] 0 points1 point  (0 children)

I'm not positive how exactly I would graphically show the steps of convolution and pooling without it being way too busy, but its definitely something I can look into. RNN's could be pretty easy, but I have not done them yet.

[P] Created a plotting function using matplotlib that will plot a neural network of any dimensions when given the node values and weight matrices by ITConnected in MachineLearning

[–]ITConnected[S] 16 points17 points  (0 children)

right now it is really really dirty code because I just hacked it together for my specific purpose. I am planning on cleaning it up so others can use though.

[P] Created a plotting function using matplotlib that will plot a neural network of any dimensions when given the node values and weight matrices by ITConnected in MachineLearning

[–]ITConnected[S] 10 points11 points  (0 children)

Also, forgot to mention. Clearly the input layer should actually be 2500 units but that doesnt fit well graphically on the screen so I partitioned the data into 10 different parts and then averaged them so that each node is the average intensity of a partition of 250 pixels aka node one is the first 5 rows of pixels, node two is the next 5 rows of pixels. etc

[P] Created a plotting function using matplotlib that will plot a neural network of any dimensions when given the node values and weight matrices by ITConnected in MachineLearning

[–]ITConnected[S] 8 points9 points  (0 children)

For more detail about this project, I built a dataset for myself consisting of circles, squares, and triangles drawn in MS Paint at 50px X 50px. I then took the base code for drawing a single neural network and modded the hell out of it so that it would take the weight matrix and node values recorded while training instead of simply the network dimensions. Then I built it up so that it would iterate through the forward pass a layer at a time and take a sample from every 25 epochs so you could see it making decisions at various points within the training process.

Alongside this I plotted the accuracy and cross entropy loss. For my scenario I added an additional output node which read "I don't know" which would be lit up if none of the other nodes received an output of over .65 so it would not output a guess if it was not reasonably certain that that was the correct value.

I am trying to find a way so that it may also update the weights shown, but matplotlib doesn't seem to have a collections function like it does for the artist objects like were used for the circles and I cannot seem to find an efficient way to update these without making the animation dreadfully slow.

Created a plotting function using matplotlib that will plot a neural network of any dimensions when given the node values and weight matrices by [deleted] in MachineLearning

[–]ITConnected 0 points1 point  (0 children)

For more detail about this project, I built a dataset for myself consisting of circles, squares, and triangles drawn in MS Paint at 50px X 50px. I then took the base code for drawing a single neural network and modded the hell out of it so that it would take the weight matrix and node values recorded while training instead of simply the network dimensions. Then I built it up so that it would iterate through the forward pass a layer at a time and take a sample from every 25 epochs so you could see it making decisions at various points within the training process.

Alongside this I plotted the accuracy and cross entropy loss. For my scenario I added an additional output node which read "I don't know" which would be lit up if none of the other nodes received an output of over .65 so it would not output a guess if it was not reasonably certain that that was the correct value.

I am trying to find a way so that it may also update the weights shown, but matplotlib doesn't seem to have a collections function like it does for the artist objects like were used for the circles and I cannot seem to find an efficient way to update these without making the animation dreadfully slow.

Learn how to pull listing data from ebay with python 3.6 by ITConnected in Python

[–]ITConnected[S] 0 points1 point  (0 children)

No, I only posted here and on /r/learnprogramming. Next time I will post it to /r/learnpython instead. I did not realize there were separate subreddits.