Skip to content

Commit

Permalink
Merge pull request PaddlePaddle#60 from jiweibo/windows_cpu_demo
Browse files Browse the repository at this point in the history
add windows cpu doc.
  • Loading branch information
jiweibo committed Dec 11, 2020
2 parents 6e8877c + 1e9df70 commit 9efa922
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion c++/x86_linux_demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
project(cpp_inference_demo CXX C)
option(WITH_MKL "Compile demo with MKL/OpenBlas support, default use MKL." ON)
option(WITH_GPU "Compile demo with GPU/CPU, default use CPU." OFF)
option(WITH_STATIC_LIB "Compile demo with static/shared library, default use static." ON)
option(WITH_STATIC_LIB "Compile demo with static/shared library, default use static." OFF)
option(USE_TENSORRT "Compile demo with TensorRT." OFF)

if(NOT WITH_STATIC_LIB)
Expand Down
Binary file added docs/demo_tutorial/images/win_x86_cpu_cmake_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo_tutorial/images/win_x86_cpu_cmake_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo_tutorial/images/win_x86_cpu_cmake_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo_tutorial/images/win_x86_cpu_vs_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo_tutorial/images/win_x86_cpu_vs_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo_tutorial/images/win_x86_cpu_vs_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/demo_tutorial/images/win_x86_cpu_vs_4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/demo_tutorial/x86_linux_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ C++示例代码在[链接](https://github.com/PaddlePaddle/Paddle-Inference-Demo

#### 1.1.1 准备预测库

请参考[推理库下载文档](ToSet)下载Paddle C++预测库。
请参考[推理库下载文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/05_inference_deployment/inference/build_and_install_lib_cn.html)下载Paddle C++预测库。

#### 1.1.2 准备预测模型

Expand Down Expand Up @@ -79,7 +79,7 @@ auto output_names = predictor->GetOutputNames();
auto output_t = predictor->GetOutputHandle(output_names[0]);
std::vector<int> output_shape = output_t->shape();
int out_num = std::accumulate(output_shape.begin(), output_shape.end(), 1,
std::multiplies<int>());
std::multiplies<int>());
std::vector<float> out_data;
out_data.resize(out_num);
output_t->CopyToCpu(out_data.data());
Expand Down Expand Up @@ -208,6 +208,6 @@ wget https://paddle-inference-dist.bj.bcebos.com/inference_demo/python/resnet50/

```
python model_test.py --model_dir mobilenetv1_fp32 --img_path ILSVRC2012_val_00000247.jpeg
``
```

运行结束后,程序会将模型结果打印到屏幕,说明运行成功。
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Welcome to Paddle-Inference's documentation!
:name: sec-demo

demo_tutorial/x86_linux_demo
demo_tutorial/x86_windows_demo

.. toctree::
:maxdepth: 1
Expand Down

0 comments on commit 9efa922

Please sign in to comment.