提交 aa445f8b authored 作者: Frederic Bastien's avatar Frederic Bastien

Add back the error of missing input detection.

上级 f20ea386
...@@ -207,6 +207,10 @@ class Scan(PureOp): ...@@ -207,6 +207,10 @@ class Scan(PureOp):
if self.info['gpu'] or self.info['gpua']: if self.info['gpu'] or self.info['gpua']:
self._hash_inner_graph = self.info['gpu_hash'] self._hash_inner_graph = self.info['gpu_hash']
else: else:
# gof don't know about SharedVariable. So add them as inputs.
for var in theano.gof.graph.inputs(self.outputs, self.inputs):
if var not in self.inputs and not isinstance(var, theano.Constant):
raise theano.gof.MissingInputError("ScanOp is missing an input.")
self._cmodule_key = gof.CLinker().cmodule_key_variables(self.inputs, self._cmodule_key = gof.CLinker().cmodule_key_variables(self.inputs,
self.outputs, self.outputs,
[]) [])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论