mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
[ML] ensure quantization is applied (#472)
This commit is contained in:
parent
07af00c741
commit
ec041ffdfd
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user