Skip to content

Commit 7f1c301

Browse files
committed
- neural network prediction calculation viz is work in progress. It's rendered now and has some interaction when you hover over weight and input nodes. Still need to show the calculations and results. Then to tackle mobile and clicking behaviour.
spelling
1 parent c6406ee commit 7f1c301

8 files changed

+772
-49
lines changed

_posts/2016-12-14-visual-interactive-guide-basics-neural-networks.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ If you have reached this far, I have to reveal to you another motivation of mine
580580

581581
I hope you would feel prepared and that you have an understanding of this system and how it works. If you want to start tinkering with code, feel free to pick up from the intro [tutorial](https://www.tensorflow.org/versions/r0.10/tutorials/mnist/beginners/index.html) and teach a neural network how to detect handwritten digits.
582582

583-
You should also continue your education by learning the theoretical and mathimatical underpinnings of the concepts we discussed here. Good questions to ask now include:
583+
You should also continue your education by learning the theoretical and mathematical underpinnings of the concepts we discussed here. Good questions to ask now include:
584584

585585
* What other kinds of cost functions exist? Which are better for which applications?
586586
* What's the algorithm to actually calculate new weights using gradient descent?
@@ -601,7 +601,7 @@ Thanks to [Yasmine Alfouzan](https://www.linkedin.com/in/yasmine-alfouzan-b05ba3
601601

602602
Please contact me on [Twitter](https://twitter.com/jalammar) with any corrections or feedback.
603603

604+
<script type="text/javascript" src="/js/nnVizUtils.js"></script>
604605
<script type="text/javascript" src="/js/simple_nn.js"></script>
605606
<script type="text/javascript" src="/js/two_variable_nn.js"></script>
606-
607607
<script type="text/javascript" src="/js/shallow_nn_grapher.js"></script>

_posts/2016-12-19-feedforward-neural-networks-visual-interactive.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ published: False
44
title: Feedforward Neural Networks - Part 2 of A Visual and Interactive Guide to Neural Networks
55
---
66

7+
<!--more-->
8+
79
In the [previous post]() we discussed some of the basics of neural networks:
10+
811
* How the inputs flow through the network to calculate a prediction
912
* How we multiply the inputs by the respective weights and add the biases
1013
* How we calculate Mean Square Error and how we use it as a measuring stick to gauge how accurate our model is
1114
* We touched very lightly on Gradient Descent, an iterative algorithm that takes steps towards a better set of weights and biases
1215
* We started with regression models and moved into classification models in the last example
1316

1417

15-
There are a couple more concepts we need to touch upon if we're to build a better understanding of proper neural networks. So let's dive right in.
18+
There are a couple more concepts we need to touch upon if we're to build a better understanding of proper neural networks. These will be network structure concepts that improve the behaviours of our networks and our prediction models.
1619

1720
## Feed it forward
1821
Let's keep tweaking the example we started with. Your friend who wants to buy a house provided you with this list of house size & price and how appropriate for her she thinks the size and price are.
@@ -36,7 +39,18 @@ Let's keep tweaking the example we started with. Your friend who wants to buy a
3639

3740
</div>
3841

39-
When we trained a neural network to try to classify it, it got an error value of X
42+
In [this notebook](), I trained a softmax regression neural network against this dataset. After the training, the network could correctly classify only 8 out of the 10 examples in the training set.
43+
44+
Take a look at how the trained network calculates the prediction for each example in the training set:
45+
46+
<div id="neural-network-calculation-viz"></div>
47+
48+
49+
## Activation functions
50+
51+
52+
4053

4154

42-
## Activation functions
55+
<script type="text/javascript" src="/js/nnVizUtils.js"></script>
56+
<script type="text/javascript" src="/js/neuralNetworkCalculationViz.js"></script>

_sass/_variables.scss

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ $black: #000;
1919
$darkerGray: #222;
2020
$darkGray: #333;
2121
$gray: #666;
22+
$lighterGray: #999;
2223
$lightGray: #eee;
2324
$white: #fff;
2425

@@ -34,7 +35,15 @@ $nnSoftmaxNode: #faf6c9;
3435
$nnStrokeWidth: 2px;
3536
$nnNodeStrokeWidth: 1px;
3637

38+
$inputOutlineColor: #d18fe2;
39+
$biasOutlineColor: #a19cf0;
40+
$outputOutlineColor: #f2afc7;
41+
$softmaxOutlineColor: #ebe79f;
42+
3743
$nnGrapherStrokeWidth: 3px;
44+
$lighterOutlinedNodeStrokeWidth: 3px;
45+
$outlinedNodeStrokeWidth: 4px;
46+
$outlinedNodeStrokeWidthHover: 8px;
3847

3948
// Font stacks
4049
$helvetica: Helvetica, Arial, sans-serif;

images/NNs_bias.psd

232 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)