Build Larq Compute Engine¶
The Larq Compute Engine (LCE) repository consists of two main components:
LCE Runtime: which is a collection of highly optimized TensorFlow Lite custom operators.
LCE Converter: which takes a Larq model and generates a TensorFlow Lite FlatBuffer file (
.tflite) compatible with the LCE runtime.
Make sure to checkout the
git tag matching the version of the LCE converter used to convert the model:
git checkout v0.5.0
pip freeze | grep larq-compute-engine
Setup the build environment¶
To install Bazelisk on Linux, run the following two commands (replace
v1.6.1 with your preferred bazelisk version):
sudo wget -O /usr/local/bin/bazel \ https://github.com/bazelbuild/bazelisk/releases/download/v1.6.1/bazelisk-linux-amd64 sudo chmod +x /usr/local/bin/bazel
To install Bazelisk on MacOS, run:
brew install bazelisk
Build LCE Runtime¶
The LCE runtime has a diverse platform support, covering Android and ARM-based boards such as Raspberry Pi. To build/install/run LCE runtime on each of these platforms, please refer to the corresponding guide.
Build LCE Converter¶
pip install larq-compute-engine
To build the LCE pip package yourself, refer to building the converter.