提交 d3a36aed authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Add pooling test.

上级 19540d4e
...@@ -47,6 +47,19 @@ class TestPool(unittest.TestCase): ...@@ -47,6 +47,19 @@ class TestPool(unittest.TestCase):
f = theano.function([], ds_op(inp, [2, 2], pad=pad), mode=gpu_mode) f = theano.function([], ds_op(inp, [2, 2], pad=pad), mode=gpu_mode)
f() f()
def test_pool_big_ws(self):
gpu_mode = copy.copy(mode_with_gpu).excluding("cudnn")
gpu_mode.check_py_code = False
shp = (2, 2, 2, 2)
inp = theano.shared(rand(*shp), 'a')
inp = tensor.as_tensor_variable(inp)
ds_op = GpuPool(ignore_border=False, mode='average_exc_pad', ndim=2)
pad = tensor.as_tensor_variable([0, 0])
f = theano.function([], ds_op(inp, [5, 5], stride=[1, 1], pad=pad),
mode=gpu_mode)
f()
def test_pool2d(): def test_pool2d():
shps = [(1, 12), shps = [(1, 12),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论