Code Monkey home page Code Monkey logo

deepnet's Introduction

DeepNet

In this project, I implement a deep learning toolbox (DeepNet) including RBM, DBN, Multi-modal DBN with Python, in which the majority of matrix operations are carried on GPU by using the Cudamat to speed up the calculation process. There are some examples to show how to use this package.

This project make some references to the matlab code in https://github.com/dmus/API-Project. However, in comparison with the matlab code, our version improves the performance 25 times (test on the Mnist data).

Requirements

Usage

To use the toolbox, following steps are needed.

(1) compile the Cudamat library :

cd (directory to DeepNet)
cd DeepNet/RBM/cudamat/
Make (note : correct path to gcc-4.6 or below version compiler should be given in Makefile)

(2) change directory to RBM/, then set the DEEPNET_PATH variable in set_env.sh file to the RBM/ path in your computer

(3) run command :

source set_env.sh

(4) We provide some demo programs in this toolbox.

RBM and DBN demos

For RBM and DBN demos, we use Mnist data, which has been contained in our toolbox. To run these demos, you should first uncompress the data in example/.

cd example/
tar -xzvf mnist_data.tar.gz
python rbmDemo.py
or
python DBNdemo.py

For help information, run

python rbmDemo.py --help
or
python DBNdemo.py --help

Multi-modal DBN demo

For multi-modal demo, we employ SHREC 2007 feature data to show the usage. How the data is generated has been elaborated in our paper "Multi-modal Feature Fusion for 3D Shape Recognition and Retrieval". To run this demo, change directory to multi-modal_demo/ and run

python multiModalityDemo.py

For help information, run

python multiModalityDemo.py --help

Platform

This code is only tested on Linux mint-16 64-bit.

deepnet's People

Contributors

shaoguangcheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deepnet's Issues

problem while executing makefile

Hello, I am getting this error while running the makefile in cudamat folder
Please help

Microsoft (R) Program Maintenance Utility Version 14.00.24245.0
Copyright (C) Microsoft Corporation. All rights reserved.

    nvcc -O --compiler-bindir=/usr/bin/gcc-4.6 --ptxas-options=-v --compiler-options '-fPIC' -o libcudamat.so --shared cudamat.cu cudamat_kernels.cu -lcublas

nvcc fatal : '--compiler-bindir=/usr/bin/gcc-4.6': expected a number
NMAKE : fatal error U1077: '"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.EXE"' : return code '0x1'
Stop.

Thank you

something wrong

when i run the following command in terminal
python multimodalityDemo.py
there is something wrong?
can some one help me to fix it?

no CUDA-capable device is detected
Traceback (most recent call last):
File "multiModalityDemo.py", line 169, in
testMultiModalityDBN(opts)
File "multiModalityDemo.py", line 70, in testMultiModalityDBN
trainLabel, nHid, nJoint, isSaveModel=True, modelName = opts.model, **p)
File "/home/amax/Public/ShijieGeng/weisun/youtubeAd/multiDBM/DeepNet/DeepNet/multiModalityDBNFit.py", line 33, in multiModalityDBNFit
isSingleDBN = False, **kwargs[string])
File "/home/amax/Public/ShijieGeng/weisun/youtubeAd/multiDBM/DeepNet/DeepNet/DBNFit.py", line 23, in DBNFit
model_ = rbm.rbm(X, numHid[0], **kwargs[string])
File "/home/amax/Public/ShijieGeng/weisun/youtubeAd/multiDBM/DeepNet/DeepNet/rbm.py", line 88, in rbm
cm.cublas_init()
File "/home/amax/Public/ShijieGeng/weisun/youtubeAd/multiDBM/DeepNet/DeepNet/cudamat/cudamat.py", line 1720, in cublas_init
CUDAMatrix.ones = CUDAMatrix(np.ones((MAX_ONES, 1), dtype=np.float32, order = 'F'))
File "/home/amax/Public/ShijieGeng/weisun/youtubeAd/multiDBM/DeepNet/DeepNet/cudamat/cudamat.py", line 195, in init
raise generate_exception(err_code)
cudamat.cudamat.CUDAMatException: CUBLAS error.

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.