提交 74cdb5db authored 作者: ChienliMa's avatar ChienliMa

small fix

上级 b91192dc
...@@ -624,7 +624,7 @@ class Function(object): ...@@ -624,7 +624,7 @@ class Function(object):
# Check if given ShareVariables exist # Check if given ShareVariables exist
for sv in iterkeys(swap): for sv in iterkeys(swap):
if sv not in exist_svs: if not exist_svs.has_key(sv):
raise ValueError("SharedVariable: %s not found" % raise ValueError("SharedVariable: %s not found" %
(sv.name)) (sv.name))
...@@ -648,7 +648,6 @@ class Function(object): ...@@ -648,7 +648,6 @@ class Function(object):
# Swap SharedVariable in fgraph # Swap SharedVariable in fgraph
# if inputs was replaced, change self.inputs # if inputs was replaced, change self.inputs
fg_cpy.inputs[index] = swap_sv fg_cpy.inputs[index] = swap_sv
fg_cpy.replace(in_v, swap_sv, reason="Swap SV") fg_cpy.replace(in_v, swap_sv, reason="Swap SV")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论