提交 e82ae704 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

documented reason for lazy import

上级 3600bc03
...@@ -22,6 +22,13 @@ from theano.gof.python25 import all ...@@ -22,6 +22,13 @@ from theano.gof.python25 import all
import theano.gof.utils import theano.gof.utils
from theano.gof.null_type import NullType from theano.gof.null_type import NullType
from theano.printing import min_informative_str from theano.printing import min_informative_str
# we can't do "import theano.tensor"
# tensor depends on theano.compile
# theano.compile depends on theano.gradient (this file)
# the reason theano.compile depends on theano.gradient
# is that theano.compile.builders contains the op from graph
# functionality and it uses theano.gradient to implement
# the new op's grad method
tensor = None tensor = None
_msg_retType = 'op.grad(...) returned a non-list' _msg_retType = 'op.grad(...) returned a non-list'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论