提交 444f7d56 authored 作者: Vikram's avatar Vikram

Documentation

上级 d6a9018a
...@@ -449,8 +449,8 @@ class BaseGpuCorrMM(CGpuKernelBase): ...@@ -449,8 +449,8 @@ class BaseGpuCorrMM(CGpuKernelBase):
Parameters Parameters
---------- ----------
border_mode : {'valid', 'full', 'half'} border_mode : {'valid', 'full', 'half'}
Additionally, the padding size could be directly specified by an integer Additionally, the padding size could be directly specified by an integer,
or a pair of integers a pair of integers, or two pairs of integers.
subsample subsample
Perform subsampling of the output (default: (1, 1)). Perform subsampling of the output (default: (1, 1)).
filter_dilation filter_dilation
......
...@@ -72,21 +72,30 @@ def conv2d(input, filters, input_shape=None, filter_shape=None, ...@@ -72,21 +72,30 @@ def conv2d(input, filters, input_shape=None, filter_shape=None,
You can give ``None`` for any element of the list to specify that this You can give ``None`` for any element of the list to specify that this
element is not known at compile time. element is not known at compile time.
border_mode: str, int or tuple of two int border_mode: str, int or tuple of ``convdim`` elements where each element
is an integer or a tuple of length 2.
Either of the following: Either of the following:
``'valid'``: apply filter wherever it completely overlaps with the ``'valid'``: apply filter wherever it completely overlaps with the
input. Generates output of shape: input shape - filter shape + 1 input. Generates output of shape: input shape - filter shape + 1
``'full'``: apply filter wherever it partly overlaps with the input. ``'full'``: apply filter wherever it partly overlaps with the input.
Generates output of shape: input shape + filter shape - 1 Generates output of shape: input shape + filter shape - 1
``'half'``: pad input with a symmetric border of ``filter rows // 2`` ``'half'``: pad input with a symmetric border of ``filter size // 2``
rows and ``filter columns // 2`` columns, then perform a valid in each convolution dimension, then perform a valid convolution.
convolution. For filters with an odd number of rows and columns, this For filters with an odd filter size, this leads to the output
leads to the output shape being equal to the input shape. shape being equal to the input shape.
``int``: pad input with a symmetric border of zeros of the given ``int``: pad input with a symmetric border of zeros of the given
width, then perform a valid convolution. width, then perform a valid convolution.
``(int1, int2)``: pad input with a symmetric border of ``int1`` rows ``(int1, int2)``: (for 2D) pad input with a symmetric border of ``int1``,
and ``int2`` columns, then perform a valid convolution. ``int2``, then perform a valid convolution.
``(int1, (int2, int3))`` or ``((int1, int2), int3)``: (for 2D)
pad input with one symmetric border of `int1`` or ``int3``, and
one asymmetric border of ``(int2, int3)`` or ``(int1, int2)``.
``((int1, int2), (int3, int4))``: (for 2D) pad input with an asymmetric
border of ``(int1, int2)`` along one dimension and ``(int3, int4)``
along the second dimension.
``(int1, int2, int3)``: (for 3D) pad input with a symmetric border of
``int1``, ``int2`` and ``int3``, then perform a valid convolution.
subsample: tuple of len 2 subsample: tuple of len 2
Factor by which to subsample the output. Factor by which to subsample the output.
...@@ -199,7 +208,7 @@ def conv2d_transpose(input, filters, output_shape, filter_shape=None, ...@@ -199,7 +208,7 @@ def conv2d_transpose(input, filters, output_shape, filter_shape=None,
You can give ``None`` for any element of the list to specify that this You can give ``None`` for any element of the list to specify that this
element is not known at compile time. element is not known at compile time.
border_mode: str, int or tuple of two int border_mode: str, int or tuple of two elements
Refers to the ``border_mode`` argument of the corresponding forward Refers to the ``border_mode`` argument of the corresponding forward
(non-transposed) convolution. See the argument description in (non-transposed) convolution. See the argument description in
``conv2d``. What was ``padding`` for the forward convolution means ``conv2d``. What was ``padding`` for the forward convolution means
......
...@@ -34,8 +34,8 @@ class BaseCorrMM(gof.OpenMPOp): ...@@ -34,8 +34,8 @@ class BaseCorrMM(gof.OpenMPOp):
Parameters Parameters
---------- ----------
border_mode : {'valid', 'full', 'half'} border_mode : {'valid', 'full', 'half'}
Additionally, the padding size could be directly specified by an integer Additionally, the padding size could be directly specified by an integer,
or a pair of integers a pair of integers, or two pairs of integers.
subsample subsample
Perform subsampling of the output (default: (1, 1)). Perform subsampling of the output (default: (1, 1)).
filter_dilation filter_dilation
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论