Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
352f5fab
Mace
项目概览
Xiaomi
/
Mace
通知
106
Star
40
Fork
27
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
352f5fab
编写于
7月 05, 2018
作者:
L
liutuo
提交者:
liuqi
7月 09, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
cd5270e7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
42 addition
and
41 deletion
+42
-41
docs/index.rst
docs/index.rst
+0
-1
docs/installation/env_requirement.rst
docs/installation/env_requirement.rst
+3
-3
docs/installation/manual_setup.rst
docs/installation/manual_setup.rst
+6
-6
docs/installation/using_docker.rst
docs/installation/using_docker.rst
+4
-3
docs/user_guide/advanced_usage.rst
docs/user_guide/advanced_usage.rst
+11
-11
docs/user_guide/basic_usage.rst
docs/user_guide/basic_usage.rst
+18
-17
未找到文件。
docs/index.rst
浏览文件 @
352f5fab
...
...
@@ -25,7 +25,6 @@ The main documentation is organized into the following sections:
:caption: User guide
:name: sec-user
user_guide/installation
user_guide/basic_usage
user_guide/advanced_usage
user_guide/op_lists
...
...
docs/installation/env_requirement.rst
浏览文件 @
352f5fab
Environment Requirement
=======================
=======================
=
MACE requires the following dependencies:
Necessary Dependencies:
-----------------------
-----------------------
-
.. list-table::
:header-rows: 1
...
...
@@ -51,7 +51,7 @@ Necessary Dependencies:
``export ANDROID_NDK_HOME=/path/to/ndk`` to specify ANDROID_NDK_HOME
Optional Dependencies:
---------------------
---------------------
--
.. list-table::
:header-rows: 1
...
...
docs/installation/manual_setup.rst
浏览文件 @
352f5fab
Manual setup
============
============
=
The setup steps are based on ``Ubuntu``. And dependencies to install can refer to :doc:`env_requirement`.
Install Necessary Dependencies
------------------------------
------------------------------
-
Install Bazel
~~~~~~~~~~~~~
~~~~~~~~~~~~~
~
Recommend bazel with version larger than ``0.13.0`` (Refer to `Bazel documentation <https://docs.bazel.build/versions/master/install.html>`__).
...
...
@@ -23,7 +23,7 @@ Recommend bazel with version larger than ``0.13.0`` (Refer to `Bazel documentati
rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
Install NDK
~~~~~~~~~~~
~~~~~~~~~~~
~
Recommend NDK with version r15c or r16 (Refer to `NDK installation guide <https://developer.android.com/ndk/guides/setup#install>`__).
...
...
@@ -43,7 +43,7 @@ Recommend NDK with version r15c or r16 (Refer to `NDK installation guide <https:
export PATH=${PATH}:${ANDROID_NDK_HOME}
Install extra tools
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
~
.. code:: sh
...
...
@@ -61,7 +61,7 @@ Install extra tools
filelock
Install Optional Dependencies
-----------------------------
-----------------------------
-
.. code:: sh
...
...
docs/installation/using_docker.rst
浏览文件 @
352f5fab
Using docker
============
============
=
Pull or Build docker image
--------------------------
--------------------------
-
MACE provides docker images with necessary dependencies installed and also Dockerfiles for images building,
you can pull the existing ones directly or build them from the Dockerfiles.
...
...
@@ -33,8 +33,9 @@ In most cases, the ``lite edition`` image can satify developer's basic needs.
We will show steps with lite edition later.
Using the image
---------------
---------------
--
Create container with the following command
...
...
docs/user_guide/advanced_usage.rst
浏览文件 @
352f5fab
Advanced usage
==============
==============
=
This part contains the full usage of MACE.
How to build
-------------
-------------------
-------------
=========
===========
=========
Overview
=========
===========
=========
As mentioned in the previous part, a model deployment file defines a case of model deployment.
The whole building process is loading a deployment file, converting models, building MACE and packing generated files.
================
====
================
Deployment file
================
====
================
One deployment file will generate one library normally, but if more than one ABIs are specified,
...
...
@@ -111,9 +111,9 @@ in one deployment file.
sha256sum path/to/your/file
=========
===========
=========
Building
=========
===========
=========
* **Build static or shared library**
...
...
@@ -246,12 +246,12 @@ Use ``-h`` to get detailed help.
How to deploy
--------------
------------------
--------------
=========
===============
=========
Overview
=========
===============
=========
``build`` command will generate the static/shared library, model files and
header files and package them as
...
...
docs/user_guide/basic_usage.rst
浏览文件 @
352f5fab
Basic usage
============
=
============
Build and run an example model
-------------------------------
-
-------------------------------
At first, make sure the environment has been set up correctly already (refer to :doc:`
installation
`).
At first, make sure the environment has been set up correctly already (refer to :doc:`
../installation/env_requirement
`).
The followings are instructions about how to quickly build and run a provided model in *MACE Model Zoo*.
...
...
@@ -67,13 +67,13 @@ Here we use the mobilenet-v2 model as an example.
Build your own model
---------------------
-------
---------------------
This part will show you how to use your pre-trained model in MACE.
======================
============
======================
1. Prepare your model
======================
============
======================
Mace now supports models from Tensorflow and Caffe(more frameworks will be supported).
...
...
@@ -121,9 +121,9 @@ Mace now supports models from Tensorflow and Caffe(more frameworks will be suppo
$CAFFE_ROOT/build/tools/upgrade_net_proto_binary MODEL.caffemodel MODEL.new.caffemodel
===========================================
=
===========================================
2. Create a deployment file for your model
===========================================
=
===========================================
When converting a model or building a library, MACE needs to read a YAML file which is called model deployment file here.
...
...
@@ -145,9 +145,9 @@ Modify one of them and use it for your own case.
More details about model deployment file, please refer to :doc:`advanced_usage`.
======================
================
======================
3. Convert your model
======================
================
======================
When the deployment file is ready for your model, you can use MACE converter tool to convert your model(s).
...
...
@@ -167,9 +167,9 @@ The generated model files will be stored in ``build/${library_name}/model`` fold
Please set ``build_type:proto`` in your deployment file before converting.
The usage of ``build_type:code`` will be demonstrated in :doc:`advanced_usage`.
=============================
=========
=============================
4. Build MACE into a library
=============================
=========
=============================
MACE can be built into either a static or a shared library (which is
specified by ``linkshared`` in YAML model deployment file).
...
...
@@ -190,11 +190,12 @@ The above command will generate library files in the ``build/${library_name}/lib
2. If you want to build a library for a specific soc, please refer to :doc:`advanced_usage`.
==================
====================
==================
5. Run your model
==================
====================
==================
With the converted model, *.so or *.a library and header files, you can use the following commands to run and validate your model.
With the converted model, the static or shared library and header files, you can use the following commands
to run and validate your model.
* **run**
...
...
@@ -219,9 +220,9 @@ With the converted model, *.so or *.a library and header files, you can use the
python tools/converter.py benchmark --config=path/to/your/model_deployment_file.yml
=======================================
=================
=======================================
6. Deploy your model into applications
=======================================
=================
=======================================
In the converting and building steps, you've got the static/shared library, model files and
header files. All of these generated files have been packaged into
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录