Practical overview
When it fits
Use it when you need a code-based LSQ workflow for ResNet quantization experiments and can supply the configuration, data and compute environment for your run.
Who it is for
- Researchers and developers experimenting with quantized ResNet training.
- PyTorch users evaluating quantized-model accuracy from checkpoints.
- Developers prepared to add and register model code when adapting the framework to another architecture.
Documented uses
- Train quantized ResNet models using YAML configuration settings.
- Resume training from a checkpoint or evaluate a quantized model's accuracy.
- Compare configurations such as weight and activation bitwidths using model results.
- Extend the implementation with added model code and a registered architecture.
Requirements & limits
The repository is public and identified as MIT-licensed.
- The current supported model family is ResNet, with listed variants for ImageNet and CIFAR-10.
- The README specifies Python 3.8, PyTorch GPU version 1.5 or later, CUDA toolkit 10.1, TensorBoard, scikit-learn, PyYAML and Munch.
- The implementation generally follows LSQ paper version 2 but initializes activation quantization step sizes to 1.0.
- The README reports one ImageNet ResNet-18 result at 3-bit weights and 2-bit activations: 66.9% top-1 and 87.2% top-5 accuracy.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the documented Python environment
Prepare the Anaconda environment and dependencies listed for using Lsq Net.
Before you start
- Anaconda or conda
- Python 3.8
- GPU-capable PyTorch installation
Steps
Create a conda environment with Python 3.8.
Install PyTorch, torchvision and cudatoolkit 10.1 from the PyTorch channel.
Install TensorBoard.
Install scikit-learn, PyYAML and Munch.
Expected outcome
An environment with the dependencies specified in the repository README.
Guide limitations
- This covers dependency setup only; it does not establish that a particular machine or CUDA setup is compatible.
- The README specifies PyTorch GPU version 1.5 or later.
Launch a configured training or evaluation run
Pass a YAML configuration file to the repository's main script for its documented training or evaluation workflow.
Before you start
- The repository and its dependencies
- A YAML configuration file, such as a provided example or a modified copy of config.yaml
- A dataset and checkpoint as required by the selected configuration
Steps
Choose or copy a YAML configuration file and adjust its documented options.
Run main.py with the configuration file path as its argument.
For continued training or model evaluation, set resume.path in the YAML file to the checkpoint path.
Expected outcome
The program starts with the selected YAML settings; training saves the best model parameters after each epoch, and a checkpoint path can be used to resume training or evaluate model accuracy.
Guide limitations
- Only ResNet architectures are currently supported.
- The README documents the command and checkpoint configuration but does not provide a complete dataset setup procedure.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- zhutmost/lsq-net · Official homepage title · retained in its source language

