提交 07fd2913 编写于 作者: J juncaipeng

use jekyll to generate sites

上级 f4443e60
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.lib
*.a
# Executables
*.exe
*.out
*.app
.DS_Store
build/
build_fpga/
.idea/
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
*.cbp
paddle-mobile.cbp
.idea
compile_commands.json
cmake-build-debug/
cmake-build-release/
test/models/
test/images/
# Emacs intermediate files
*~
# CMake building directory
build
# clion building directories
cmake-build-debug
cmake-build-release
# vscode
.vscode
# ios
tools/libomp.a
# ios demo
demo/ios/PaddleMobileDemo/PaddleMobileDemo/googlenet_combine/
demo/ios/PaddleMobileDemo/PaddleMobileDemo/*.jpg
demo/ios/PaddleMobileDemo/PaddleMobileDemo/PaddleMobile/*.a
*.xcuserstate
/tools/quantification/quantify
# metal
Podfile.lock
metal/Pods/
SwiftProtobuf.framework
paddle-mobile.xcworkspace
metal/models/
metal/images/
*.a
metal/paddle-mobile/paddle-mobile/CPU/libpaddle-mobile.a
*.xcuserdatad/
*/xcuserdata/
/venv/
metal/paddle-mobile-demo/paddle-mobile-demo/images
metal/paddle-mobile-demo/paddle-mobile-demo/models
metal/paddle-mobile-demo/paddle-mobile-demo/Resources
metal/paddle-mobile-demo/paddle-mobile-demo/Resources/images
metal/paddle-mobile-demo/paddle-mobile-demo/Resources/models
metal/MobileNetDemo/MobileNetDemo/Resources
#jekyll
_site
.sass-cache
.jekyll-metadata
---
layout: default
---
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.5"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.11.1)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.6)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-feed (0.12.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.3)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.1)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
rouge (3.10.0)
ruby_dep (1.5.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 3.8.5)
jekyll-feed (~> 0.6)
minima (~> 2.0)
tzinfo-data
BUNDLED WITH
2.0.2
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Paddle-Lite
email:
description: Multi-platform high performance deep learning inference engine (『飞桨』多平台高性能深度学习预测引擎) # this means to ignore newlines until "baseurl:"
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username:
github_username: PaddlePaddle
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
# exclude:
# - Gemfile
# - Gemfile.lock
# - node_modules
# - vendor/bundle/
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/
# Paddle Lite 文档
---
layout: post
title: Paddle-Lite 文档
---
## 总体概述
Paddle-Lite 框架是 PaddleMobile 新一代架构,重点支持移动端推理预测,特点**高性能、多硬件、轻量级** 。支持PaddleFluid/TensorFlow/Caffe/ONNX模型的推理部署,目前已经支持 ARM CPU, Mali GPU, Adreno GPU, Huawei NPU 等多种硬件,正在逐步增加 X86 CPU, Nvidia GPU 等多款硬件,相关硬件性能业内领先。
......
# 新增op的方法
---
layout: post
title: 新增op的方法
---
以下以添加argmax为例,详细说明新增op的方法步骤。
......
# Paddle-Lite 开发者文档
---
layout: post
title: Paddle-Lite 开发者文档
---
这篇文档会从开发者角度详细介绍开发 Paddle-Lite 需要的相关信息。
......
# 架构设计
---
layout: post
title: 架构设计
---
Mobile 在这次升级为 Lite 架构, 侧重多硬件、高性能的支持,其主要设计思想如下
......@@ -9,7 +12,7 @@ Mobile 在这次升级为 Lite 架构, 侧重多硬件、高性能的支持,
架构图如下
![Paddle Inference Refactor1.0](./images/architecture.jpg)
![Paddle Inference Refactor1.0](https://user-images.githubusercontent.com/52520497/64949619-26e49580-d8ac-11e9-855a-514feb9b75af.png)
## 编译期和执行期严格隔离设计
......@@ -77,7 +80,7 @@ REGISTER_LITE_KERNEL(
全局做类型推断,当发现 tensor 传递中有类型冲突,采用 type cast 操作,通过插入特定功能 Op 来实现正确的传导
![lite-7](images/lite1.png)
![lite-7](https://user-images.githubusercontent.com/52520497/64949642-395ecf00-d8ac-11e9-8b69-ced1996abc3b.png)
......
# Benchmark
---
layout: post
title: Benchmark 数据
---
可以参考[benchmark_tools](https://github.com/PaddlePaddle/Paddle-Lite/wiki/benchmark_tools),推荐**一键benchmark**
......
---
layout: post
title: Benchmark
---
<!--ts-->
* [Benchmark](#Benchmark)
* [环境准备](#环境准备)
......@@ -9,8 +14,6 @@
* [4. 测试](#4-测试)
<!--te-->
# Benchmark
本文将会介绍,在**Ubuntu:16.04交叉编译环境**下,用安卓手机在终端测试Paddle-Lite的性能,并介绍两种Benchmark方法:
1. **一键Benchmark**:适用于想快速获得常见模型性能的用户,下载预编译好的benchmark可执行文件;
......
---
layout: post
title: C++ Demo
---
<!--ts-->
- [C++ Demo](#c-demo)
......@@ -13,8 +18,6 @@
<!--te-->
# `C++` Demo
## 编译
首先按照[PaddleLite 源码编译](https://github.com/PaddlePaddle/Paddle-Lite/wiki/source_compile)准备交叉编译环境,之后拉取最新[PaddleLite release发布版代码](https://github.com/PaddlePaddle/Paddle-Lite)。下面以Android-ARMv8架构为例,介绍编译过程,并最终在手机上跑通MobilNetv1模型。
......@@ -29,7 +32,7 @@
--android_stl=c++_static \
--build_extra=ON \
full_publish
{% highlight %}
{% endhighlight %}
编译完成后 `./build.lite.android.armv8.gcc/inference_lite_lib.android.armv8/` 文件夹下包含:
......@@ -39,7 +42,7 @@ cxx/lib/libpaddle_api_full_bundled.a
cxx/lib/libpaddle_api_light_bundled.a
demo/cxx/ #其中包括{include Makefile.def mobile_light}
third_party/gflags/
{% highlight %}
{% endhighlight %}
## 准备执行环境
......@@ -53,27 +56,27 @@ third_party/gflags/
运行下面命令,分别创建安卓armv8、armv7架构的模拟器。若需在真机测试,将模拟器换成相应架构的真机环境即可。
```shell
{% highlight shell %}
# android-armv8
adb kill-server
adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done
echo n | avdmanager create avd -f -n paddle-armv8 -k "system-images;android-24;google_apis;arm64-v8a"
echo -ne '\n' | ${ANDROID_HOME}/emulator/emulator -avd paddle-armv8 -noaudio -no-window -gpu off -port 5554 &
sleep 1m
```
{% endhighlight %}
```shell
{% highlight shell %}
# android-armv7
adb kill-server
adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done
echo n | avdmanager create avd -f -n paddle-armv7 -k "system-images;android-24;google_apis;armeabi-v7a"
echo -ne '\n' | ${ANDROID_HOME}/emulator/emulator -avd paddle-armv7 -noaudio -no-window -gpu off -port 5554 &
sleep 1m
```
{% endhighlight %}
## 下载模型并运行示例
```bash
{% highlight bash %}
cd inference_lite_lib.android.armv8/demo/cxx/mobile_full
wget http://paddle-inference-dist.bj.bcebos.com/mobilenet_v1.tar.gz
tar zxvf mobilenet_v1.tar.gz
......@@ -84,23 +87,23 @@ adb -s emulator-5554 push mobilenet_v1 /data/local/tmp/
adb -s emulator-5554 push mobilenetv1_full_api /data/local/tmp/
adb -s emulator-5554 shell chmod +x /data/local/tmp/mobilenetv1_full_api
adb -s emulator-5554 shell "/data/local/tmp/mobilenetv1_full_api --model_dir=/data/local/tmp/mobilenet_v1 --optimized_model_dir=/data/local/tmp/mobilenet_v1.opt"
```
{% endhighlight %}
注:我们也提供了轻量级 API 的 demo,可以执行以下代码运行轻量级 API 示例。
```bash
{% highlight bash %}
cd ../mobile_light
make
adb -s emulator-5554 push mobilenetv1_light_api /data/local/tmp/
adb -s emulator-5554 shell chmod +x /data/local/tmp/mobilenetv1_light_api
adb -s emulator-5554 shell "/data/local/tmp/mobilenetv1_light_api --model_dir=/data/local/tmp/mobilenet_v1.opt --threads=1 "
```
{% endhighlight %}
## Demo 程序运行结果
Demo 运行成功后 ,将在控制台输出预测结果的前10个类别的预测概率:
```bash
{% highlight bash %}
Output dim: 1000
Output[0]: 0.000191
Output[100]: 0.000160
......@@ -112,7 +115,7 @@ Output[600]: 0.004829
Output[700]: 0.001845
Output[800]: 0.000202
Output[900]: 0.000586
```
{% endhighlight %}
## 如何在代码中使用 API
......@@ -127,7 +130,7 @@ Output[900]: 0.000586
#include "paddle_use_kernels.h"
#include "paddle_use_ops.h"
#include "paddle_use_passes.h"
{% highlight %}
{% endhighlight %}
- 通过MobileConfig设置:模型文件位置(model_dir)、线程数(thread)和能耗模式( power mode )。输入数据(input),从 MobileConfig 创建 PaddlePredictor 并执行预测。 (注:Lite还支持从memory直接加载模型,可以通过MobileConfig::set_model_buffer方法实现)
......@@ -176,7 +179,7 @@ predictor->Run();
// 7. Get output
std::unique_ptr<const Tensor> output_tensor(std::move(predictor->GetOutput(0)));
{% highlight %}
{% endhighlight %}
## CxxConfig案例: OCR_model的运行
......@@ -246,7 +249,9 @@ void RunModel() {
for (int i = 0; i < ShapeProduction(init_scores->shape()); ++i) {
data_scores[i] = 0;
}
lod_t lod_s{{0, 1}, {0, 1}};
lod_t lod_s;
lod_s.push_back({0, 1});
lod_s.push_back({0, 1});
init_scores->SetLoD(lod_s);
// 4. Run predictor
......@@ -265,7 +270,7 @@ int main(int argc, char **argv) {
RunModel();
return 0;
}
{% highlight %}
{% endhighlight %}
3. 运行方法:
参考以上代码编译出可执行文件`OCR_DEMO`,模型文件夹为`ocr_attention`。手机以USB调试、文件传输模式连接电脑
......@@ -276,7 +281,7 @@ int main(int argc, char **argv) {
adb push OCR_DEMO data/local/tmp
adb push ocr_attention data/local/tmp
adb shell 'cd data/local/tmp && ./OCR_DEMO --model_dir=./OCR_DEMO'
{% highlight %}
{% endhighlight %}
4. 运行结果
......
---
layout: post
title: C++ API接口使用指南
---
# C++ API接口使用指南
请参考[源码编译](./source_compile)确保 Lite 可以正确编译,下面用Lite的c++接口加载并执行 MobileNetV1 模型为例,详细说明使用方法。
......
# Debug tools
---
layout: post
title: Debug tools
---
**Lite Model Debug Tool** 是用来检查Paddle-Lite框架与Paddle-Fluid框架运行时tensor(包括variable与weight)之间diff信息的基础工具。
......
# 基础须知
---
layout: post
title: 基础须知
---
可以参考 [Paddle 开发者文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/advanced_usage/development/contribute_to_paddle/local_dev_guide.html)
......
# Lite基于fpga的模型预测
---
layout: post
title: Lite基于fpga的模型预测
---
Paddle Lite支持基于arm的fpga zu3/zu5/zu9的模型预测,提供armv8的交叉编译
......
---
layout: post
title: Java Android Demo
---
<!--ts-->
* [Java Android Demo](#java-android-demo)
* [编译](#编译)
......@@ -12,7 +17,6 @@
<!--te-->
# Java Android Demo
本节中,Java demo 完整代码位于 [demo/java](https://github.com/PaddlePaddle/Paddle-Lite/tree/develop/lite/demo/java)
要编译和跑起Android demo 程序 PaddlePredictor,你需要准备:
......
# paddle mobile 代码编译
---
layout: post
title: paddle mobile 代码编译
---
详情可以参考 [mobile/README](https://github.com/PaddlePaddle/Paddle-Lite/tree/develop/mobile)
......
# 模型转化方法
---
layout: post
title: 模型转化方法
---
Lite架构在预测过程中表现出来的高性能得益于其丰富的优化组件,其中包括量化、子图融合、混合调度、Kernel优选等等策略。为了使优化过程更加方便易用,我们提供了**Model Optimize Tool**来自动完成优化步骤,输出一个轻量的、最优的可执行模型。具体使用方法介绍如下:
......
---
layout: post
title: 模型量化
---
<!--ts-->
* [模型量化](#模型量化)
* [一、使用PaddleSlim模型压缩工具获取量化模型](#一使用PaddleSlim模型压缩工具获取量化模型)
......@@ -16,8 +21,6 @@
<!--te-->
# 模型量化
Paddle-Lite支持加载运行[PaddlePaddle框架](https://github.com/PaddlePaddle/Paddle)量化训练产出的模型。本文主要介绍如何基于PaddlePaddle和Paddle-Lite对模型进行端到端的量化训练和推理执行。PaddlePaddle框架中所使用的量化训练原理请猛戳[此处](https://github.com/PaddlePaddle/models/blob/develop/PaddleSlim/docs/tutorial.md#1-quantization-aware-training%E9%87%8F%E5%8C%96%E4%BB%8B%E7%BB%8D)。如果您是初次接触PaddlePaddle框架,建议首先学习[新人入门](https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/beginners_guide/index_cn.html)[使用指南](https://www.paddlepaddle.org.cn/documentation/docs/zh/1.5/user_guides/index_cn.html)
> 备注:本文中所使用的模型量化示例均为MobileNetV1。
......
# Lite支持NPU在线编译
---
layout: post
title: Lite支持NPU在线编译
---
Paddle Lite可以在线分析模型特点,在线编译并生成NPU所需要的IR并实时运行。
是首个支持NPU在线模型的预测框架。
......
# 基于OpenCL的ARM GPU预测
---
layout: post
title: 基于OpenCL的ARM GPU预测
---
Lite支持在Android系统上运行基于OpenCL的程序,目前提供armv8和armv7的交叉编译。
......
---
layout: post
title:
---
1. [./run_test_on_android.md](https://github.com/PaddlePaddle/paddle-mobile/wiki/%E5%A6%82%E4%BD%95%E5%9C%A8Android%E6%89%8B%E6%9C%BA%E4%B8%8A%E8%BF%90%E8%A1%8C%E5%8D%95%E6%B5%8B)
\ No newline at end of file
---
layout: post
title:
---
# Road map
这篇文档会介绍 Paddle-Lite 近期对外的开源版本和计划。
......
---
layout: post
title: 源码编译指南
---
<!--ts-->
* [源码编译指南](#源码编译指南)
* [一、环境准备](#一环境准备)
......@@ -21,8 +26,6 @@
<!--te-->
# 源码编译指南
Paddle-Lite 提供了移动端的一键源码编译脚本 `lite/tools/build.sh`,编译流程如下:
1. 环境准备(选择其一):Docker交叉编译环境、Linux交叉编译环境
......
# 支持op列表
---
layout: post
title: 支持OP列表
---
## Ops
- argmax
......
# 技术特点
---
layout: post
title: 技术特点
---
不同于普通的移动端预测基于类 Caffe 的架构,Lite 架构最早的设计目标来源于 Paddle Server 和 Mobile 两种场景的要求,其中 Server 端需要有完善的图分析和优化能力,而 Mobile 端要求有轻量级部署的能力,两种场景共同的要求是高性能,多硬件支持等。
......
---
layout: post
title: 文档指南
---
Lite是一种轻量级、灵活性强、易于扩展的高性能的深度学习预测框架,它可以支持诸如ARM、OpenCL、NPU等等多种终端,同时拥有强大的图优化及预测加速能力。如果您希望将Lite框架集成到自己的项目中,那么只需要如下几步简单操作即可。
# 一. 准备模型
......
# 通过 X2Paddle 转换模型
---
layout: post
title: 通过 X2Paddle 转换模型
---
[X2Paddle](https://github.com/PaddlePaddle/X2Paddle)支持将Caffe/TensorFlow模型转换为PaddlePaddle模型。目前X2Paddle支持的模型参考[x2paddle_model_zoo](https://github.com/PaddlePaddle/X2Paddle/blob/develop/x2paddle_model_zoo.md)
......
---
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: home
---
1. [如何在Android手机运行单测](https://github.com/PaddlePaddle/paddle-mobile/wiki/%E5%A6%82%E4%BD%95%E5%9C%A8Android%E6%89%8B%E6%9C%BA%E4%B8%8A%E8%BF%90%E8%A1%8C%E5%8D%95%E6%B5%8B)
\ No newline at end of file
运行run_on_android.sh
1. 到tools目录下执行编译脚本 选择对应的平台目标和网络类型(可不选)
```
cd tools
sh build.sh android googlenet
```
2. 到scripts目录下,执行run_on_android.sh,将模型文件及运行单测所需要的二进制文件和paddle-mobile动态库push到手机中,可执行文件在data/local/tmp/bin目录下
```
cd android-debug-script
sh run_on_android.sh (npm) 参数npm选择是否传输模型文件到手机上,第二次可以加上npm参数
```
出现:
...
test-softmax
test-squeezenet
test-transpose-op
test-yolo
**** choose OP or NET to test ****
which to test :
输入想要test的op或net
which to test : test-googlenet
3.显示返回结果
注意:如果需要删除可进入adb shell 手动删除/data/local/tmp下所有文件夹,重新run_on_android.sh
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册