提交 b62b7699 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Also automatically declare as implicit inputs those that take a (shared) variable as default value

上级 f8b459a9
......@@ -163,7 +163,12 @@ class In(SymbolicInput):
mutable=None, strict=False, autoname=True,
implicit=None):
if implicit is None:
implicit = isinstance(value, gof.Container)
# TODO Having a default value being a Variable only makes sense
# if this is a SharedVariable. This should be changed once shared
# variables are part of Theano instead of living in a separate
# repository.
implicit = (isinstance(value, gof.Container) or
isinstance(value, gof.Variable))
super(In, self).__init__(variable, name, update, mutable, strict,
autoname, implicit = implicit)
self.value = value
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论