diff --git a/python/tvm/relay/frontend/common.py b/python/tvm/relay/frontend/common.py index be23f2b50273..ef9f63f3cd95 100644 --- a/python/tvm/relay/frontend/common.py +++ b/python/tvm/relay/frontend/common.py @@ -106,7 +106,7 @@ def get_int_tuple(self, key, default=RequiredAttr()): """ if key in self.attrs: tshape = self.attrs[key] - return tuple(int(x.strip()) for x in tshape.strip('()[]').split(',')) + return tuple(int(x.strip()) for x in tshape.strip('()[]').split(',') if x) if isinstance(default, RequiredAttr): raise AttributeError("Required attribute {} not found.".format(key)) return default