提交 73c3850d authored 作者: Frederic Bastien's avatar Frederic Bastien

Catch only Exception.

上级 ee723ca4
......@@ -453,12 +453,12 @@ class ScanSaveMem(gof.Optimizer):
if i > op.n_mit_mot:
try:
length = shape_of[out][0]
except:
except Exception:
length = node.inputs[0] + init_l[i]
else:
try:
length = shape_of[out][0]
except:
except Exception:
length = out.shape[0]
cf_slice = tensor.basic.get_canonical_form_slice(
this_slice[0], length)
......@@ -555,7 +555,7 @@ class ScanSaveMem(gof.Optimizer):
else:
try:
length = shape_of[out][0]
except:
except Exception:
length = out.shape[0]
cf_slice = tensor.basic.get_canonical_form_slice(
this_slice[0],length)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论