提交 5f49246d authored 作者: Pierre Luc Carrier's avatar Pierre Luc Carrier 提交者: Arnaud Bergeron

Remove RandomStream import from __init__.py

上级 fdc7c1f4
......@@ -191,11 +191,3 @@ def sparse_grad(var):
ret = var.owner.op.__class__(sparse_grad=True)(*var.owner.inputs)
return ret
# This cannot be done in tensor/__init__.py due to a circular
# dependency -- shared_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.tensor.shared_randomstreams import RandomStreams
# Imitate the numpy.random symbol with a tensor.random one
tensor.random = RandomStreams(seed=0xBAD5EED)
del RandomStreams
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论