提交 274bb747 authored 作者: Frederic Bastien's avatar Frederic Bastien

make mrg test_normal0 don't execute gpu test in fast compile mode.

上级 ab65e9c5
...@@ -449,7 +449,7 @@ def test_normal0(): ...@@ -449,7 +449,7 @@ def test_normal0():
# now with odd number of samples # now with odd number of samples
sample_size = (sample_size[0],sample_size[1]-1) sample_size = (sample_size[0],sample_size[1]-1)
if mode!='FAST_COMPILE':
print '' print ''
print 'ON GPU:' print 'ON GPU:'
R = MRG_RandomStreams(234, use_cuda=True) R = MRG_RandomStreams(234, use_cuda=True)
...@@ -457,14 +457,14 @@ def test_normal0(): ...@@ -457,14 +457,14 @@ def test_normal0():
assert n.dtype == 'float32' #well, it's really that this test w GPU doesn't make sense otw assert n.dtype == 'float32' #well, it's really that this test w GPU doesn't make sense otw
f = theano.function([], theano.Out( f = theano.function([], theano.Out(
theano.sandbox.cuda.basic_ops.gpu_from_host(n), theano.sandbox.cuda.basic_ops.gpu_from_host(n),
borrow=True), mode=mode) borrow=True), mode=mode_with_gpu)
theano.printing.debugprint(f) theano.printing.debugprint(f)
sys.stdout.flush() sys.stdout.flush()
print 'random?[:10]\n', numpy.asarray(f())[0,0:10] print 'random?[:10]\n', numpy.asarray(f())[0,0:10]
print '----' print '----'
sys.stdout.flush() sys.stdout.flush()
basictest(f, 50, sample_size, target_avg=-5.0, target_std=2.0, prefix='gpu mrg ', allow_01=True) basictest(f, steps, sample_size, target_avg=-5.0, target_std=2.0, prefix='gpu mrg ', allow_01=True)
print '' print ''
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论