提交 105f614a authored 作者: Samira Shabanian's avatar Samira Shabanian

Cast the value to floatX

上级 e7f737cf
...@@ -101,7 +101,7 @@ def add_tag_trace(thing, user_line=None): ...@@ -101,7 +101,7 @@ def add_tag_trace(thing, user_line=None):
"theano/scan_module/", "theano\\scan_module\\", "theano/scan_module/", "theano\\scan_module\\",
"theano/sparse/", "theano\\sparse\\", "theano/sparse/", "theano\\sparse\\",
"theano/typed_list/", "theano\\typed_list\\"] "theano/typed_list/", "theano\\typed_list\\"]
tr = simple_extract_stack(limit=user_line, skips=skips) tr = simple_extract_stack(limit=user_line, skips=skips)
# Different python version use different sementic for # Different python version use different sementic for
# limit. python 2.7 include the call to extrack_stack. The -1 get # limit. python 2.7 include the call to extrack_stack. The -1 get
......
...@@ -29,11 +29,11 @@ def test_BNComposite(): ...@@ -29,11 +29,11 @@ def test_BNComposite():
m = theano.tensor.vector('m') m = theano.tensor.vector('m')
v = theano.tensor.vector('v') v = theano.tensor.vector('v')
x.tag.test_value = numpy.random.rand(2, 2) x.tag.test_value = numpy.random.rand(2, 2).astype(theano.config.floatX)
b.tag.test_value = numpy.random.rand(2) b.tag.test_value = numpy.random.rand(2).astype(theano.config.floatX)
g.tag.test_value = numpy.random.rand(2) g.tag.test_value = numpy.random.rand(2).astype(theano.config.floatX)
m.tag.test_value = numpy.random.rand(2) m.tag.test_value = numpy.random.rand(2).astype(theano.config.floatX)
v.tag.test_value = numpy.random.rand(2) v.tag.test_value = numpy.random.rand(2).astype(theano.config.floatX)
bn_ref_op = bn_ref(x, g, b, m, v) bn_ref_op = bn_ref(x, g, b, m, v)
f_ref = theano.function([x, b, g, m, v], [bn_ref_op]) f_ref = theano.function([x, b, g, m, v], [bn_ref_op])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论