Skip to content

Commit 16e25fd

Browse files
committed
kumin and lecun uniform added
1 parent b82e399 commit 16e25fd

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Diff for: DL_In_ImageProcessing_4_Activation_and_Weights_Init.ipynb

+11-4
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,13 @@
624624
"&= \\sum_i^n \\text{Var}(x_i)\\text{Var}(w_i) = \\left( n \\text{Var}(w) \\right) \\text{Var}(x) \\\\\\\\\n",
625625
"&\\text{Thus, due to }\\text{Var}(aX) = a^2\\text{Var}(X),\\text{ we need to have }a = \\frac{1}{\\sqrt{n}}\n",
626626
"\\end{align}$$\n",
627+
"For uniform distribution\n",
628+
"$$w_i\\sim U\\big[-\\frac{\\sqrt{3}}{\\sqrt{n_{i}}},\\frac{\\sqrt{3}}{\\sqrt{n_{i} }}\\big]$$\n",
629+
"Kumar initialization\n",
630+
" $w_i \\sim N(0,\\frac{16}{n_{i+1}}$ \n",
627631
" </ul> \n",
628-
"<!-- https://cs231n.github.io/neural-networks-2/#batchnorm -->"
632+
"<!-- https://cs231n.github.io/neural-networks-2/#batchnorm \n",
633+
"https://towardsdatascience.com/weight-initialization-in-deep-neural-networks-268a306540c0 -->"
629634
]
630635
},
631636
{
@@ -652,12 +657,14 @@
652657
"where $n_i$ - is the number of weights in layer.<br>\n",
653658
"\n",
654659
"</ul>\n",
655-
"<li><b>Xavier uniform initialization are recommended for sigmoid layer.</b><ul>\n",
660+
"<li><b>Xavier uniform initialization are recommended for sigmoid layer.</b><ul> \n",
656661
"<li> in some cases of <b>tanh layer</b> it is recommended to use $w_i\\sim N\\big[0,\\frac{1}{{n_{i}}}\\big]$\n",
662+
"<ul>\n",
657663
"<!-- \n",
658664
"https://towardsdatascience.com/weight-initialization-in-neural-networks-a-journey-from-the-basics-to-kaiming-954fb9b47c79\n",
659665
"https://pouannes.github.io/blog/initialization/\n",
660-
"https://www.deeplearning.ai/ai-notes/initialization/ -->"
666+
"https://www.deeplearning.ai/ai-notes/initialization/ \n",
667+
"https://towardsdatascience.com/weight-initialization-in-deep-neural-networks-268a306540c0-->"
661668
]
662669
},
663670
{
@@ -773,7 +780,7 @@
773780
"width": "165px"
774781
},
775782
"toc_section_display": true,
776-
"toc_window_display": false
783+
"toc_window_display": true
777784
}
778785
},
779786
"nbformat": 4,

0 commit comments

Comments
 (0)