Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/musco-ai/musco-tf
MUSCO: Multi-Stage COmpression of neural networks
https://github.com/musco-ai/musco-tf
cnn-acceleration cnn-compresion cp-decomposition deep-neural-networks low-rank-approximation musco network-compression tensor-decomposition tensorflow truncated-svd tucker vbmf
Last synced: 4 months ago
JSON representation
MUSCO: Multi-Stage COmpression of neural networks
- Host: GitHub
- URL: https://github.com/musco-ai/musco-tf
- Owner: musco-ai
- License: apache-2.0
- Created: 2019-10-01T11:02:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-07T21:34:33.000Z (about 4 years ago)
- Last Synced: 2024-10-03T09:37:04.891Z (4 months ago)
- Topics: cnn-acceleration, cnn-compresion, cp-decomposition, deep-neural-networks, low-rank-approximation, musco, network-compression, tensor-decomposition, tensorflow, truncated-svd, tucker, vbmf
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![](https://user-images.githubusercontent.com/11778655/66068156-bef1a880-e555-11e9-8d26-094071133a11.png) MUSCO: Multi-Stage COmpression of neural networks
This repository contains supplementary code for the paper [MUSCO: Multi-Stage COmpression of neural networks](https://arxiv.org/pdf/1903.09973.pdf).
It demonstrates how a neural network with convolutional and fully connected layers can be compressed using iterative tensor decomposition of weight tensors.## Requirements
```
numpy
scipy
scikit-tensor-py3
tensorly-musco
absl-py
tqdm
tensorflow-gpu (TensorRT support)
```## Installation
```
pip install musco-tf
```## Quick Start
```python
from musco.tf import CompressorVBMF, Optimizermodel = load_model("model.h5")
compressor = CompressorVBMF(model)while True:
model = compressor.compress_iteration(number=5)
# Fine-tune compressed model.# Compressor decomposes 5 layers on each iteration
# and returns compressed model. You have to fine-tune
# model after each iteration to restore accuracy.
# Compressor automatically selects the best parameters
# for decomposition on each iteration.# You can freeze and quantize model after compression.
optimizer = Optimizer(precision="FP16", max_batch_size=16)
optimizer.freeze(model)
optimizer.optimize("frozen.pb")
```## Citing
If you used our research, we kindly ask you to cite the corresponding [paper](https://arxiv.org/abs/1903.09973).```
@article{gusak2019one,
title={MUSCO: Multi-Stage Compression of neural networks},
author={Gusak, Julia and Kholiavchenko, Maksym and Ponomarev, Evgeny and Markeeva, Larisa and Oseledets, Ivan and Cichocki, Andrzej},
journal={arXiv preprint arXiv:1903.09973},
year={2019}
}
```## License
Project is distributed under [Apache License 2.0](https://github.com/musco-ai/musco-tf/blob/master/LICENSE).