Code Monkey home page Code Monkey logo

cuda-mcdnn's Introduction

CUDA-MCDNN

Document

  1. The first version author is zhxfl

Results

CNN accelerated by cuda and lib CUDNN

  • The training time is greatly reduced compared to the first version
  1. Test on mnist
  2. Test on cifar-10

Feature

  1. Use cudnn lib to develop CNN
  2. Use Dropout and NetWork In NetWork(NIN) to train the NetWork
  3. Use GoogLeNet Inception structure to train NetWork

Compile

Depend on opencv and cuda
You can compile the code on windows or linux.
###SDK include path(-I)

  • linux: /usr/local/cuda/samples/common/inc/ (For include file "helper_cuda"); /usr/local/include/opencv/ (Depend on situation)
  • windows: X:/Program Files (x86) /NVIDIA Corporation/CUDA Samples/v6.5/common/inc (For include file "helper_cuda"); X:/Program Files/opencv/vs2010/install/include (Depend on situation)

###Library search path(-L)

  • linux: /usr/local/lib/
  • windows: X:/Program Files/opencv/vs2010/install/x86/cv10/lib (Depend on situation)

###libraries(-l)

  • cublas
  • curand
  • cudadevrt

###GPU compute

  • capability 2.0

###CMake for Linux

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make -j16
  5. cd ../mnist/
  6. sh get_mnist.sh
  7. cd ../cifar-10
  8. sh get_cifar10.sh
  9. cd ../
  10. ./build/CUDA-MCDNN

###Windows

  1. Install vs2010.
  2. Download and install cuda-5.0 or other higher versions
  3. When you create a new project using VS2010, You can find NVIDIA-CUDA project template, create a cuda-project.
  4. View-> Property Pages-> Configuration Properties-> CUDA C/C++ -> Device-> Code Generation-> compute_20,sm_20
  5. View-> Property Pages-> Configuration Properties-> CUDA C/C++ -> Common-> Generate Relocatable Device Code-> Yes(-rdc=true)
  6. View-> Property Pages-> Configuration Properties-> Linker-> Input-> Additional Dependencies-> libraries(-l)
  7. View-> Property Pages-> Configuration Properties-> VC++ Directories-> General-> Library search path(-L)
  8. View-> Property Pages-> Configuration Properties-> VC++ Directories-> General-> Include Directories(-I)

###Linux

  1. Install opencv and cuda
  2. Start the nsight from cuda
  3. Create an 'empty cuda' project and import the clone code
  4. Project->Proerties for add-> Build-> Settings->CUDA->Device linker mode: separate compilation
  5. Project->Proerties for add-> Build-> Settings->CUDA->Generate PTX code 2.0
  6. Project->Proerties for add-> Build-> Settings->CUDA->Generate GPU code 2.0
  7. Project->Proerties for add-> Build-> Settings->Tool Settings->NVCC Compiler->includes: +/usr/local/cuda/samples/common/inc/;
  8. Project->Proerties for add-> Build-> Settings->Tool Settings->NVCC Linkers->Libraries: libraries(-l)
  9. Project->Proerties for add-> Build-> Settings->Tool Settings->NVCC Linkers->Libraries search path(-L): /usr/local/lib/

Config

  1. MNIST
  2. CIFAR-10

Informations

cuda-mcdnn's People

Contributors

tandongxu avatar zhxfl avatar

Watchers

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