Coder Social home page Coder Social logo

hbhbts / dnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from liangfu/dnn

0.0 2.0 0.0 5.17 MB

A light-weight deep learning framework implemented in C++.

Home Page: http://liangfu.github.io/dnn

License: MIT License

CMake 0.28% Python 1.15% Shell 0.02% Makefile 0.02% MATLAB 0.01% C++ 94.79% C 2.33% Objective-C 0.07% QMake 0.03% Objective-C++ 1.30%

dnn's Introduction

Deep Neural Nets

Build Status License

Introduction

The Deep Neural Nets (DNN) library is a deep learning framework designed to be small in size, computationally efficient and portable.

We started the project as a fork of the popular OpenCV library, while removing some components that is not tightly related to the deep learning framework. Comparing to Caffe and many other implements, DNN is relatively independent to third-party libraries, (Yes, we don't require Boost and Database systems to be install before crafting your own network models) and it can be more easily portable to mobile systems, like iOS, Android and RaspberryPi etc. And more importantly, DNN is powerful! It supports both convolutional networks and recurrent networks, as well as combinations of the two.

Available Modules

The following features have been implemented:

  • Mini-batch based learning, with OpenMP support
  • YAML based network definition
  • Gradient checking for all implemented layers

The following modules are implemented in current version:

Module Name Description
InputLayer for storing original input images
ConvolutionLayer performs 2d convolution upon images
MaxPoolingLayer performs max-pooling operation
DenseLayer fully connected Layer (optionally, perform activation and dropout)
SimpleRNNLayer for processing sequence data
MergeLayer for combining output results from multiple different layers

More modules will be available online !

Options To Define A Specific Layer

Layer Type Attributes
Input name,n_input_planes,input_height,input_width,seq_length
Convolution name,visualize,n_output_planes,ksize
MaxPooling name,visualize,ksize
SpatialTransform name,input_layer,n_output_planes,output_height,output_width
Dense name,input_layer(optional),visualize,n_output_planes,activation
TimeDistributed name,n_output_planes,output_height,output_width,seq_length,time_index
SimpleRNN name,n_output_planes,seq_length,time_index,activation
Merge name,input_layers,visualize,n_output_planes

With the above parameters given in YAML format, one can simply define a network. For instance, a lenet model can be defined as:

%YAML:1.0
layers:
  - {type: Input, name: input1, n_input_planes: 1, input_height: 28, input_width: 28, seq_length: 1}
  - {type: Convolution, name: conv1, visualize: 0, n_output_planes: 6, ksize: 5, stride: 1}
  - {type: MaxPooling, name: pool1, visualize: 0, ksize: 2, stride: 2}
  - {type: Convolution, name: conv2, visualize: 0, n_output_planes: 16, ksize: 5, stride: 1}
  - {type: MaxPooling, name: pool2, visualize: 0, ksize: 2, stride: 2}
  - {type: Dense, name: fc1, visualize: 0, n_output_planes: 10, activation: softmax}

Then, by ruuning network training program:

$ network train --solver data/mnist/lenet_solver.xml

one can start to train a simple network right away. And this is the way the source code and data models are tested in Travis-Ci. (See .travis.yml in the root directory)

Compilation

CMake is required for successfully compiling the project.

Under root directory of the project:

$ cd $DNN_ROOT
$ mkdir build
$ cmake .. 
$ make -j4

License

MIT

<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-8286931-2', 'auto'); ga('send', 'pageview'); </script>

dnn's People

Contributors

liangfu avatar

Watchers

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