Giter VIP home page Giter VIP logo

bromide's Introduction

What is Bromide?

Bromide is a general convolutional neural network (CNN) inference program using the Halide image processing language which is scheduled to be fast(-er than Caffe, up to 3x for now) on a single machine using CPU.

#Installation

##Installation of Halide

Bromide is built on the basis of Halide. To use Bromide, a copy of built Halide needs to be in place. The binary release of Halide can be downloaded [here] (https://github.com/halide/Halide/releases).

##Installation of glog Glog is helpful in Bromide. It can be downloaded [here] (https://github.com/google/glog).

##Installation of protobuf Protocol Buffer is required for using Bromide. Protobuf can be downloaded [here] (https://developers.google.com/protocol-buffers/docs/downloads#latest-version). Note that src/caffe.pb.cc and util/caffe.pb.h need to be generated by the same version with the protobuf you link your application to. To make sure it works, we suggest you do: protoc resources/caffe.proto, to obtain the caffe.pb.h and caffe.ph.cc files.

##Dependencies and Linking To include/link the header files and source files, you need to check the Makefile, and modify it if necessary. The paths for searching static or shared library are defined in IDIR and LFLAGS, respectively. The default paths suppose your Halide is installed in your user's root directory ~/.

##Setting environment Several environment variables for shared memory path need to be clarified for the ease of linking:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/halide/bin

#Running Bromide

##Running CNN Having gone through the above procedures, it is now easy to run a certain CNN. The default network is LeNet. Simply running make clean and make, and ./run_test, the inference process of the network will start.

##Environment ###Generating code If you are interested in the generated code by Halide, you may set the environment variable:

export HL_DEBUG_CODEGEN=1

If you wish to turn it off, just set it to 0.

###Profiling time and memory If you are interested in the time and memory consumed by each stage of the whole pipeline, such as each layer of the whole network, you may set:

export HL_JIT_TARGET=host-profile

If you wish to turn it off, just set it to blank.

bromide's People

Contributors

vanryan avatar

Stargazers

 avatar Dan Liang avatar Wentao Zhang avatar

Watchers

James Cloos avatar  avatar Ruizhou Ding 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.