提交 32d27441 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #3986 from nouiz/test_conv

Fix test when mode!=DebugMode on the GPU.
...@@ -835,10 +835,11 @@ def conv_grad(mode, bs, ch, nf, rImg1, rImg2, rFlt1, rFlt2, subsample, op): ...@@ -835,10 +835,11 @@ def conv_grad(mode, bs, ch, nf, rImg1, rImg2, rFlt1, rFlt2, subsample, op):
outputs.extend([corr_op_dik, conv_op_dik, outputs.extend([corr_op_dik, conv_op_dik,
corr_op_dki, conv_op_dki]) corr_op_dki, conv_op_dki])
if theano.config.mode == 'DEBUG_MODE':
# TODO: fix when the abstractconv tests can pass debug mode. # TODO: fix when the abstractconv tests can pass debug mode.
theano_mode = 'FAST_RUN' mode = theano_mode
f = theano.function([i, k], outputs, mode=theano_mode) if theano.config.mode == 'DEBUG_MODE':
mode = theano.compile.mode.get_mode('FAST_RUN').including('gpu')
f = theano.function([i, k], outputs, mode=mode)
allvals = f(npy_img, npy_kern) allvals = f(npy_img, npy_kern)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论