GitHub - prabhuomkar/pytorch-cpp: C++ Implementation of PyTorch Tutorial for Dee...
source link: https://github.com/prabhuomkar/pytorch-cpp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
This repository provides tutorial code in C++ for deep learning researchers to learn PyTorch.
Python Tutorial: https://github.com/yunjey/pytorch-tutorial
Getting Started
Fork/Clone and Build
git clone https://github.com/prabhuomkar/pytorch-cpp.git
cd pytorch-cpp
Generate build system
cmake -B build #<options>
Note for Windows users:
Libtorch only supports 64bit Windows and an x64 generator needs to be specified. For Visual Studio this can be done by appending-A x64
to the above command.
Some useful options:
Option
Default
Description
-D CUDA_V=(9.2|10.1|none)
none
Download libtorch for a CUDA version (none
= download CPU version).
-D DOWNLOAD_DATASETS=(OFF|ON)
ON
Download all datasets used in the tutorials.
-D CMAKE_PREFIX_PATH=path/to/libtorch/share/cmake/Torch
Skip the downloading of libtorch and use your own local version instead.
Build
cmake --build build
Note for Windows users:
The CMake script downloads the Release version of libtorch, so--config Release
has to be appended to the build command.General Note:
By default all tutorials will be built. If you only want to build one specific tutorial, specify thetarget
parameter for the build command. For example to only build the language model tutorial, append--target language-model
(target name = tutorial foldername with all underscores replaced with hyphens).
Table of Contents
1. Basics
2. Intermediate
- Convolutional Neural Network
- Deep Residual Network
- Recurrent Neural Network
- Bidirectional Recurrent Neural Network
- Language Model (RNN-LM)
3. Advanced
- Generative Adversarial Networks
- Variational Auto-Encoder
- Neural Style Transfer
- Image Captioning (CNN-RNN)
Dependencies
- C++
- PyTorch C++ API
Authors
- Omkar Prabhu - prabhuomkar
- Markus Fleischhacker - mfl28
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK