/tf_compress

General library for compressing tensorflow models

Primary LanguagePythonApache License 2.0Apache-2.0

Tensoflow Compress

General compression library for tensorflow models.

Installation

The easiest way to install is using pip.

# sudo apt-get install bazel git python-pip
git clone https://github.com/kkiningh/tf_compress.git
cd tf_compress
pip install --user .

You can also build a python package from source. This requires Bazel.

# sudo apt-get install bazel git python-pip
git clone https://github.com/kkiningh/tf_compress.git
cd tf_compress
bazel build --copt=-O3 --copt=-march=native :pip_pkg
PKGDIR=$(mktemp -d)
./bazel-bin/pip_pkg $PKGDIR
pip install --user --upgrade $PKGDIR/*.whl

Usage

Access the library using

import tensorflow_compress as tfc

Acknowledgements

This library was inspired by tf.contrib.model_pruning.