Browse Source

mode_init_bug

tags/v1.0.0
baiyangfan 5 years ago
parent
commit
b7c1fbb4dc
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      mindspore/common/initializer.py

+ 5
- 5
mindspore/common/initializer.py View File

@@ -268,10 +268,10 @@ class XavierUniform(Initializer):
Initialize the array with xavier uniform algorithm, and from a uniform distribution collect samples within Initialize the array with xavier uniform algorithm, and from a uniform distribution collect samples within
U[-boundary, boundary] The boundary is defined as : U[-boundary, boundary] The boundary is defined as :


math:`boundary = gain * \sqrt{\frac{6}{n_{in} + n_{out}}}`.
where :math:`boundary = gain * \sqrt{\frac{6}{n_{in} + n_{out}}}`.


math:`n_{in}` is the number of input units in the weight tensor.
math:`n_{out}` is the number of output units in the weight tensor.
where :math:`n_{in}` is the number of input units in the weight tensor.
where :math:`n_{out}` is the number of output units in the weight tensor.


Args: Args:
gain (Array): The array to be assigned. Default: 1. gain (Array): The array to be assigned. Default: 1.
@@ -298,9 +298,9 @@ class HeUniform(Initializer):
Initialize the array with He kaiming uniform algorithm, and from a uniform distribution collect samples within Initialize the array with He kaiming uniform algorithm, and from a uniform distribution collect samples within
U[-boundary, boundary] The boundary is defined as : U[-boundary, boundary] The boundary is defined as :


math:`boundary = \sqrt{\frac{6}{n_{in}}}`
where :math:`boundary = \sqrt{\frac{6}{n_{in}}}`.


math:`n_{in}` is the number of input units in the weight tensor.
where :math:`n_{in}` is the number of input units in the weight tensor.


Args: Args:
arr (Array): The array to be assigned. arr (Array): The array to be assigned.


Loading…
Cancel
Save