提交 86e3535a authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix gh-5088

上级 aac38eea
...@@ -206,9 +206,7 @@ class Pool(OpenMPOp): ...@@ -206,9 +206,7 @@ class Pool(OpenMPOp):
right margins. No padding is added if padding is None. right margins. No padding is added if padding is None.
ndim : int ndim : int
The number of pooling dimensions N. The number of pooling dimensions N.
If this number is not specified, the default is set to the If this number is not specified, the default is set 2.
(input.ndim - 2), assuming that the first two dimensions of the input
are non-pooling dimensions.
Returns Returns
------- -------
...@@ -219,8 +217,8 @@ class Pool(OpenMPOp): ...@@ -219,8 +217,8 @@ class Pool(OpenMPOp):
""" """
if ndim is None: if ndim is None:
ndim = len(imgshape) - 2 ndim = 2
assert ndim > 0
if len(imgshape) < ndim: if len(imgshape) < ndim:
raise TypeError('imgshape must have at least {} dimensions'.format(ndim)) raise TypeError('imgshape must have at least {} dimensions'.format(ndim))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论