Lpot

Latest version: v1.6

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.2

quantizer = Quantization(conf.yaml)
quantizer.model = common.Model('/path/to/model')
dl = dataset('/path/to/dataset')
quantizer.calib_dataloader = common.DataLoader(dl, batch_size=32)
quantizer.eval_dataloader = common.DataLoader(dl, batch_size=32)
quantizer.metric = common.Metric(custom_metric)
q_model = quantizer()
q_model.save('/path/to/output/dir') explicitly call to save q_model



Built-in transform/dataset/metric APIs

v1.2 refines LPOT built-in transform/dataset/metric to unify APIs cross different framework backends.

Refer to [dataset](./dataset.md), [transform](./transform.md), and [metric](./metric.md) to learn how to use them in yaml or code.

1.1

quantizer = Quantization('/path/to/user.yaml')
ds = dataset('/path/to/dataset')
dataloader = quantizer.dataloader(ds, batch_size=100)
quantizer.metric('metric', metric)
q_model = quantizer('/path/to/model', q_dataloader = dataloader, eval_dataloader = dataloader)
... user to write framework specific code to save q_model



python

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.