提交 79c3a5f1 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added commented code for disallowing None (uncomment to catch Ops that

use it)
上级 074c39ef
......@@ -566,6 +566,8 @@ def _populate_grad_dict(var_to_node_to_idx,\
#zero. Assuming it is zero prevents us from disconnecting NaNs above.
#eventually we should disallow this return type and force all ops
#to return the correct thing
#raise AssertionError('%s returned None for a gradient term, '
# 'this is prohibited' % node.op)
term_dict[node][i] = node.inputs[i].zeros_like()
if warn_type:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论