From e21520df830c833630600fb4905f61f9b1375e60 Mon Sep 17 00:00:00 2001 From: vandanavk Date: Tue, 13 Nov 2018 13:47:51 -0800 Subject: [PATCH] Fix Sphinx errors --- .../mxnet/gluon/contrib/rnn/conv_rnn_cell.py | 18 +++++++++--------- python/mxnet/io/io.py | 4 ++-- python/mxnet/test_utils.py | 1 + 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/python/mxnet/gluon/contrib/rnn/conv_rnn_cell.py b/python/mxnet/gluon/contrib/rnn/conv_rnn_cell.py index 09db5470ef93..b7a19f78b2f9 100644 --- a/python/mxnet/gluon/contrib/rnn/conv_rnn_cell.py +++ b/python/mxnet/gluon/contrib/rnn/conv_rnn_cell.py @@ -255,7 +255,7 @@ class Conv1DRNNCell(_ConvRNNCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_rnn_' + prefix : str, default ``'conv_rnn_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -322,7 +322,7 @@ class Conv2DRNNCell(_ConvRNNCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_rnn_' + prefix : str, default ``'conv_rnn_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -389,7 +389,7 @@ class Conv3DRNNCell(_ConvRNNCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_rnn_' + prefix : str, default ``'conv_rnn_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -519,7 +519,7 @@ class Conv1DLSTMCell(_ConvLSTMCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_lstm_' + prefix : str, default ``'conv_lstm_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -596,7 +596,7 @@ class Conv2DLSTMCell(_ConvLSTMCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_lstm_' + prefix : str, default ``'conv_lstm_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -673,7 +673,7 @@ class Conv3DLSTMCell(_ConvLSTMCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_lstm_' + prefix : str, default ``'conv_lstm_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -803,7 +803,7 @@ class Conv1DGRUCell(_ConvGRUCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_gru_' + prefix : str, default ``'conv_gru_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -875,7 +875,7 @@ class Conv2DGRUCell(_ConvGRUCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_gru_' + prefix : str, default ``'conv_gru_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. @@ -947,7 +947,7 @@ class Conv3DGRUCell(_ConvGRUCell): If argument type is string, it's equivalent to nn.Activation(act_type=str). See :func:`~mxnet.ndarray.Activation` for available choices. Alternatively, other activation blocks such as nn.LeakyReLU can be used. - prefix : str, default 'conv_gru_' + prefix : str, default ``'conv_gru_``' Prefix for name of layers (and name of weight if params is None). params : RNNParams, default None Container for weight sharing between cells. Created if None. diff --git a/python/mxnet/io/io.py b/python/mxnet/io/io.py index 6cd0c83e1168..2bd1d6115ac3 100644 --- a/python/mxnet/io/io.py +++ b/python/mxnet/io/io.py @@ -490,8 +490,8 @@ class NDArrayIter(DataIter): """Returns an iterator for ``mx.nd.NDArray``, ``numpy.ndarray``, ``h5py.Dataset`` ``mx.nd.sparse.CSRNDArray`` or ``scipy.sparse.csr_matrix``. - Example usage: - ---------- + Examples + -------- >>> data = np.arange(40).reshape((10,2,2)) >>> labels = np.ones([10, 1]) >>> dataiter = mx.io.NDArrayIter(data, labels, 3, True, last_batch_handle='discard') diff --git a/python/mxnet/test_utils.py b/python/mxnet/test_utils.py index d23b563add96..13996c12de2e 100644 --- a/python/mxnet/test_utils.py +++ b/python/mxnet/test_utils.py @@ -1844,6 +1844,7 @@ def var_check(generator, sigma, nsamples=1000000): def chi_square_check(generator, buckets, probs, nsamples=1000000): """Run the chi-square test for the generator. The generator can be both continuous and discrete. + If the generator is continuous, the buckets should contain tuples of (range_min, range_max) and the probs should be the corresponding ideal probability within the specific ranges. Otherwise, the buckets should be the possible output of the discrete distribution and the probs