Skip to content

Commit b1922a0

Browse files
committed
Merge pull request lisa-lab#56 from nouiz/weight_init_doc
Fix mlp weight init formula. Reported by Alex Rothberg
2 parents 7a287e5 + f715347 commit b1922a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/mlp.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ are to conserve variance of the activation as well as variance of back-propagate
239239
This allows information to flow well upward and downward in the network and
240240
reduces discrepancies between layers.
241241
Under some assumptions, a compromise between these two constraints leads to the following
242-
initialization: :math:`uniform[-\frac{6}{\sqrt{fan_{in}+fan_{out}}},\frac{6}{\sqrt{fan_{in}+fan_{out}}}]`
243-
for tanh and :math:`uniform[-4*\frac{6}{\sqrt{fan_{in}+fan_{out}}},4*\frac{6}{\sqrt{fan_{in}+fan_{out}}}]`
242+
initialization: :math:`uniform[-\frac{\sqrt{6}}{\sqrt{fan_{in}+fan_{out}}},\frac{\sqrt{6}}{\sqrt{fan_{in}+fan_{out}}}]`
243+
for tanh and :math:`uniform[-4*\frac{\sqrt{6}}{\sqrt{fan_{in}+fan_{out}}},4*\frac{\sqrt{6}}{\sqrt{fan_{in}+fan_{out}}}]`
244244
for sigmoid. Where :math:`fan_{in}` is the number of inputs and :math:`fan_{out}` the number of hidden units.
245245
For mathematical considerations please refer to [Xavier10]_.
246246

0 commit comments

Comments
 (0)