GithubHelp home page GithubHelp logo

xiaotie1005 / depthwiseconvolution Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yonghenglh6/depthwiseconvolution

0.0 1.0 0.0 16 KB

A personal depthwise convolution layer implementation on caffe by liuhao.(only GPU)

C++ 24.34% Cuda 41.68% Python 33.97%

depthwiseconvolution's Introduction

Depthwise Convolutional Layer

Introduction

This is a personal caffe implementation of mobile convolution layer. For details, please read the original paper:

How to build

  1. Merge the caffe folder in the repo with your own caffe. $ cp -r $REPO/caffe/* $YOURCAFFE/
  2. Then make. $ cd $YOURCAFFE && make

Usage

Replacing the type of mobile convolution layer with "DepthwiseConvolution" is all. Please refer to the example/Withdw_MN_train_128_1_train.prototxt, which is altered from

GPUPerformance on example net

GPUPerformance Origin1 Mine
forward_batch1 41 ms 8 ms
backward_batch1 51 ms 11 ms
forward_batch16 532 ms 36 ms
backward_batch16 695 ms 96 ms

Transfer normal net to mobilenet

I write a script [transfer2Mobilenet.py] to convert normal net to mobilenet format. You may try too.
usage: python ./transfer2Mobilenet.py sourceprototxt targetprototxt [--midbn nobn --weight_filler msra --activation ReLU]    ["--origin_type" means the depthwise convolution layer's type will be "Convolution" instead of "DepthwiseConvolution"]

The "transferTypeToDepthwiseConvolution.py" will be used for changing the depthwise convolution layer's type from "Convolution" to "DepthwiseConvolution".

Footnotes

  1. When turn on cudnn, the memory consuming of mobilenet would increase to unbelievable level. You may try. โ†ฉ

depthwiseconvolution's People

Contributors

yonghenglh6 avatar

Watchers

James Cloos 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.