Skip to content

Commit

Permalink
add paddlepaddle documentation (#502)
Browse files Browse the repository at this point in the history
Change-Id: I814eca92dbbfaff84d292c895a0efcc761cbddf3
  • Loading branch information
lanking520 authored Jan 13, 2021
1 parent 5376f9e commit 4b51619
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 109 deletions.
6 changes: 6 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ nav:
- Modules:
- TensorFlow Engine: 'tensorflow/tensorflow-engine/README.md'
- TensorFlow Model Zoo: 'tensorflow/tensorflow-model-zoo/README.md'
- PaddlePaddle:
- Overview: 'paddlepaddle/README.md'
- Load a PaddlePaddle Model: 'jupyter/paddlepaddle/face_mask_detection_paddlepaddle.ipynb'
- Modules:
- PaddlePaddle Engine: 'paddlepaddle/paddlepaddle-engine/README.md'
- TensorFlow Model Zoo: 'paddlepaddle/paddlepaddle-model-zoo/README.md'
- Extensions:
- Android: 'android/README.md'
- AWS S3 support: 'extensions/aws-ai/README.md'
Expand Down
112 changes: 5 additions & 107 deletions paddlepaddle/paddlepaddle-engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ You can pull the PaddlePaddle engine from the central Maven repository by includ
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-engine</artifactId>
<version>0.8.0</version>
<version>0.10.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
```

Besides the `paddlepaddle-engine` library, you may also need to include the PaddlePaddle native library in your project.
All current provided PaddlePaddle native libraries come from PaddlePaddle pip package:

- https://pypi.org/project/paddlepaddle/#files
- https://pypi.org/project/paddlepaddle-gpu/#files

Choose a native library based on your platform and needs:

Expand All @@ -52,110 +48,12 @@ It will automatically determine the appropriate jars for your system based on th
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-auto</artifactId>
<version>1.8.5</version>
<scope>runtime</scope>
</dependency>
```

### macOS
For macOS, you can use the following library:

- ai.djl.paddlepaddle:paddlepaddle-native-mkl:1.8.5:osx-x86_64

This package takes advantage of the Intel MKL library to boost performance.

```xml
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-mkl</artifactId>
<classifier>osx-x86_64</classifier>
<version>1.8.5</version>
<scope>runtime</scope>
</dependency>
```

### Linux
For the Linux platform, you can choose between CPU, GPU. If you have Nvidia [CUDA](https://en.wikipedia.org/wiki/CUDA)
installed on your GPU machine, you can use one of the following library:

#### Linux GPU

- ai.djl.paddlepaddle:paddlepaddle-native-cu102:1.8.5:linux-x86_64 - CUDA 10.2
- ai.djl.paddlepaddle:paddlepaddle-native-cu101:1.8.5:linux-x86_64 - CUDA 10.1

```xml
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-cu102</artifactId>
<classifier>linux-x86_64</classifier>
<version>1.8.5</version>
<scope>runtime</scope>
</dependency>
```

```xml
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-cu101</artifactId>
<classifier>linux-x86_64</classifier>
<version>1.8.5</version>
<scope>runtime</scope>
</dependency>
```

#### Linux CPU

- ai.djl.paddlepaddle:paddlepaddle-native-cpu:1.8.5:linux-x86_64

```xml
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-cpu</artifactId>
<classifier>linux-x86_64</classifier>
<version>2.0.0-SNAPSHOT</version>
<scope>runtime</scope>
<version>1.8.5</version>
</dependency>
```

### Windows

For the Windows platform, you can use CPU package.

#### Windows GPU

- ai.djl.paddlepaddle:paddlepaddle-native-cu102:1.8.5:win-x86_64 - CUDA 10.2
- ai.djl.paddlepaddle:paddlepaddle-native-cu101:1.8.5:win-x86_64 - CUDA 10.1

```xml
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-cu102</artifactId>
<classifier>win-x86_64</classifier>
<version>1.8.5</version>
<scope>runtime</scope>
</dependency>
```
### Mac/Windows/Linux standalone native jarss

```xml
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-cu101</artifactId>
<classifier>win-x86_64</classifier>
<version>1.8.5</version>
<scope>runtime</scope>
</dependency>
```

### Windows CPU

- ai.djl.paddlepaddle:paddlepaddle-native-cpu:1.8.5:win-x86_64

```xml
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-native-cpu</artifactId>
<classifier>win-x86_64</classifier>
<scope>runtime</scope>
<version>1.8.5</version>
</dependency>
```
Currently, PaddlePaddle 2.0.0 is still under development, we will update here once it is released. You may use the auto jar
to have 2.0.0-rc1 releases for testing.
4 changes: 2 additions & 2 deletions paddlepaddle/paddlepaddle-model-zoo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ from the central Maven repository by including the following dependency:
<dependency>
<groupId>ai.djl.paddlepaddle</groupId>
<artifactId>paddlepaddle-model-zoo</artifactId>
<version>0.8.0</version>
<version>0.10.0-SNAPSHOT</version>
</dependency>
```

Expand All @@ -36,7 +36,7 @@ The PaddlePaddle model zoo contains Computer Vision (CV) models.

* CV
* Image Classification
* Object Detection
* FaceMask Detection

### How to find a pre-trained model in model zoo

Expand Down
31 changes: 31 additions & 0 deletions paddlepaddle/paddlepaddle-native/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# DJL - PaddlePaddle native library

This module publishes the PaddlePaddle native libraries to Maven central repository.

## Prerequisite
You need to install `cmake` and C++ compiler on your machine in order to build

### Linux

```
apt install cmake g++
```

### Windows

Visual Studio 2017/2019 with C++ development toolkit is required to compile.

## CPU Build

Use the following task to build PaddlePaddle JNI library:

### Mac/Linux

```
./gradlew compileJNI
```

### Windows

```
gradlew compileJNI
```

This task will send a Jni library copy to `paddlepaddle-engine` model to test locally.

0 comments on commit 4b51619

Please sign in to comment.