Browse Source

Further fix Softmax + CE

pull/7/head
bushuhui 3 years ago
parent
commit
d2ad4dfb79
3 changed files with 5 additions and 5 deletions
  1. +5
    -5
      5_nn/3-softmax_ce.ipynb
  2. BIN
      5_nn/images/figures.pptx
  3. BIN
      5_nn/images/softmax_neuron.png

+ 5
- 5
5_nn/3-softmax_ce.ipynb View File

@@ -78,12 +78,12 @@
"神经元的输出设为:\n",
"\n",
"$$\n",
"z_i = sigmoid( \\sum_{j} w_{ij} x_{j} + b )\n",
"z_i = \\sum_{j} w_{ij} x_{j} + w_b\n",
"$$\n",
"\n",
"其中$W_{ij}$是第$i$个神经元的第$j$个权重,$b$是偏置。$z_i$表示该网络的第$i$个输出。\n",
"其中$W_{ij}$是第$i$个神经元的第$j$个权重,$w_b$是偏置。$z_i$表示该网络的第$i$个输出。**请注意这里没有使用sigmoid等激活函数。**\n",
"\n",
"给这个输出加上一个softmax函数,那就变成了这样:\n",
"给这个网络输出加上一个softmax函数,那就变成了这样:\n",
"\n",
"$$\n",
"a_i = \\frac{e^{z_i}}{\\sum_k e^{z_k}}\n",
@@ -211,7 +211,7 @@
"\n",
"其中\n",
"$$\n",
"z_i = \\sum_{j} w_{ij} x_{j} + b\n",
"z_i = \\sum_{j} w_{ij} x_{j} + w_b\n",
"$$\n"
]
},
@@ -219,7 +219,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"对于使用二次代价函数的更新方程为:\n",
"最为对比,使用二次代价函数的更新方程为:\n",
"\n",
"$$\n",
"\\delta_i = a_i (1-a_i) (y_i - a_i)\n",


BIN
5_nn/images/figures.pptx View File


BIN
5_nn/images/softmax_neuron.png View File

Before After
Width: 1411  |  Height: 439  |  Size: 57 kB Width: 1258  |  Height: 425  |  Size: 51 kB

Loading…
Cancel
Save