提交 690978de authored 作者: Frederic's avatar Frederic

Better indentation

上级 d383d9c9
...@@ -177,17 +177,16 @@ def test_pooling(): ...@@ -177,17 +177,16 @@ def test_pooling():
for node in fg.maker.fgraph.toposort()]) for node in fg.maker.fgraph.toposort()])
g_out = fg(data) g_out = fg(data)
if True: # Compare again the CPU result
# Compare again the CPU result out = max_pool_2d(x, (ws, ws),
out = max_pool_2d(x, (ws, ws), padding=pad,
padding=pad, ignore_border=True, mode=mode)
ignore_border=True, mode=mode) fc = theano.function([x], theano.grad(out.sum(), x),
fc = theano.function([x], theano.grad(out.sum(), x), mode=mode_without_gpu)
mode=mode_without_gpu) assert any([isinstance(node.op, DownsampleFactorMaxGrad)
assert any([isinstance(node.op, DownsampleFactorMaxGrad) for node in fc.maker.fgraph.toposort()])
for node in fc.maker.fgraph.toposort()]) c_out = fc(data)
c_out = fc(data) assert numpy.allclose(c_out, g_out)
assert numpy.allclose(c_out, g_out)
def test_pooling_opt(): def test_pooling_opt():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论