Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
94b42944
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
185
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
94b42944
编写于
6月 04, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
https://github.com/PaddlePaddle/Serving
into grpc-client
上级
6f10ff23
7c4482e9
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
13 addition
and
17 deletion
+13
-17
doc/ABTEST_IN_PADDLE_SERVING.md
doc/ABTEST_IN_PADDLE_SERVING.md
+2
-2
doc/ABTEST_IN_PADDLE_SERVING_CN.md
doc/ABTEST_IN_PADDLE_SERVING_CN.md
+2
-2
python/examples/lac/lac_web_service.py
python/examples/lac/lac_web_service.py
+1
-1
python/examples/resnet_v2_50/resnet50_v2_tutorial.py
python/examples/resnet_v2_50/resnet50_v2_tutorial.py
+3
-3
python/examples/unet_for_image_seg/seg_client.py
python/examples/unet_for_image_seg/seg_client.py
+2
-1
python/paddle_serving_app/README_CN.md
python/paddle_serving_app/README_CN.md
+1
-1
python/setup.py.server.in
python/setup.py.server.in
+1
-4
python/setup.py.server_gpu.in
python/setup.py.server_gpu.in
+1
-3
未找到文件。
doc/ABTEST_IN_PADDLE_SERVING.md
浏览文件 @
94b42944
...
...
@@ -21,7 +21,7 @@ The following Python code will process the data `test_data/part-0` and write to
[
//file
]:
#process.py
```
python
from
imdb_
reader
import
IMDBDataset
from
paddle_serving_app.
reader
import
IMDBDataset
imdb_dataset
=
IMDBDataset
()
imdb_dataset
.
load_resource
(
'imdb.vocab'
)
...
...
@@ -78,7 +78,7 @@ with open('processed.data') as f:
feed
=
{
"words"
:
word_ids
}
fetch
=
[
"acc"
,
"cost"
,
"prediction"
]
[
fetch_map
,
tag
]
=
client
.
predict
(
feed
=
feed
,
fetch
=
fetch
,
need_variant_tag
=
True
)
if
(
float
(
fetch_map
[
"prediction"
][
1
])
-
0.5
)
*
(
float
(
label
[
0
])
-
0.5
)
>
0
:
if
(
float
(
fetch_map
[
"prediction"
][
0
][
1
])
-
0.5
)
*
(
float
(
label
[
0
])
-
0.5
)
>
0
:
cnt
[
tag
][
'acc'
]
+=
1
cnt
[
tag
][
'total'
]
+=
1
...
...
doc/ABTEST_IN_PADDLE_SERVING_CN.md
浏览文件 @
94b42944
...
...
@@ -20,7 +20,7 @@ sh get_data.sh
下面Python代码将处理
`test_data/part-0`
的数据,写入
`processed.data`
文件中。
```
python
from
imdb_
reader
import
IMDBDataset
from
paddle_serving_app.
reader
import
IMDBDataset
imdb_dataset
=
IMDBDataset
()
imdb_dataset
.
load_resource
(
'imdb.vocab'
)
...
...
@@ -76,7 +76,7 @@ with open('processed.data') as f:
feed
=
{
"words"
:
word_ids
}
fetch
=
[
"acc"
,
"cost"
,
"prediction"
]
[
fetch_map
,
tag
]
=
client
.
predict
(
feed
=
feed
,
fetch
=
fetch
,
need_variant_tag
=
True
)
if
(
float
(
fetch_map
[
"prediction"
][
1
])
-
0.5
)
*
(
float
(
label
[
0
])
-
0.5
)
>
0
:
if
(
float
(
fetch_map
[
"prediction"
][
0
][
1
])
-
0.5
)
*
(
float
(
label
[
0
])
-
0.5
)
>
0
:
cnt
[
tag
][
'acc'
]
+=
1
cnt
[
tag
][
'total'
]
+=
1
...
...
python/examples/lac/lac_web_service.py
浏览文件 @
94b42944
...
...
@@ -19,7 +19,7 @@ from paddle_serving_app.reader import LACReader
class
LACService
(
WebService
):
def
load_reader
(
self
):
self
.
reader
=
LACReader
(
"lac_dict"
)
self
.
reader
=
LACReader
()
def
preprocess
(
self
,
feed
=
{},
fetch
=
[]):
feed_batch
=
[]
...
...
python/examples/resnet_v2_50/resnet50_v2_tutorial.py
浏览文件 @
94b42944
...
...
@@ -14,7 +14,7 @@
from
paddle_serving_client
import
Client
from
paddle_serving_app.reader
import
Sequential
,
File2Image
,
Resize
,
CenterCrop
from
ap
ddle_serving_app.reader
import
RGB2BGR
,
Transpose
,
Div
,
Normalize
from
pa
ddle_serving_app.reader
import
RGB2BGR
,
Transpose
,
Div
,
Normalize
client
=
Client
()
client
.
load_client_config
(
...
...
@@ -28,5 +28,5 @@ seq = Sequential([
image_file
=
"daisy.jpg"
img
=
seq
(
image_file
)
fetch_map
=
client
.
predict
(
feed
=
{
"image"
:
img
},
fetch
=
[
"
feature_map
"
])
print
(
fetch_map
[
"
feature_map
"
].
reshape
(
-
1
))
fetch_map
=
client
.
predict
(
feed
=
{
"image"
:
img
},
fetch
=
[
"
score
"
])
print
(
fetch_map
[
"
score
"
].
reshape
(
-
1
))
python/examples/unet_for_image_seg/seg_client.py
浏览文件 @
94b42944
...
...
@@ -27,7 +27,8 @@ preprocess = Sequential(
postprocess
=
SegPostprocess
(
2
)
im
=
preprocess
(
"N0060.jpg"
)
filename
=
"N0060.jpg"
im
=
preprocess
(
filename
)
fetch_map
=
client
.
predict
(
feed
=
{
"image"
:
im
},
fetch
=
[
"output"
])
fetch_map
[
"filename"
]
=
filename
postprocess
(
fetch_map
)
python/paddle_serving_app/README_CN.md
浏览文件 @
94b42944
...
...
@@ -28,7 +28,7 @@ paddle_serving_app中内置了11种预训练模型,涵盖了6种预测任务
| 语义理解 | 'ernie' |
| 中文分词 | 'lac' |
| 图像检测 | 'faster_rcnn' |
| 图像分割 | 'unet', 'deeplabv3' |
| 图像分割 | 'unet', 'deeplabv3'
, 'deeplabv3+cityscapes'
|
| 图像分类 | 'resnet_v2_50_imagenet', 'mobilenet_v2_imagenet' |
## 数据预处理API
...
...
python/setup.py.server.in
浏览文件 @
94b42944
...
...
@@ -38,12 +38,9 @@ max_version, mid_version, min_version = python_version()
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'protobuf >= 3.1.0',
'paddle_serving_client', 'flask >= 1.1.1'
'paddle_serving_client', 'flask >= 1.1.1'
, 'paddle_serving_app'
]
if not find_package("paddlepaddle") and not find_package("paddlepaddle-gpu"):
REQUIRED_PACKAGES.append("paddlepaddle")
packages=['paddle_serving_server',
'paddle_serving_server.proto']
...
...
python/setup.py.server_gpu.in
浏览文件 @
94b42944
...
...
@@ -38,11 +38,9 @@ max_version, mid_version, min_version = python_version()
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'protobuf >= 3.1.0',
'paddle_serving_client', 'flask >= 1.1.1'
'paddle_serving_client', 'flask >= 1.1.1'
, 'paddle_serving_app'
]
if not find_package("paddlepaddle") and not find_package("paddlepaddle-gpu"):
REQUIRED_PACKAGES.append("paddlepaddle")
packages=['paddle_serving_server_gpu',
'paddle_serving_server_gpu.proto']
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录