提交 d206cebe authored 作者: sebastien-j's avatar sebastien-j

Change mode of other theano function

Tests weren't faster after the first changes
上级 013cf2af
......@@ -188,7 +188,9 @@ class TestConv3dFFT(unittest.TestCase):
pad_last_dim = pad)
conv_fft = conv_fft.dimshuffle(0, 2, 3, 4, 1)
f_ref = theano.function([], conv_ref)
ref_mode = theano.compile.get_default_mode()
ref_mode.check_py = False
f_ref = theano.function([], conv_ref, mode=ref_mode)
mode = mode_with_gpu
mode.check_py = False
f_fft = theano.function([], conv_fft, mode=mode)
......@@ -253,10 +255,12 @@ class TestConv3dFFT(unittest.TestCase):
conv = theano.tensor.nnet.conv3D(V=inputs, W=filters,
b=bias, d=(1,1,1))
ref_mode = theano.compile.get_default_mode()
ref_mode.check_py = False
mode = mode_with_gpu.including('conv3d_fft')
mode.check_py = False
f_ref = theano.function([], conv)
f_ref = theano.function([], conv, mode=ref_mode)
f_fft = theano.function([], conv, mode=mode)
# make sure we inserted the fft trickery
......@@ -284,10 +288,12 @@ class TestConv3dFFT(unittest.TestCase):
conv = theano.tensor.nnet.convGrad3D(V=inputs, dCdH=dCdH,
WShape=filters_shape,
d=(1,1,1))
ref_mode = theano.compile.get_default_mode()
ref_mode.check_py = False
mode = mode_with_gpu.including('convgrad3d_fft')
mode.check_py = False
f_ref = theano.function([], conv)
f_ref = theano.function([], conv, mode=ref_mode)
f_fft = theano.function([], conv, mode=mode)
# make sure we inserted the fft trickery
......
......@@ -173,8 +173,10 @@ class TestCorr3DMM(unittest.TestCase):
b=bias, d=(1, 1, 1))
mode = mode_with_gpu.including('conv3d_gemm')
mode.check_py = False
ref_mode = theano.compile.get_default_mode()
ref_mode.check_py = False
f_ref = theano.function([], conv)
f_ref = theano.function([], conv, mode=ref_mode)
f_gemm = theano.function([], conv, mode=mode)
# make sure we inserted the gemm trickery
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论