updated typos

This commit is contained in:
mhjensen
2018-10-04 05:35:51 +02:00
parent ff08e04b6e
commit 0c44eedada
64 changed files with 1948 additions and 2013 deletions
+27 -26
View File
@@ -110,20 +110,19 @@ Automatically generated HTML file from DocOnce source
('Improving performance', 2, None, '___sec44'),
('Full object-oriented implementation', 2, None, '___sec45'),
('Evaluate model performance on test data', 2, None, '___sec46'),
('Adjust hyperparameters (if necessary, network architecture',
2,
None,
'___sec47'),
('scikit-learn implementation', 2, None, '___sec48'),
('Adjust hyperparameters', 2, None, '___sec47'),
('Visualization', 2, None, '___sec48'),
('scikit-learn implementation', 2, None, '___sec49'),
('Visualization', 2, None, '___sec50'),
('Building neural networks in Tensorflow and Keras',
2,
None,
'___sec49'),
('Tensorflow', 2, None, '___sec50'),
('Collect and pre-process data', 2, None, '___sec51'),
('Using TensorFlow backend', 2, None, '___sec52'),
('Optimizing and using gradient descent', 2, None, '___sec53'),
('Using Keras', 2, None, '___sec54')]}
'___sec51'),
('Tensorflow', 2, None, '___sec52'),
('Collect and pre-process data', 2, None, '___sec53'),
('Using TensorFlow backend', 2, None, '___sec54'),
('Optimizing and using gradient descent', 2, None, '___sec55'),
('Using Keras', 2, None, '___sec56')]}
end of tocinfo -->
<body>
@@ -208,14 +207,16 @@ MathJax.Hub.Config({
<!-- navigation toc: --> <li><a href="._NeuralNet-bs045.html#___sec44" style="font-size: 80%;"><b>Improving performance</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs046.html#___sec45" style="font-size: 80%;"><b>Full object-oriented implementation</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs047.html#___sec46" style="font-size: 80%;"><b>Evaluate model performance on test data</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs048.html#___sec47" style="font-size: 80%;"><b>Adjust hyperparameters (if necessary, network architecture</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs049.html#___sec48" style="font-size: 80%;"><b>scikit-learn implementation</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs050.html#___sec49" style="font-size: 80%;"><b>Building neural networks in Tensorflow and Keras</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs051.html#___sec50" style="font-size: 80%;"><b>Tensorflow</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs052.html#___sec51" style="font-size: 80%;"><b>Collect and pre-process data</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs053.html#___sec52" style="font-size: 80%;"><b>Using TensorFlow backend</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs054.html#___sec53" style="font-size: 80%;"><b>Optimizing and using gradient descent</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs055.html#___sec54" style="font-size: 80%;"><b>Using Keras</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs048.html#___sec47" style="font-size: 80%;"><b>Adjust hyperparameters</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs049.html#___sec48" style="font-size: 80%;"><b>Visualization</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs050.html#___sec49" style="font-size: 80%;"><b>scikit-learn implementation</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs051.html#___sec50" style="font-size: 80%;"><b>Visualization</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs052.html#___sec51" style="font-size: 80%;"><b>Building neural networks in Tensorflow and Keras</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs053.html#___sec52" style="font-size: 80%;"><b>Tensorflow</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs054.html#___sec53" style="font-size: 80%;"><b>Collect and pre-process data</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs055.html#___sec54" style="font-size: 80%;"><b>Using TensorFlow backend</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs056.html#___sec55" style="font-size: 80%;"><b>Optimizing and using gradient descent</b></a></li>
<!-- navigation toc: --> <li><a href="._NeuralNet-bs057.html#___sec56" style="font-size: 80%;"><b>Using Keras</b></a></li>
</ul>
</li>
@@ -235,25 +236,25 @@ MathJax.Hub.Config({
<p>
Denote \( F \) the number of features, \( H \) the number of hidden neurons and \( C \) the number of categories.
For each input image we calculate a weighted sum of input features (pixel values) to each neuron \( j \) in the hidden layer:
For each input image we calculate a weighted sum of input features (pixel values) to each neuron \( j \) in the hidden layer \( l \):
$$ z_{j}^{h} = \sum_{i=1}^{F} w_{ij}^{h} x_i + b_{j}^{h} = \boldsymbol{x}^T \boldsymbol{w}_{j}^{h} + b_{j}^{h} ,$$
$$ z_{j}^{l} = \sum_{i=1}^{F} w_{ij}^{l} x_i + b_{j}^{l},$$
<p>
this is then passed through our activation function
$$ a_{j}^{h} = f(z_{j}^{h}) .$$
$$ a_{j}^{l} = f(z_{j}^{l}) .$$
<p>
We calculate a weighted sum of inputs (activations in the hidden layer) to each neuron \( j \) in the output layer:
$$ z_{j}^{o} = \sum_{i=1}^{H} w_{ij}^{o} a_{i}^{h} + b_{j}^{o} = (\boldsymbol{a}^{h})^T \boldsymbol{w}_{j}^{o} + b_{j}^{o} .$$
$$ z_{j}^{L} = \sum_{i=1}^{H} w_{ij}^{L} a_{i}^{l} + b_{j}^{L}.$$
<p>
Finally we calculate the output of neuron \( j \) in the output layer using the softmax function:
$$ a_{j}^{o} = \frac{\exp{(z_j^{o})}}
{\sum_{c=0}^{C-1} \exp{(z_c^{o})}} .$$
$$ a_{j}^{L} = \frac{\exp{(z_j^{L})}}
{\sum_{c=0}^{C-1} \exp{(z_c^{L})}} .$$
<p>
<p>
@@ -281,7 +282,7 @@ $$ a_{j}^{o} = \frac{\exp{(z_j^{o})}}
<li><a href="._NeuralNet-bs047.html">48</a></li>
<li><a href="._NeuralNet-bs048.html">49</a></li>
<li><a href="">...</a></li>
<li><a href="._NeuralNet-bs055.html">56</a></li>
<li><a href="._NeuralNet-bs057.html">58</a></li>
<li><a href="._NeuralNet-bs040.html">&raquo;</a></li>
</ul>
<!-- ------------------- end of main content --------------- -->