Skip to content

Commit

Permalink
modify docs with paddlex
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyubo0722 committed Oct 21, 2024
1 parent db52460 commit f92a351
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions docs/hardware_support/dcu/paddlex_tutorial_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ python main.py -c paddlex/configs/image_classification/ResNet50.yaml \

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `resnet50_output/best_model/` 目录下,其中 `inference.pdiparams``inference.pdiparams.info``inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `resnet50_output/best_model/` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./resnet50_output/best_model" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Predict.model_dir="./resnet50_output/best_model/inference" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Global.device="gpu:0"
```

Expand All @@ -126,7 +126,7 @@ python -m pip install paddle2onnx
b. 模型转换

```shell
paddle2onnx --model_dir=./resnet50_output/best_model/ \
paddle2onnx --model_dir=./resnet50_output/best_model/inference \
--model_filename=inference.pdmodel \
--params_filename=inference.pdiparams \
--save_file=./resnet50_output/best_model/inference.onnx \
Expand Down Expand Up @@ -201,12 +201,12 @@ python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `deeplabv3p_output/best_model/` 目录下,其中 `model/inference.pdiparams``model/inference.pdiparams.info``model/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `deeplabv3p_output/best_model/` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./deeplabv3p_output/best_model/model/" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_001.jpg" \
-o Predict.model_dir="./deeplabv3p_output/best_model/inference" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_001.jpg" \
-o Global.device="gpu:0"
```
14 changes: 7 additions & 7 deletions docs/hardware_support/mlu/paddlex_tutorial_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ python main.py -c paddlex/configs/image_classification/ResNet50.yaml \

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `resnet50_output/best_model/` 目录下,其中 `inference.pdiparams``inference.pdiparams.info``inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `resnet50_output/best_model/` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./resnet50_output/best_model" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Predict.model_dir="./resnet50_output/best_model/inference" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Global.device="mlu:0"
```

Expand All @@ -132,7 +132,7 @@ python -m pip install paddle2onnx
b. 模型转换

```shell
paddle2onnx --model_dir=./resnet50_output/best_model/ \
paddle2onnx --model_dir=./resnet50_output/best_model/inference \
--model_filename=inference.pdmodel \
--params_filename=inference.pdiparams \
--save_file=./resnet50_output/best_model/inference.onnx \
Expand Down Expand Up @@ -207,12 +207,12 @@ python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `deeplabv3p_output/best_model/` 目录下,其中 `model/inference.pdiparams``model/inference.pdiparams.info``model/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `deeplabv3p_output/best_model/` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./deeplabv3p_output/best_model/model/" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_001.jpg" \
-o Predict.model_dir="./deeplabv3p_output/best_model/inference/" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_001.jpg" \
-o Global.device="mlu:0"
```
20 changes: 10 additions & 10 deletions docs/hardware_support/npu/paddlex_tutorial_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ python main.py -c paddlex/configs/image_classification/ResNet50.yaml \

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `resnet50_output/best_model/` 目录下,其中 `inference.pdiparams``inference.pdiparams.info``inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `resnet50_output/best_model` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./resnet50_output/best_model" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Predict.model_dir="./resnet50_output/best_model/inference" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Global.device="npu:0"
```

Expand All @@ -136,7 +136,7 @@ python -m pip install paddle2onnx
b. 模型转换

```shell
paddle2onnx --model_dir=./resnet50_output/best_model/ \
paddle2onnx --model_dir=./resnet50_output/best_model/inference \
--model_filename=inference.pdmodel \
--params_filename=inference.pdiparams \
--save_file=./resnet50_output/best_model/inference.onnx \
Expand Down Expand Up @@ -210,13 +210,13 @@ python main.py -c paddlex/configs/object_detection/PP-YOLOE_plus-S.yaml \

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `ppyolo_plus_s_output/best_model/` 目录下,其中 `inference.pdiparams``inference.pdiparams.info``inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `ppyolo_plus_s_output/best_model` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/object_detection/PP-YOLOE_plus-S.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./ppyolo_plus_s_output/best_model" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_object_detection_002.png" \
-o Predict.model_dir="./ppyolo_plus_s_output/best_model/inference" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_object_detection_002.png" \
-o Global.device="npu:0"
```

Expand Down Expand Up @@ -286,12 +286,12 @@ python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `deeplabv3p_output/best_model/` 目录下,其中 `model/inference.pdiparams``model/inference.pdiparams.info``model/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `deeplabv3p_output/best_model/` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/semantic_segmentation/Deeplabv3_Plus-R50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./deeplabv3p_output/best_model/model/" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_001.jpg" \
-o Predict.model_dir="./deeplabv3p_output/best_model/inference" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_semantic_segmentation_001.jpg" \
-o Global.device="npu:0"
```
8 changes: 4 additions & 4 deletions docs/hardware_support/xpu/paddlex_tutorial_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ python main.py -c paddlex/configs/image_classification/ResNet50.yaml \

#### 基于 PaddleInference 推理

训练完成后,最优权重放在 `resnet50_output/best_model/` 目录下,其中 `inference.pdiparams``inference.pdiparams.info``inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理
训练完成后,最优权重放在 `resnet50_output/best_model/` 目录下,其中 `inference/inference.pdiparams``inference/inference.pdiparams.info``inference/inference.pdmodel` 3 个文件为静态图文件,用于推理使用,使用如下命令进行推理

```shell
python main.py -c paddlex/configs/image_classification/ResNet50.yaml \
-o Global.mode=predict \
-o Predict.model_dir="./resnet50_output/best_model" \
-o Predict.input_path="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Predict.model_dir="./resnet50_output/best_model/inference" \
-o Predict.input="https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_image_classification_001.jpg" \
-o Global.device="xpu:0"
```

Expand All @@ -126,7 +126,7 @@ python -m pip install paddle2onnx
b. 模型转换

```shell
paddle2onnx --model_dir=./resnet50_output/best_model/ \
paddle2onnx --model_dir=./resnet50_output/best_model/inference \
--model_filename=inference.pdmodel \
--params_filename=inference.pdiparams \
--save_file=./resnet50_output/best_model/inference.onnx \
Expand Down

0 comments on commit f92a351

Please sign in to comment.