From 165b8de8a682a2b82c741b8cb2fc84197e93b743 Mon Sep 17 00:00:00 2001 From: costigt-dev <156176839+costigt-dev@users.noreply.github.com> Date: Wed, 1 May 2024 13:58:39 +0100 Subject: [PATCH] added isinstance elif incase variable isn't a tensor --- src/brevitas/nn/mixin/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/brevitas/nn/mixin/base.py b/src/brevitas/nn/mixin/base.py index a70394e07..6e48339ab 100644 --- a/src/brevitas/nn/mixin/base.py +++ b/src/brevitas/nn/mixin/base.py @@ -79,7 +79,7 @@ def unpack_input(self, inp: Union[Tensor, QuantTensor]) -> Union[Tensor, QuantTe if not torch._C._get_tracing_state(): if isinstance(inp, QuantTensor): inp = inp.set(value=inp.value.rename(None)) - else: + elif isinstance(inp, Tensor): inp = inp.rename(None) return inp