File tree Expand file tree Collapse file tree 2 files changed +25
-7
lines changed Expand file tree Collapse file tree 2 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 4
4
5
5
This repository provides tutorial code in C++ for deep learning researchers to learn PyTorch.
6
6
7
- ## How to Build
7
+ ## Getting Started
8
8
- Install
9
9
```
10
- wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
11
- unzip libtorch-shared-with-deps-latest.zip
10
+ ./scripts.sh install
12
11
```
13
12
- Build
14
13
```
15
- mkdir build
16
- cd build
17
- cmake -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch ..
18
- make
14
+ ./scripts.sh build
19
15
```
20
16
21
17
## Table of Contents
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ function install() {
4
+ wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
5
+ unzip libtorch-shared-with-deps-latest.zip
6
+ rm -rf libtorch-shared-with-deps-latest.zip
7
+ }
8
+
9
+ function build() {
10
+ rm -rf build
11
+ mkdir build
12
+ cd build
13
+ cmake -DCMAKE_PREFIX_PATH=$( dirname $( pwd) ) /libtorch ..
14
+ make
15
+ }
16
+
17
+ if [ $1 = " install" ]
18
+ then
19
+ install
20
+ else
21
+ build
22
+ fi
You can’t perform that action at this time.
0 commit comments