提交 09df373c authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Turn off test_value when checking for beta init.

上级 33c507f0
...@@ -719,6 +719,11 @@ def check_force_gemv_init(): ...@@ -719,6 +719,11 @@ def check_force_gemv_init():
beta*aa which will result in NaN's in the result, then we need intialize beta*aa which will result in NaN's in the result, then we need intialize
the memory to zeros. the memory to zeros.
""" """
tv = theano.config.compute_test_value
tvo = theano.config.compute_test_value_opt
theano.config.compute_test_value = 'off'
theano.config.compute_test_value_opt = 'off'
try:
aa = T.vector('aa') aa = T.vector('aa')
yy = T.vector('yy') yy = T.vector('yy')
xx = T.matrix('xx') xx = T.matrix('xx')
...@@ -727,6 +732,9 @@ def check_force_gemv_init(): ...@@ -727,6 +732,9 @@ def check_force_gemv_init():
gemv_no_inplace(aa, 1., xx, yy, 0.), gemv_no_inplace(aa, 1., xx, yy, 0.),
theano.compile.Mode(optimizer='fast_compile') theano.compile.Mode(optimizer='fast_compile')
) )
finally:
theano.config.compute_test_value = tv
theano.config.compute_test_value_opt = tvo
# Here we introduce NaNs into the data, if they are returned by the BLAS # Here we introduce NaNs into the data, if they are returned by the BLAS
# then we want gemv_c_code to initiliaze the memory to 0 so that we # then we want gemv_c_code to initiliaze the memory to 0 so that we
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论