提交 5f82bcfe authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix assignment of g_cost_is_zero

上级 3bd9ffde
...@@ -475,6 +475,8 @@ def grad(cost, wrt, g_cost=None, consider_constant=None, ...@@ -475,6 +475,8 @@ def grad(cost, wrt, g_cost=None, consider_constant=None,
cval = theano.get_constant_value(g_cost) cval = theano.get_constant_value(g_cost)
if cval == 0: if cval == 0:
g_cost_is_zero = True g_cost_is_zero = True
else:
g_cost_is_zero = False
except TypeError: except TypeError:
g_cost_is_zero = False g_cost_is_zero = False
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论