Coder Social home page Coder Social logo

2022_neuralnetwork_nvidia's Introduction

2022_NeuralNetwork_Nvidia

병렬 분산 프로젝트로써 C++ 로 코드를 구현하여 CPUGPU에서 시간을 비교

주제: 선형함수로 이루어진 신경망으로 이미지 분류

Model architecture : layer1 + sigmoid + layer2

image

Dataset : MNIST

(본 프로젝트에서는 train data 26880개, validation data 8400개, test data 6720개로 총 42000개 데이터를 사용함)

프로젝트 개요 및 필요성

  • 신경망 학습 시 처리해야할 데이터 양이 많을수록 학습 속도가 느려지고 메모리가 부족
  • 대부분의 딥러닝 코드는 Python으로 구현되지만 Python은 다른 프로그래밍 언어에 비해 속도가 느리기 때문에 실시간 데이터에 대응하기 어려움
    (속도의 문제점을 개선하기 위해 실제 어플리케이션에서는 주로 C/C++를 사용)
  • 실제 사회에서도 GPU 사용 부분에 대한 고민이 필수적

⇒ 이미지 분류를 위한 학습 과정에 많은 연산이 존재
⇒ 이에 대한 고민을 통해 CPU와 GPU에 따른 신경망 Neural Network 학습 속도를 비교함

Flowchart

image

CPU version 실행

$ g++ -o main_cpu main_cpu.cpp
$ ./main_cpu

GPU version 실행

$ nvcc -o main_gpu main_gpu.cpp
$ ./main_gpu

실행 결과

epoch : 100

image

  • 데이터셋을 읽어오는 시간은 CPU, GPU가 각각 약 12초, 1초로 GPU가 약 12배 빠름
  • 하지만 전체 시간은 각각 약 77분, 60분으로 17분 차이

epoch : 200

image

  • 데이터셋을 읽어오는 시간은 CPU, GPU가 각각 약 13초, 1초로 GPU가 약 13배 빠름
  • 하지만 전체 시간은 각각 약 156분, 122분으로 34분 차이

2022/12/16 complete

2022_neuralnetwork_nvidia's People

Contributors

nahyeon00 avatar gleaming0 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.