Skip to content

Installation

With Python >= 3.10:

pip install sparsepixels

This pulls in everything you need to build and train sparse models: TensorFlow, Keras 3, HGQ2 (the quantization backend), and our built-in monitoring and plotting tools.

Converting to HLS

Deploying a trained model to FPGA firmware additionally needs hls4ml. Support for sparsepixels is in an open pull request that is not yet merged, so for now install hls4ml from the PR branch:

pip install "git+https://github.com/hftsoi/hls4ml.git@sparsepixels"

See HLS Conversion for details.