提交 38a6331a authored 作者: Frederic Bastien's avatar Frederic Bastien

Be more specific in exception caught

上级 90467953
......@@ -997,7 +997,7 @@ def local_1msigmoid(node):
if sub_r.owner and sub_r.owner.op == sigmoid:
try:
val_l = opt.get_scalar_constant_value(sub_l)
except Exception:
except tensor.NotScalarConstantError:
return
if np.allclose(np.sum(val_l), 1):
out = sigmoid(-sub_r.owner.inputs[0])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论