提交 352f5fab 编写于 作者: L liutuo 提交者: liuqi

update

上级 cd5270e7
......@@ -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
......
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
......
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
......
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
......
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
......
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.
先完成此消息的编辑!
想要评论请 注册