提交 6d6cd33c authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed typo in error message

上级 da64a252
...@@ -4748,10 +4748,10 @@ def grad(cost, wrt, g_cost=None, consider_constant=[], warn_type=False, ...@@ -4748,10 +4748,10 @@ def grad(cost, wrt, g_cost=None, consider_constant=[], warn_type=False,
ret = [] ret = []
for p in wrt: for p in wrt:
if p not in gmap and not assume_continuously_differentiable: if p not in gmap and not assume_continuously_differentiable:
raise ValueError(("grad method was asked to compute the graident " raise ValueError(("grad method was asked to compute the gradient "
"with respect to a variable that is not part of " "with respect to a variable that is not part of "
"the computational graph of the cost or is used " "the computational graph of the cost, or is used "
"by a non-differentiable operator "),p) "by a non-differentiable operator"), p)
else: else:
ret.append(gmap.get(p, zeros_like(p))) ret.append(gmap.get(p, zeros_like(p)))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论