Skip to content

Commit

Permalink
Replace array in type lists with numpy or cupy ndarray
Browse files Browse the repository at this point in the history
  • Loading branch information
delta2323 committed Aug 28, 2017
1 parent ea6ab85 commit 5853c34
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
6 changes: 4 additions & 2 deletions chainer/functions/normalization/batch_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,14 @@ def batch_normalization(x, gamma, beta, **kwargs):
gamma (Variable): Scaling parameter of normalized data.
beta (Variable): Shifting parameter of scaled normalized data.
eps (float): Epsilon value for numerical stability.
running_mean (array): Running average of the mean. This is a
running_mean (:class:`numpy.ndarray` or :class:`cupy.ndarray`):
Running average of the mean. This is a
running average of the mean over several mini-batches using
the decay parameter. If ``None``, the running average is not
computed. If this is ``None``, then ``runnng_var`` must also
be ``None``.
running_var (array): Running average of the variance. This is a
running_var (:class:`numpy.ndarray` or :class:`cupy.ndarray`):
Running average of the variance. This is a
running average of the variance over several mini-batches using
the decay parameter. If ``None``, the running average is not
computed. If this is ``None``, then ``running_mean`` must also
Expand Down
12 changes: 6 additions & 6 deletions chainer/links/connection/convolution_nd.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class ConvolutionND(link.Link):
pad (int or tuple of ints): Spatial padding width for input arrays.
``pad=p`` and ``pad=(p, p, ..., p)`` are equivalent.
nobias (bool): If ``True``, then this function does not use the bias.
initialW (array): Initial weight array. If ``None``, the default
initializer is used.
initialW (:class:`numpy.ndarray` or :class:`cupy.ndarray`):
Initial weight array. If ``None``, the default initializer is used.
May be a callable that takes ``numpy.ndarray`` or
``cupy.ndarray`` and edits its value.
initial_bias (array): Initial bias vector. If ``None``, the bias is
set to zero.
May be a callable that takes ``numpy.ndarray`` or ``cupy.ndarray``
and edits its value.
initial_bias (:class:`numpy.ndarray` or :class:`cupy.ndarray`):
Initial bias vector. If ``None``, the bias is set to zero.
May be a callable that takes :class:`numpy.ndarray` or
:class:`cupy.ndarray` and edits its value.
cover_all (bool): If ``True``, all spatial locations are convoluted
into some output pixels. It may make the output size larger.
``cover_all`` needs to be ``False`` if you want to use cuDNN.
Expand Down
9 changes: 5 additions & 4 deletions chainer/links/connection/deconvolution_nd.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ class DeconvolutionND(link.Link):
operation. It should be a tuple of ints that represents the output
size of each dimension. Default value is ``None`` and the outsize
is estimated with input size, stride and pad.
initialW (array): Initial weight array. If ``None``, the default
initializer is used. May be an
initializer instance of another value the same with that
initialW (:class:`numpy.ndarray` or :class:`cupy.ndarray`):
Initial weight array. If ``None``, the default initializer is used.
May be an initializer instance of another value the same with that
:func:`~chainer.init_weight` function can take.
initial_bias (array): Initial bias array. If ``None``, the bias vector
initial_bias (:class:`numpy.ndarray` or :class:`cupy.ndarray`):
Initial bias array. If ``None``, the bias vector
is set to zero. May be an initializer instance of another value
the same with that :func:`~chainer.init_weight` function can take.
Expand Down
3 changes: 2 additions & 1 deletion chainer/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __call__(self, key, value):
Args:
key (str): Name of the serialization entry.
value (scalar, array, None, or str): Object to be (de)serialized.
value (scalar, :class:`numpy.ndarray`, :class:`cupy.ndarray`, \
None, or str): Object to be (de)serialized.
``None`` is only supported by deserializers.
Returns:
Expand Down

0 comments on commit 5853c34

Please sign in to comment.