Code Monkey home page Code Monkey logo

active-shift's Introduction

Active Shift Layer

This repository contains the implementation for Active Shift Layer (ASL).

Please see the paper Constructing Fast Network through Deconstruction of Convolution.

This paper is accepted in NIPS 2018 as spotlight session (slide, poster)

The code is based on Caffe
Tensorflow implementation is also available at ASL-TF

Introduction

Deconstruction

Naive spatial convolution can be deconstructed into a shift layer and a 1x1 convolution.

This figure shows the basic concept of deconstruction. Basic Concept

Active Shift Layer (ASL)

For the efficient shift, we proposed active shift layer.

  • Uses depthwise shift
  • Introduced new shift parameters for each channel
  • New shift parameters(alpha, beta) are learnable

Usage

ASL has 2 parameters : the shift amount (alpha,beta)
Using asl_param, you can control hyper-parameters for ASL. Please see the caffe.proto

This is the example of a usage. Please refer CIFAR10 prototxt for more details.

layer {
  name: "shift0"
  type: "ActiveShift"
  bottom: "conv0"
  top: "shift0"
  param {
    lr_mult: 0.001
    decay_mult: 0.0
  }
  param {
    lr_mult: 0.001
    decay_mult: 0.0
  }
  asl_param {
    normalize: true
  }
}

How to test code

You can validate backpropagation using test code. Because it is not differentiable on lattice points, you should not use integer point position when you are testing code. It is simply possible to define "TEST_ASHIFT_ENV" macro in active_shift_layer.hpp

  1. Define "TEST_ASHIFT_ENV" macro in active_shift_layer.hpp
  2. > make test
  3. > ./build/test/test_active_shift_layer.testbin

You should pass all tests. Before the start, don't forget to undefine TEST_ASHIFT_ENV macro and make again.

Trained Model

You can download trained ImageNet model here.

TODO

  • Update Readme
  • Upload trained ImageNet model
  • Upload CIFAR10 prototxt

active-shift's People

Contributors

blgene avatar cdluminate avatar cypof avatar dgolden1 avatar eelstork avatar erictzeng avatar flx42 avatar intelfx avatar jamt9000 avatar jeffdonahue avatar jyegerlehner avatar jyh2986 avatar kloudkl avatar longjon avatar lukeyeager avatar mavenlin avatar mohomran avatar noiredd avatar philkr avatar qipeng avatar rbgirshick avatar ronghanghu avatar sergeyk avatar sguada avatar shelhamer avatar tnarihi avatar williford avatar willyd avatar yangqing avatar yosinski 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.