Merge pull request #133 from stefan-it/fix-margin-loss-formula
capsnet: fix margin loss formulamain
commit
53c2133bc7
|
@ -1203,7 +1203,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"The paper uses a special margin loss to make it possible to detect two or more different digits in each image:\n",
|
"The paper uses a special margin loss to make it possible to detect two or more different digits in each image:\n",
|
||||||
"\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",
|
"\n",
|
||||||
"* $T_k$ is equal to 1 if the digit of class $k$ is present, or 0 otherwise.\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",
|
"* In the paper, $m^{+} = 0.9$, $m^{-} = 0.1$ and $\\lambda = 0.5$.\n",
|
||||||
|
|
Loading…
Reference in New Issue