未验证 提交 4434f8b4 编写于 作者: Q qingqing01 提交者: GitHub

Use the OrderedDict in the framework.py for the variable map. (#10282)

上级 c93a624b
...@@ -658,10 +658,10 @@ class Operator(object): ...@@ -658,10 +658,10 @@ class Operator(object):
class Block(object): class Block(object):
def __init__(self, program, idx): def __init__(self, program, idx):
self.desc = program.desc.block(idx) self.desc = program.desc.block(idx)
self.vars = dict() # var_name --> var self.vars = collections.OrderedDict() # var_name --> var
self.ops = list() # operator list self.ops = list() # operator list
self.program = program self.program = program
self.removed_vars = dict() self.removed_vars = collections.OrderedDict()
def __str__(self): def __str__(self):
return self.to_string(True) return self.to_string(True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册