From ec041ffdfd4a19099fbf757709023a912a2c50b5 Mon Sep 17 00:00:00 2001 From: Benjamin Trent Date: Wed, 15 Jun 2022 09:23:24 -0400 Subject: [PATCH] [ML] ensure quantization is applied (#472) --- eland/ml/pytorch/traceable_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eland/ml/pytorch/traceable_model.py b/eland/ml/pytorch/traceable_model.py index 77b670c..0d6799c 100644 --- a/eland/ml/pytorch/traceable_model.py +++ b/eland/ml/pytorch/traceable_model.py @@ -41,7 +41,7 @@ class TraceableModel(ABC): def quantize(self) -> None: torch.quantization.quantize_dynamic( - self._model, {torch.nn.Linear}, dtype=torch.qint8 + self._model, {torch.nn.Linear}, dtype=torch.qint8, inplace=True ) def trace(self) -> TracedModelTypes: