Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
e8c46169
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
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看板
未验证
提交
e8c46169
编写于
7月 28, 2021
作者:
T
TeslaZhao
提交者:
GitHub
7月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into develop
上级
2710f973
b2e1a9b5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
4 deletion
+3
-4
python/paddle_serving_client/client.py
python/paddle_serving_client/client.py
+1
-2
python/paddle_serving_server/web_service.py
python/paddle_serving_server/web_service.py
+2
-2
未找到文件。
python/paddle_serving_client/client.py
浏览文件 @
e8c46169
...
@@ -326,8 +326,8 @@ class Client(object):
...
@@ -326,8 +326,8 @@ class Client(object):
string_feed_names
=
[]
string_feed_names
=
[]
string_lod_slot_batch
=
[]
string_lod_slot_batch
=
[]
string_shape
=
[]
string_shape
=
[]
fetch_names
=
[]
fetch_names
=
[]
counter
=
0
counter
=
0
# batch_size must be 1, cause batch is already in Tensor.
# batch_size must be 1, cause batch is already in Tensor.
batch_size
=
len
(
feed_batch
)
batch_size
=
len
(
feed_batch
)
...
@@ -339,7 +339,6 @@ class Client(object):
...
@@ -339,7 +339,6 @@ class Client(object):
if
len
(
fetch_names
)
==
0
:
if
len
(
fetch_names
)
==
0
:
raise
ValueError
(
raise
ValueError
(
"Fetch names should not be empty or out of saved fetch list."
)
"Fetch names should not be empty or out of saved fetch list."
)
return
{}
for
i
,
feed_i
in
enumerate
(
feed_batch
):
for
i
,
feed_i
in
enumerate
(
feed_batch
):
int_slot
=
[]
int_slot
=
[]
...
...
python/paddle_serving_server/web_service.py
浏览文件 @
e8c46169
...
@@ -92,7 +92,7 @@ class WebService(object):
...
@@ -92,7 +92,7 @@ class WebService(object):
f
=
open
(
file_path_list
[
0
],
'r'
)
f
=
open
(
file_path_list
[
0
],
'r'
)
model_conf
=
google
.
protobuf
.
text_format
.
Merge
(
model_conf
=
google
.
protobuf
.
text_format
.
Merge
(
str
(
f
.
read
()),
model_conf
)
str
(
f
.
read
()),
model_conf
)
self
.
feed_vars
=
{
var
.
name
:
var
for
var
in
model_conf
.
feed_var
}
self
.
feed_vars
=
{
var
.
alias_
name
:
var
for
var
in
model_conf
.
feed_var
}
if
len
(
file_path_list
)
>
1
:
if
len
(
file_path_list
)
>
1
:
model_conf
=
m_config
.
GeneralModelConfig
()
model_conf
=
m_config
.
GeneralModelConfig
()
...
@@ -100,7 +100,7 @@ class WebService(object):
...
@@ -100,7 +100,7 @@ class WebService(object):
model_conf
=
google
.
protobuf
.
text_format
.
Merge
(
model_conf
=
google
.
protobuf
.
text_format
.
Merge
(
str
(
f
.
read
()),
model_conf
)
str
(
f
.
read
()),
model_conf
)
self
.
fetch_vars
=
{
var
.
name
:
var
for
var
in
model_conf
.
fetch_var
}
self
.
fetch_vars
=
{
var
.
alias_
name
:
var
for
var
in
model_conf
.
fetch_var
}
if
client_config_path
==
None
:
if
client_config_path
==
None
:
self
.
client_config_path
=
file_path_list
self
.
client_config_path
=
file_path_list
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录