|
36 | 36 | "cell_type": "markdown",
|
37 | 37 | "metadata": {},
|
38 | 38 | "source": [
|
39 |
| - "A sigmoid function has been used as an activation function for neural networks for several decades, and only recently been partly replaced by ReLU. It is still used quite frequently though." |
| 39 | + "A sigmoid function has been used as an activation function for neural networks for several decades, and only recently been partly replaced by ReLU. It is still used quite frequently though.\n", |
| 40 | + "$$\n", |
| 41 | + " \\sigma(x) = \\frac{1}{1 + \\exp(-x)}\n", |
| 42 | + "$$" |
40 | 43 | ]
|
41 | 44 | },
|
42 | 45 | {
|
|
98 | 101 | "cell_type": "markdown",
|
99 | 102 | "metadata": {},
|
100 | 103 | "source": [
|
101 |
| - "Whereas the output of the sigmoid function is always positive, the hyperbolic tangent is used when negative output values are required." |
| 104 | + "Whereas the output of the sigmoid function is always positive, the hyperbolic tangent is used when negative output values are required.\n", |
| 105 | + "$$\n", |
| 106 | + " \\sigma(x) = \\tanh x\n", |
| 107 | + "$$" |
102 | 108 | ]
|
103 | 109 | },
|
104 | 110 | {
|
|
143 | 149 | "cell_type": "markdown",
|
144 | 150 | "metadata": {},
|
145 | 151 | "source": [
|
146 |
| - "An activation that is used quite often in the context of deep learning is ReLU (Rectified Linear Unit). It is an approximation for the SoftPlus function, and although it is not differentiable, it is far cheaper computationally." |
| 152 | + "An activation that is used quite often in the context of deep learning is ReLU (Rectified Linear Unit). It is an approximation for the SoftPlus function, and although it is not differentiable, it is far cheaper computationally.\n", |
| 153 | + "\n", |
| 154 | + "ReLU:\n", |
| 155 | + "$$\n", |
| 156 | + " \\sigma(x) = \\begin{cases} 0 & \\textrm{if} & x < 0 \\\\\n", |
| 157 | + " x & \\textrm{if} & x \\ge 0 \\end{cases}\n", |
| 158 | + "$$\n", |
| 159 | + "Softplus:\n", |
| 160 | + "$$\n", |
| 161 | + " \\sigma(x) = \\log(1 + \\exp x)\n", |
| 162 | + "$$" |
147 | 163 | ]
|
148 | 164 | },
|
149 | 165 | {
|
|
212 | 228 | "cell_type": "markdown",
|
213 | 229 | "metadata": {},
|
214 | 230 | "source": [
|
215 |
| - "The SoftMax function is often used for an output layer that represents categorical data. It will relatively increase high values, decrease low values. More importantly, for categorical output represented by a one-hot encoding, it will normalize the outputs such that the sum is equal to 1, and they can be interpreted as the proobability of the categories." |
| 231 | + "The SoftMax function is often used for an output layer that represents categorical data. It will relatively increase high values, decrease low values. More importantly, for categorical output represented by a one-hot encoding, it will normalize the outputs such that the sum is equal to 1, and they can be interpreted as the proobability of the categories.\n", |
| 232 | + "$$\n", |
| 233 | + " \\sigma(x_i) = \\frac{\\exp x_i}{\\sum_{i=1}^N \\exp x_i}\n", |
| 234 | + "$$" |
216 | 235 | ]
|
217 | 236 | },
|
218 | 237 | {
|
|
301 | 320 | "name": "python",
|
302 | 321 | "nbconvert_exporter": "python",
|
303 | 322 | "pygments_lexer": "ipython3",
|
304 |
| - "version": "3.7.3" |
| 323 | + "version": "3.7.6" |
305 | 324 | }
|
306 | 325 | },
|
307 | 326 | "nbformat": 4,
|
|
0 commit comments