Giter Site home page Giter Site logo

edge_inference_three-step_framework's Introduction

Edge_Inference_three-step_framework

This code is for the paper: "communication-computation tradeoffs in resource-constrained edge inference".

Framework

We propose a three-step framework to reduce the end-to-end latency in the edge inference. The structure is shown as follows:

avatar

Implementation

The three-step framework is implemented based on ResNet18. The network is split at the end of each building block.

Dependency

Pytorch 1.6.0
Torchvision 0.7.0
Numpy 1.6.12

Dataset

CIFAR-10

How to Run

  1. Pretrain a ResNet model from scratch or download from here.
  2. model_pruning.py uses magnitude-based pruning method to compress the on-device model with parameter -sp1, -sp2, -sp3, -sp4, and -sp5 to denote the Sparsity ratios in different building blocks. The pruned model is named sp1_xx_sp2_xx_sp3_xx_sp4_xx_test_acc_xxxx.
  3. feature_compression.py compresses the intermediate feature, which loads the pruned model by -load, and selects the split point by -split. Besides, -hid_dim determines the intermediate feature dimension, and -bit n means n-bit quantization.

Citation

@article{shao2020communication,
  title={Communication-computation trade-off in resource-constrained edge inference},
  author={Shao, Jiawei and Zhang, Jun},
  journal={IEEE Communications Magazine},
  volume={58},
  number={12},
  pages={20--26},
  year={2020},
  publisher={IEEE}
}

edge_inference_three-step_framework's People

Contributors

shaojiawei07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

edge_inference_three-step_framework's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.