提交 1fdf3bd3 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #2293 from abergeron/fix_blas_tv

Turn off test_value when checking for beta init.
......@@ -719,14 +719,22 @@ def check_force_gemv_init():
beta*aa which will result in NaN's in the result, then we need intialize
the memory to zeros.
"""
aa = T.vector('aa')
yy = T.vector('yy')
xx = T.matrix('xx')
f = theano.function(
[aa, yy, xx],
gemv_no_inplace(aa, 1., xx, yy, 0.),
theano.compile.Mode(optimizer='fast_compile')
)
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')
yy = T.vector('yy')
xx = T.matrix('xx')
f = theano.function(
[aa, yy, xx],
gemv_no_inplace(aa, 1., xx, yy, 0.),
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
# then we want gemv_c_code to initiliaze the memory to 0 so that we
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论