diff --git a/python/tvm/relay/frontend/pytorch.py b/python/tvm/relay/frontend/pytorch.py index 635cb960a829..4db1b3a27cc4 100644 --- a/python/tvm/relay/frontend/pytorch.py +++ b/python/tvm/relay/frontend/pytorch.py @@ -738,6 +738,8 @@ def full_impl(self, data, fill_value, dtype): size = _op.concatenate(tmp, axis=0) if not isinstance(fill_value, _expr.Constant): + if isinstance(fill_value, _expr.Expr): + fill_value = _infer_value(fill_value, {}) fill_value = _expr.const(fill_value, dtype=dtype) out = _op.full(fill_value, size, dtype=dtype) if need_reshape: