提交 fe01ef3e authored 作者: Frederic Bastien's avatar Frederic Bastien

Add check that the downsample factor are ints.

上级 f78fc162
......@@ -119,6 +119,10 @@ class DownsampleFactorMax(Op):
TODO: why is poolsize an op parameter here?
"""
self.ds = tuple(ds)
if not all([isinstance(d, int) for d in ds]):
raise ValueError(
"DownsampleFactorMax downsample parameters must be ints."
" Got %s" % str(ds))
self.ignore_border = ignore_border
def __eq__(self, other):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论