You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2018/06/17 15:54:36 UTC

[incubator-mxnet] branch master updated: [MXNET-352] Document behavior of mx.initializer.Constant (#10637)

This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 11dd56a  [MXNET-352] Document behavior of mx.initializer.Constant (#10637)
11dd56a is described below

commit 11dd56a8332a58a49c529773f9f3e0776547dda0
Author: Thomas Delteil <th...@gmail.com>
AuthorDate: Sun Jun 17 08:54:24 2018 -0700

    [MXNET-352] Document behavior of mx.initializer.Constant (#10637)
    
    * document behavior of Constant
    
    * Update initializer.py
    
    * remove trailing whitespace
    
    * Update initializer.py
    
    * Update initializer.py
    
    * Trigger build
    
    * Trigger build
---
 python/mxnet/initializer.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/python/mxnet/initializer.py b/python/mxnet/initializer.py
index 1297c3d..ef9026d 100755
--- a/python/mxnet/initializer.py
+++ b/python/mxnet/initializer.py
@@ -161,7 +161,7 @@ class Initializer(object):
         Parameters
         ----------
         name : str
-            Name of corrosponding NDArray.
+            Name of corresponding NDArray.
 
         arr : NDArray
             NDArray to be initialized.
@@ -424,12 +424,14 @@ class One(Initializer):
 
 @register
 class Constant(Initializer):
-    """Initializes the weights to a scalar value.
+    """Initializes the weights to a given value.
+    The value passed in can be a scalar or a NDarray that matches the shape
+    of the parameter to be set.
 
     Parameters
     ----------
-    value : float
-        Fill value.
+    value : float, NDArray
+        Value to set.
     """
     def __init__(self, value):
         super(Constant, self).__init__(value=value)
@@ -651,7 +653,7 @@ class Bilinear(Initializer):
 
 @register
 class LSTMBias(Initializer):
-    """Initialize all bias of an LSTMCell to 0.0 except for
+    """Initialize all biases of an LSTMCell to 0.0 except for
     the forget gate whose bias is set to custom value.
 
     Parameters

-- 
To stop receiving notification emails like this one, please contact
zhasheng@apache.org.