Giter Site home page Giter Site logo

cp-decomposition's Introduction

This is an implemetation of the method from our paper Speeding-up Convolutional Neural Networks Using Fine-tuned CP-Decomposition https://arxiv.org/pdf/1412.6553.pdf MNIST example, based on MNIST example from caffe, is provided.

Requrements: caffe, python with numpy and scikit-tensor

How to make it work:

  1. Set paths to your caffe installation in paths.py
  2. In lenet/lenet.prototxt, edit "source" params of input layers, or copy mnist_train_lmbd and mnist_test_lmdb from caffe/examples/mnist here. LeNet needs input data!
  3. run lenet/main.py, for example like this python lenet/main.py 5 conv2. First parameter of this script is the number of components R, and the second is layer name. Biggger R leads to more accurate, but slower models. The script will produce model lenet_accelerated.prototxt and weights file lenet_accelerated.caffemodel
  4. Now you can evaluate accelerated model $CAFFE_ROOT/build/tools/caffe time --model lenet_accelerated.prototxt $CAFFE_ROOT/build/tools/caffe test --model lenet_accelerated.prototxt -weights lenet_accelerated.caffemodel
  5. As shown in the paper, finetuning of accelerated model can improve accuracy

cp-decomposition's People

Contributors

vadim-v-lebedev avatar

Watchers

 avatar

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.