提交 42a4e9ef authored 作者: Mathieu Germain's avatar Mathieu Germain

Docstring fix

上级 fea2435c
...@@ -235,6 +235,7 @@ def version(raises=True): ...@@ -235,6 +235,7 @@ def version(raises=True):
:raises: If True, raise an exception if CuDNN is not present or badly installed. :raises: If True, raise an exception if CuDNN is not present or badly installed.
Otherwise, return -1. Otherwise, return -1.
""" """
if not dnn_present(): if not dnn_present():
if raises: if raises:
...@@ -400,12 +401,12 @@ class GpuDnnConv(DnnBase): ...@@ -400,12 +401,12 @@ class GpuDnnConv(DnnBase):
---------- ----------
image image
kernel kernel
descr descr :
The convolution descriptor. The convolution descriptor.
algo algo : {'small', 'none', 'large', 'fft', 'fft_tiling', 'winograd', 'guess_once',
{'small', 'none', 'large', 'fft', 'fft_tiling', 'winograd', 'guess_once',
'guess_on_shape_change', 'time_once', 'time_on_shape_change'} 'guess_on_shape_change', 'time_once', 'time_on_shape_change'}
Default is the value of :attr:`config.dnn.conv.algo_fwd`. Default is the value of :attr:`config.dnn.conv.algo_fwd`.
""" """
__props__ = ('algo', 'inplace') __props__ = ('algo', 'inplace')
...@@ -575,12 +576,12 @@ class GpuDnnConvGradW(DnnBase): ...@@ -575,12 +576,12 @@ class GpuDnnConvGradW(DnnBase):
---------- ----------
image image
kernel kernel
descr descr :
The convolution descriptor. The convolution descriptor.
algo algo : {'none', 'deterministic', 'fft', 'small', 'guess_once',
{'none', 'deterministic', 'fft', 'small', 'guess_once',
'guess_on_shape_change', 'time_once', 'time_on_shape_change'} 'guess_on_shape_change', 'time_once', 'time_on_shape_change'}
Default is the value of :attr:`config.dnn.conv.algo_bwd_filter`. Default is the value of :attr:`config.dnn.conv.algo_bwd_filter`.
""" """
__props__ = ('algo', 'inplace') __props__ = ('algo', 'inplace')
...@@ -699,10 +700,10 @@ class GpuDnnConvGradI(DnnBase): ...@@ -699,10 +700,10 @@ class GpuDnnConvGradI(DnnBase):
kernel kernel
descr descr
The convolution descriptor. The convolution descriptor.
algo algo : {'none', 'deterministic', 'fft', 'fft_tiling', 'winograd', 'guess_once',
{'none', 'deterministic', 'fft', 'fft_tiling', 'winograd', 'guess_once',
'guess_on_shape_change', 'time_once', 'time_on_shape_change'} 'guess_on_shape_change', 'time_once', 'time_on_shape_change'}
Default is the value of :attr:`config.dnn.conv.algo_bwd_data`. Default is the value of :attr:`config.dnn.conv.algo_bwd_data`.
""" """
__props__ = ('algo', 'inplace',) __props__ = ('algo', 'inplace',)
...@@ -1094,18 +1095,17 @@ class GpuDnnPool(DnnBase): ...@@ -1094,18 +1095,17 @@ class GpuDnnPool(DnnBase):
""" """
Parameters Parameters
---------- ----------
img img : tensor
The image 4d or 5d tensor. The image 4d or 5d tensor.
Parameters ws : tensor
----------
ws : tensor variable
Window size. Window size.
stride : tensor variable stride : tensor
(dx, dy) or (dx, dy, dz). (dx, dy) or (dx, dy, dz).
mode : {'max', 'average_inc_pad', 'average_exc_pad'} mode : {'max', 'average_inc_pad', 'average_exc_pad'}
The old deprecated name 'average' corresponds to 'average_inc_pad'. The old deprecated name 'average' corresponds to 'average_inc_pad'.
pad : tensor pad : tensor
(padX, padY) or (padX, padY, padZ) (padX, padY) or (padX, padY, padZ)
""" """
__props__ = ('mode',) __props__ = ('mode',)
...@@ -1279,14 +1279,12 @@ class GpuDnnSoftmaxBase(DnnBase): ...@@ -1279,14 +1279,12 @@ class GpuDnnSoftmaxBase(DnnBase):
Parameters Parameters
---------- ----------
algo algo : {'fast', 'accurate', 'log'}
'fast', 'accurate' or 'log' indicating whether, respectively, Indicating whether, respectively, computations should be optimized for
computations should be optimized for speed, for accuracy, or if CuDNN speed, for accuracy, or if CuDNN should rather compute the log-softmax instead.
should rather compute the log-softmax instead. mode : {'instance', 'channel'}
mode Indicating whether the softmax should be computed per image across 'c01'
'instance' or 'channel' indicating whether the softmax should be or per spatial location '01' per image across 'c'.
computed per image across 'c01' or per spatial location '01' per
image across 'c'.
""" """
...@@ -1330,14 +1328,12 @@ class GpuDnnSoftmax(GpuDnnSoftmaxBase): ...@@ -1330,14 +1328,12 @@ class GpuDnnSoftmax(GpuDnnSoftmaxBase):
""" """
Op for the cuDNN Softmax. Op for the cuDNN Softmax.
algo algo : {'fast', 'accurate', 'log'}
'fast', 'accurate' or 'log' indicating whether, respectively, Indicating whether, respectively, computations should be optimized for
computations should be optimized for speed, for accuracy, or if CuDNN speed, for accuracy, or if CuDNN should rather compute the log-softmax instead.
should rather compute the log-softmax instead. mode : {'instance', 'channel'}
mode Indicating whether the softmax should be computed per image across 'c01'
'instance' or 'channel' indicating whether the softmax should be or per spatial location '01' per image across 'c'.
computed per image across 'c01' or per spatial location '01' per
image across 'c'.
""" """
direction = "forward" direction = "forward"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论