update on cnn

This commit is contained in:
mhjensen
2019-10-04 05:50:18 +02:00
parent 812fbe454e
commit c2be6efa93
162 changed files with 5235 additions and 2420 deletions
@@ -273,9 +273,9 @@ reduces <em>overfitting</em>.
<p>
We will measure the size of the weights using the so called <em>L2-norm</em>, meaning our cost function becomes:
$$ \nabla \mathcal{C}(\theta) = \frac{1}{N} \sum_{i=1}^N \nabla \mathcal{L}_i(\theta) \quad \rightarrow \quad
\frac{1}{N} \sum_{i=1}^N \nabla \mathcal{L}_i(\theta) + \lambda \lvert \lvert \hat{w} \rvert \rvert_2^2
= \frac{1}{N} \sum_{i=1}^N \nabla \mathcal{L}(\theta) + \lambda \sum_{ij} w_{ij}^2,$$
$$ \mathcal{C}(\theta) = \frac{1}{N} \sum_{i=1}^N \mathcal{L}_i(\theta) \quad \rightarrow \quad
\frac{1}{N} \sum_{i=1}^N \mathcal{L}_i(\theta) + \lambda \lvert \lvert \hat{w} \rvert \rvert_2^2
= \frac{1}{N} \sum_{i=1}^N \mathcal{L}(\theta) + \lambda \sum_{ij} w_{ij}^2,$$
<p>
i.e. we sum up all the weights squared. The factor \( \lambda \) is known as a regularization parameter.