提交 feca2aa7 authored 作者: Cesar Laurent's avatar Cesar Laurent

Fixed 1 test.

上级 54a1c069
...@@ -1060,7 +1060,7 @@ class DownsampleFactorMaxGradGrad(OpenMPOp): ...@@ -1060,7 +1060,7 @@ class DownsampleFactorMaxGradGrad(OpenMPOp):
img_cols = x.shape[-1] + 2 * pd1 img_cols = x.shape[-1] + 2 * pd1
# pad the image and its gradients # pad the image and its gradients
if pd0 == 0 and pd1 == 0: if pd0 != 0 and pd1 != 0:
y_padded = numpy.zeros( y_padded = numpy.zeros(
(x.shape[0], x.shape[1], img_rows, img_cols), (x.shape[0], x.shape[1], img_rows, img_cols),
dtype=x.dtype) + x.min() - 1 dtype=x.dtype) + x.min() - 1
......
...@@ -884,5 +884,6 @@ class TestDownsampleFactorMax(utt.InferShapeTester): ...@@ -884,5 +884,6 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
assert any(isinstance(n.op, AveragePoolGrad) assert any(isinstance(n.op, AveragePoolGrad)
for n in f.maker.fgraph.toposort()) for n in f.maker.fgraph.toposort())
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论