提交 e513a531 authored 作者: Reyhane Askari's avatar Reyhane Askari

minor fix

上级 fb83310e
...@@ -97,7 +97,6 @@ class Apply(Node): ...@@ -97,7 +97,6 @@ class Apply(Node):
self.op = op self.op = op
self.inputs = [] self.inputs = []
self.tag = utils.scratchpad() self.tag = utils.scratchpad()
utils.add_tag_trace(self)
if not isinstance(inputs, (list, tuple)): if not isinstance(inputs, (list, tuple)):
raise TypeError("The inputs of an Apply must be a list or tuple") raise TypeError("The inputs of an Apply must be a list or tuple")
...@@ -118,7 +117,8 @@ class Apply(Node): ...@@ -118,7 +117,8 @@ class Apply(Node):
if output.owner is None: if output.owner is None:
output.owner = self output.owner = self
output.index = i output.index = i
output.tag = utils.scratchpad() if not hasattr(output, "tag"):
output.tag = utils.scratchpad()
utils.add_tag_trace(output) utils.add_tag_trace(output)
elif output.owner is not self or output.index != i: elif output.owner is not self or output.index != i:
raise ValueError("All output variables passed to Apply must belong to it.") raise ValueError("All output variables passed to Apply must belong to it.")
......
...@@ -613,7 +613,6 @@ class PureOp(object): ...@@ -613,7 +613,6 @@ class PureOp(object):
""" """
return_list = kwargs.pop('return_list', False) return_list = kwargs.pop('return_list', False)
node = self.make_node(*inputs, **kwargs) node = self.make_node(*inputs, **kwargs)
utils.add_tag_trace(node)
if config.compute_test_value != 'off': if config.compute_test_value != 'off':
run_perform = True run_perform = True
......
...@@ -308,8 +308,6 @@ class Print(Op): ...@@ -308,8 +308,6 @@ class Print(Op):
self.message = message self.message = message
self.attrs = tuple(attrs) # attrs should be a hashable iterable self.attrs = tuple(attrs) # attrs should be a hashable iterable
self.global_fn = global_fn self.global_fn = global_fn
self.tag = gof.utils.scratchpad()
gof.utils.add_tag_trace(self)
def make_node(self, xin): def make_node(self, xin):
xout = xin.type.make_variable() xout = xin.type.make_variable()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论