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

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

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