update on cnn
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user