diff --git a/docs/installation/env_requirement.rst b/docs/installation/env_requirement.rst index c482712418b1e0afb92970ce0a55bb7226e82ed9..6946a524e22f3284f585f46f9e71fa9604f84176 100644 --- a/docs/installation/env_requirement.rst +++ b/docs/installation/env_requirement.rst @@ -30,6 +30,9 @@ Required dependencies * - sh - pip install -I sh==1.12.14 - 1.12.14 + * - Numpy + - pip install -I numpy==1.14.0 + - Required by model validation Optional dependencies --------------------- @@ -52,15 +55,12 @@ Optional dependencies * - Docker - `docker installation guide `__ - Required by docker mode for Caffe model - * - Numpy - - pip install -I numpy==1.14.0 - - Required by model validation * - Scipy - pip install -I scipy==1.0.0 - Required by model validation * - FileLock - pip install -I filelock==3.0.0 - - Required by Android run + - Required by run on Android .. note:: diff --git a/docs/user_guide/advanced_usage.rst b/docs/user_guide/advanced_usage.rst index 1f536bff07e3a18866f26a7761b90a312be22887..141cedc42ce6976f3f8c73ae4ef480499468e360 100644 --- a/docs/user_guide/advanced_usage.rst +++ b/docs/user_guide/advanced_usage.rst @@ -160,6 +160,17 @@ There are two common advanced use cases:    ├── mobilenet-v1.a    └── mobilenet_v1.data + # model_graph_format: code + # model_data_format: code + + builds + ├── include + │   └── mace + │   └── public + │   ├── mace_engine_factory.h + │   └── mobilenet_v1.h + └── model +    └── mobilenet-v1.a * **3. Deployment** * Link `libmace.a` and `${library_name}.a` to your target. @@ -182,7 +193,7 @@ There are two common advanced use cases: // Create Engine from compiled code create_engine_status = CreateMaceEngineFromCode(model_name.c_str(), - nullptr, + model_data_file, // empty string if model_data_format is code input_names, output_names, device_type, diff --git a/tools/converter.py b/tools/converter.py index c13d7e835a33a62738a0b380c099ca32eb4eb36f..e234f4a64550091c98cc7985da8269942f078624 100644 --- a/tools/converter.py +++ b/tools/converter.py @@ -13,7 +13,6 @@ # limitations under the License. import argparse -import filelock import glob import hashlib import os diff --git a/tools/sh_commands.py b/tools/sh_commands.py index a3617224eb7b433ac253280d03864bf46edc02dd..1331a1e075eafb22e2ac936fa81a9730c78cfd44 100644 --- a/tools/sh_commands.py +++ b/tools/sh_commands.py @@ -13,7 +13,6 @@ # limitations under the License. import falcon_cli -import filelock import glob import logging import numpy as np @@ -69,10 +68,12 @@ def device_lock_path(serialno): def device_lock(serialno, timeout=3600): + import filelock return filelock.FileLock(device_lock_path(serialno), timeout=timeout) def is_device_locked(serialno): + import filelock try: with device_lock(serialno, timeout=0.000001): return False