capsnet: fix margin loss formula

main
Stefan Schweter 2017-11-30 17:36:19 +01:00
parent 6b166b3729
commit c50b5d9b3b
1 changed files with 1 additions and 1 deletions

View File

@ -1191,7 +1191,7 @@
"source": [
"The paper uses a special margin loss to make it possible to detect two or more different digits in each image:\n",
"\n",
"$ L_k = T_k \\max(0, m^{+} - \\|\\mathbf{v}_k\\|)^2 - \\lambda (1 - T_k) \\max(0, \\|\\mathbf{v}_k\\| - m^{-})^2$\n",
"$ L_k = T_k \\max(0, m^{+} - \\|\\mathbf{v}_k\\|)^2 + \\lambda (1 - T_k) \\max(0, \\|\\mathbf{v}_k\\| - m^{-})^2$\n",
"\n",
"* $T_k$ is equal to 1 if the digit of class $k$ is present, or 0 otherwise.\n",
"* In the paper, $m^{+} = 0.9$, $m^{-} = 0.1$ and $\\lambda = 0.5$.\n",