提交 6ad170f9 authored 作者: Gabe Schwartz's avatar Gabe Schwartz

Use integer division for downsampled image shape.

上级 e642052b
......@@ -83,7 +83,7 @@ class DownsampleFactorMax(Op):
if len(imgshape) < 2:
raise TypeError('imgshape must have at least two elements (rows, cols)')
r, c = imgshape[-2:]
rval = list(imgshape[:-2])+[ r/ds[0], c/ds[1]]
rval = list(imgshape[:-2]) + [ r // ds[0], c // ds[1] ]
if not ignore_border:
if isinstance(r, theano.Variable):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论