提交 bfa83130 authored 作者: Frederic's avatar Frederic

Fix test in DebugMode

上级 1ddf3adb
...@@ -1189,12 +1189,15 @@ class T_random_function(utt.InferShapeTester): ...@@ -1189,12 +1189,15 @@ class T_random_function(utt.InferShapeTester):
# binomial was created by calling RandomFunction on a string, # binomial was created by calling RandomFunction on a string,
# random_integers by calling it on a function. # random_integers by calling it on a function.
rng_r = random_state_type() rng_r = random_state_type()
mode = None
if theano.config.mode in ["DEBUG_MODE", "DebugMode"]:
mode = 'FAST_COMPILE'
post_bin_r, bin_sample = binomial(rng_r, (3, 5), 1, .3) post_bin_r, bin_sample = binomial(rng_r, (3, 5), 1, .3)
f = theano.function([rng_r], [post_bin_r, bin_sample]) f = theano.function([rng_r], [post_bin_r, bin_sample], mode=mode)
pkl_f = pickle.dumps(f) pkl_f = pickle.dumps(f)
post_int_r, int_sample = random_integers(rng_r, (3, 5), -1, 8) post_int_r, int_sample = random_integers(rng_r, (3, 5), -1, 8)
g = theano.function([rng_r], [post_int_r, int_sample]) g = theano.function([rng_r], [post_int_r, int_sample], mode=mode)
pkl_g = pickle.dumps(g) pkl_g = pickle.dumps(g)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论