提交 936d499a authored 作者: Ian Goodfellow's avatar Ian Goodfellow

fixed bug where gradient is set to DisconnectedType instance instead of

variable with type DisconnectedType
上级 71d77144
......@@ -732,7 +732,7 @@ def grad_sources_inputs(sources, graph_inputs, warn_type = True):
#according to the flag, possibly raise an error if wrt is disconnected
for elem in wrt:
if elem not in var_to_node_to_idx and elem not in outputs:
grad_dict[elem] = DisconnectedType()
grad_dict[elem] = DisconnectedType()()
_populate_grad_dict(var_to_node_to_idx,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论