diff --git a/README.md b/README.md index cd1eeb8..0e8feb8 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Use the pip command to install Serving. Perform the following steps: pip install mindspore_serving-{version}-cp37-cp37m-linux_{arch}.whl ``` - > - `{version}` denotes the version of MindSpore Serving. For example, when you are downloading MindSpore Serving 1.1, `{version}` should be 1.1. + > - `{version}` denotes the version of MindSpore Serving. For example, when you are downloading MindSpore Serving 1.1.0, `{version}` should be 1.1.0. > - `{arch}` denotes the system architecture. For example, the Linux system you are using is x86 architecture 64-bit, `{arch}` should be `x86_64`. If the system is ARM architecture 64-bit, then it should be `aarch64`. - Install Serving using the source code. @@ -70,9 +70,9 @@ Use the pip command to install Serving. Perform the following steps: ```shell # Ascend 310 - sh build.sh -e d -V 310 + sh build.sh -e ascend -V 310 # Ascend 910 - sh build.sh -e ascend + sh build.sh -e ascend -V 910 ``` In the preceding information, `build.sh` is the build script file in the `serving` directory. After the build is complete, find the .whl installation package of MindSpore in the `serving/third_party/mindspore/build/package/` directory and install it. diff --git a/README_CN.md b/README_CN.md index 6a6ed30..00dde67 100644 --- a/README_CN.md +++ b/README_CN.md @@ -51,7 +51,7 @@ MindSpore Serving依赖MindSpore训练推理框架,安装完[MindSpore](https: pip install mindspore_serving-{version}-cp37-cp37m-linux_{arch}.whl ``` - > - `{version}`表示MindSpore Serving版本号,例如下载1.1版本MindSpore Serving时,`{version}`应写为1.1。 + > - `{version}`表示MindSpore Serving版本号,例如下载1.1.0版本MindSpore Serving时,`{version}`应写为1.1.0。 > - `{arch}`表示系统架构,例如使用的Linux系统是x86架构64位时,`{arch}`应写为`x86_64`。如果系统是ARM架构64位,则写为`aarch64`。 - 源码编译安装。 @@ -70,9 +70,9 @@ MindSpore Serving依赖MindSpore训练推理框架,安装完[MindSpore](https: ```shell # Ascend 310 - sh build.sh -e d -V 310 + sh build.sh -e ascend -V 310 # Ascend 910 - sh build.sh -e ascend + sh build.sh -e ascend -V 910 ``` 其中,`build.sh`为`serving`目录下的编译脚本文件,编译完后,在`serving/third_party/mindspore/build/package/`目录下找到MindSpore的whl安装包进行安装: diff --git a/example/resnet/client.py b/example/resnet/client.py index d8344c6..dd29e4f 100644 --- a/example/resnet/client.py +++ b/example/resnet/client.py @@ -53,10 +53,15 @@ def run_classify_top5(): """Client for servable resnet50 and method classify_top5""" client = Client("localhost", 5500, "resnet50", "classify_top5") instances = [] - for image in read_images(): - instances.append({"image": image}) + for image in read_images(): # read multi image + instances.append({"image": image}) # input `image` result = client.infer(instances) print(result) + for result_item in result: # result for every image + label = result_item["label"] # result `label` + score = result_item["score"] # result `score` + print("label result", label) + print("score result", score) def run_restful_classify_top1():