提交 041dcdb8 authored 作者: abalkin's avatar abalkin

Restored a change lost during merge.

上级 9588b8ac
...@@ -174,3 +174,13 @@ except ImportError: ...@@ -174,3 +174,13 @@ except ImportError:
" It is needed for Theano tests.") " It is needed for Theano tests.")
else: else:
test = TheanoNoseTester().test test = TheanoNoseTester().test
# This cannot be done in tensor/__init__.py due to a circular dependency -- randomstreams
# depends on raw_random which depends on tensor. As a work-around, we import RandomStreams
# here and inject an instance in tensor.
from theano import tensor
from theano.tensor.randomstreams import RandomStreams
# Imitate the numpy.random symbol with a tensor.random one
tensor.random = RandomStreams(seed=0xBAD5EED, no_warn=True)
del RandomStreams
__import__('theano.tensor.shared_randomstreams')
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论