GithubHelp home page GithubHelp logo

mihawb / dnn-lang-comparison Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 43.22 MB

Performance comparison between PyTorch, LibTorch, TensorFlow, cuDNN, and Matlab for image-oriented deep neural networks

MATLAB 0.52% Jupyter Notebook 94.38% Python 2.21% M 0.01% Shell 0.05% Makefile 0.03% Cuda 0.64% C++ 2.10% CMake 0.02% C 0.05%

dnn-lang-comparison's Introduction

dnn-lang-comparison

Language performance comparison in image classification with deep neural networks (fully connected, convolutional, MobileNet, ConvNeXt, among other models) with GPU utilization

Motivation

C++ is obviously and undeniably faster than Python when run on CPU. How do they compare, however, when all the heavy lifting is shifted to GPU? Not to mention there are multiple frameworks for deep neural networks - which one is the fastest, and which one is most tiresome to use? ...Does anyone still use Matlab?
Those, among others, are the questions that were keeping me awake at night, so I started this project in hopes of answering them once and for all.

This project is supposed to be my BSc thesis. I guesstimate it is about half-finished. Until then it just stands as proof that I know how to install nVidia drivers on Linux (and also that I know PyTorch and LibTorch and TensorFlow but the former is way more impressive, isn't it).

Technologies used

All benchmarks were run on GTX 1050 with CUDA 11.8 with drives suitable for Ubuntu

  • Python (3.11)
    • PyTorch
    • TensorFlow
    • Numpy
    • Pandas
    • multiprocessing
  • C++ (14)
    • LibTorch
    • cuDNN
    • CUDA
  • Matlab (R2023a)

Half-way results

Refer to chapters 5 and 6 in the final report.
Attaching some plots below as they draw attention.
training inference TL;DR: PyTorch turned out to be not much slower than TensorFlow (sometimes even faster), but was way nicer to work with - it's very pythonic. I can't recommend it enough.

dnn-lang-comparison's People

Contributors

mihawb avatar

Watchers

Kostas Georgiou avatar  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.