diff --git a/python/tvm/relay/frontend/common.py b/python/tvm/relay/frontend/common.py index ef9f63f3cd958..2871b7f73163f 100644 --- a/python/tvm/relay/frontend/common.py +++ b/python/tvm/relay/frontend/common.py @@ -255,7 +255,8 @@ def get_expr(self, name): def set_expr(self, name, expr): assert isinstance(expr, _expr.Expr) - self.exprs[name] = expr + if name not in self.exprs: + self.exprs[name] = expr def set_padding(self, paddings): self.paddings = paddings