提交 b0e4cae7 authored 作者: ChienliMa's avatar ChienliMa

raise ValueError when SharedVariable not found

上级 b1760378
......@@ -626,7 +626,8 @@ class Function(object):
# Check if given ShareVariables exist
for sv in swap_svs_ori:
if sv not in exist_svs:
warnings.warn("SharedVairable: %s not found" % (sv.name))
raise ValueError("SharedVairable: %s not found" %
(sv.name))
# Swap SharedVairable in fgraph and ins
for index, (i, in_v) in enumerate(zip(ins, fg_cpy.inputs)):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论