Coder Social home page Coder Social logo

hijkzzz / cuda-neural-network Goto Github PK

View Code? Open in Web Editor NEW
164.0 164.0 38.0 1.83 MB

Convolutional Neural Network with CUDA (MNIST 99.23%)

CMake 0.87% Cuda 2.40% Python 11.28% C++ 82.53% Shell 0.98% Makefile 0.45% M4 0.59% C 0.41% Starlark 0.50%
cnn cpp cuda mnist neural-network

cuda-neural-network's Introduction

🔭 I'm a Coding Lover.

Jian Hu's GitHub stats

cuda-neural-network's People

Contributors

hijkzzz avatar qixuxiang avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

cuda-neural-network's Issues

nvcc fatal : redefinition of argument 'optimize'

I got an issue when I compile the project using make , here is the output:

➜ build make

Scanning dependencies of target cu

[ 5%] Building CUDA object CMakeFiles/cu.dir/src/cuda/blas.cu.o

nvcc fatal : redefinition of argument 'optimize'

CMakeFiles/cu.dir/build.make:62: recipe for target 'CMakeFiles/cu.dir/src/cuda/blas.cu.o' failed

make[2]: *** [CMakeFiles/cu.dir/src/cuda/blas.cu.o] Error 1

CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cu.dir/all' failed

make[1]: *** [CMakeFiles/cu.dir/all] Error 2

Makefile:83: recipe for target 'all' failed

make: *** [all] Error 2

It seems like a nvcc compiling issue using optimizing arguments like '-O3' or '-O2', but I just can not figure out. Can someone help me? Thx!

loss: nan

The loss shows nan when I train the code, is there any solution?

卷积的反向传播

src/cuda/conv.cu 的第120行,计算height_col的公式是“int height_col = height + 2 * pad_h - kernel_h / stride_h + 1;”
为什么不是 “int height_col = (height + 2 * pad_h - kernel_h )/ stride_h + 1;” 是不是忘写了个括号呀

build error: redefinition of argument 'optimize'

Here is what cmake found:

-- The CUDA compiler identification is NVIDIA 10.2.89
-- The CXX compiler identification is GNU 8.4.0
-- Check for working CUDA compiler: /opt/cuda/bin/nvcc
-- Check for working CUDA compiler: /opt/cuda/bin/nvcc - works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- Check for working CXX compiler: /opt/cuda/bin/g++
-- Check for working CXX compiler: /opt/cuda/bin/g++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /opt/cuda (found version "10.2") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/test/cuda-neural-network/build

I'm getting the following error:

Scanning dependencies of target cu
[  6%] Building CUDA object CMakeFiles/cu.dir/src/cuda/blas.cu.o
nvcc fatal   : redefinition of argument 'optimize'
make[2]: *** [CMakeFiles/cu.dir/build.make:83: CMakeFiles/cu.dir/src/cuda/blas.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: CMakeFiles/cu.dir/all] Error 2
make: *** [Makefile:104: all] Error 2

Any ideas?

loss -nan

the file can be compiled but the loss is constantly -nan, can you plz show me a clue on where the dataset should be placed?

Any plans for save model and real image inference?

Thanks for your awesome code share!

Recently I compare some cuda and cpp mnist train tools from github, this repo is almost the fastest and most accurate one. With functions of saving model and real 28*28 image inference, it is not only a great research tool but also a fast and accurate app.

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.