提交 2af3c8b2 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

explain the check with hasattr

上级 36a6322a
......@@ -1319,6 +1319,9 @@ class Scan(PureOp):
connection_pattern[iidx + 1][oidx] = False
else:
for inner_out in ols:
# We check for the dtype because inner_out could be
# any Theano type like Generic or RandomState, for
# which we can not impose a dtype
if hasattr(inner_out, 'dtype'):
# Note that we do not care about the output of
# this compute gradient. We just care to see if
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论