提交 26520161 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

replaced a call to grad_sources_inputs with a call to grad

上级 a75e306c
...@@ -341,12 +341,10 @@ def Lop(f, wrt, eval_points, consider_constant=None, ...@@ -341,12 +341,10 @@ def Lop(f, wrt, eval_points, consider_constant=None,
if not isinstance(wrt, (list, tuple)): if not isinstance(wrt, (list, tuple)):
wrt = [wrt] wrt = [wrt]
arg1 = zip(f, eval_points) known = dict(zip(f, eval_points))
arg2 = list(wrt)
gmap = grad_sources_inputs( gmap = grad(cost=None, known_grads=known,
arg1, consider_constant=wrt, wrt=wrt)
arg2)
# Note : If p is not in gmap there can be several reasons, among which # Note : If p is not in gmap there can be several reasons, among which
# is the fact that p might not be part of the computational graph. A # is the fact that p might not be part of the computational graph. A
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论