提交 a8e1084d authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Merge pull request #119 from nouiz/fix_test

Fix test
import numpy import numpy
import theano import theano
from theano.tensor import vector, constant, specify_shape from theano.tensor import constant
from theano.sandbox.cuda.rng_curand import CURAND_RandomStreams from theano.sandbox.cuda.rng_curand import CURAND_RandomStreams
from theano.sandbox.rng_mrg import MRG_RandomStreams from theano.sandbox.rng_mrg import MRG_RandomStreams
...@@ -10,7 +10,9 @@ import theano.sandbox.cuda as cuda_ndarray ...@@ -10,7 +10,9 @@ import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.cuda_available == False: if cuda_ndarray.cuda_available == False:
raise SkipTest('Optional package cuda disabled') raise SkipTest('Optional package cuda disabled')
if theano.config.mode == 'FAST_COMPILE': # The PyCObject that represents the cuda random stream object
# can't be deep copied. This is needed for DebugMode
if theano.config.mode in ['FAST_COMPILE', 'DebugMode', 'DEBUG_MODE']:
mode_with_gpu = theano.compile.mode.get_mode('FAST_RUN').including('gpu') mode_with_gpu = theano.compile.mode.get_mode('FAST_RUN').including('gpu')
else: else:
mode_with_gpu = theano.compile.mode.get_default_mode().including('gpu') mode_with_gpu = theano.compile.mode.get_default_mode().including('gpu')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论