Skip to main content

A standalone package to do the vitis quantization step.

Project description

Vitis Quantizer


A pip installable package to do the vitis model quantization for tensorflow 2.

This is a migration of the code here to a standalone pip package that won't conflict with the tensorflow-model-optimization package.

Working in the docker image is annoying and this code should be standalone.


pip install vitis-quantizer

Build from source:

python3 bdist_wheel
pip install dist/vitis_quantizer-0.1.0-py3-none-any.whl


Usage is the same as Vitis AI models.

import tensorflow as tf
import vitis_quantizer

# Train/Get/Make a keras model somehow
model = tf.keras.models.load_model("/path/to/keras/model")
quantizer = vitis_quantizer.VitisQuantizer(model)
with vitis_quantizer.quantize_scope():
    quantized_model = quantizer.quantize_model(calib_dataset=dataset)"/path/to/save/quantized/model")

After you have the quantized model saved, use vitis script.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vitis-quantizer-0.1.3.tar.gz (171.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page