Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
e0aa1d65
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
e0aa1d65
编写于
5月 18, 2021
作者:
T
Thunderbrook
提交者:
GitHub
5月 18, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
unit double (#32908)
上级
79415712
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
4 deletion
+18
-4
python/paddle/fluid/incubate/fleet/parameter_server/pslib/node.py
...addle/fluid/incubate/fleet/parameter_server/pslib/node.py
+16
-3
python/paddle/fluid/incubate/fleet/parameter_server/pslib/optimizer_factory.py
...ncubate/fleet/parameter_server/pslib/optimizer_factory.py
+2
-1
未找到文件。
python/paddle/fluid/incubate/fleet/parameter_server/pslib/node.py
浏览文件 @
e0aa1d65
...
...
@@ -123,7 +123,7 @@ class DownpourServer(Server):
support_accessor_class
=
[
'DownpourFeatureValueAccessor'
,
'DownpourCtrAccessor'
,
'DownpourSparseValueAccessor'
,
'DownpourCtrDoubleAccessor'
,
'DownpourUnitAccessor'
'DownpourUnitAccessor'
,
'DownpourDoubleUnitAccessor'
]
if
strategy
.
get
(
'sparse_accessor_class'
)
is
not
None
:
accessor_class
=
strategy
.
get
(
'sparse_accessor_class'
)
...
...
@@ -254,7 +254,7 @@ class DownpourServer(Server):
table2
.
param
=
2
table2
.
converter
=
converter
table2
.
deconverter
=
deconverter
elif
accessor_class
==
'DownpourUnitAccessor'
:
elif
accessor_class
==
'DownpourUnitAccessor'
or
accessor_class
==
'DownpourDoubleUnitAccessor'
:
self
.
add_sparse_table_common_config
(
table
,
strategy
)
self
.
add_sparse_optimizer
(
table
.
accessor
.
embed_sgd_param
,
strategy
,
"embed_"
)
...
...
@@ -380,7 +380,7 @@ class DownpourServer(Server):
table
.
accessor
.
fea_dim
=
fea_dim
def
add_sparse_optimizer
(
self
,
sgd
,
strategy
,
prefix
):
optimizer_name
=
strategy
.
get
(
prefix
+
"sparse_optimizer"
,
"ada
m
"
)
optimizer_name
=
strategy
.
get
(
prefix
+
"sparse_optimizer"
,
"ada
grad
"
)
sgd
.
name
=
optimizer_name
if
optimizer_name
==
"naive"
:
sgd
.
naive
.
learning_rate
=
\
...
...
@@ -394,6 +394,19 @@ class DownpourServer(Server):
strategy
.
get
(
prefix
+
'sparse_learning_rate'
,
0.05
)
sgd
.
adagrad
.
initial_range
=
\
strategy
.
get
(
prefix
+
'sparse_initial_range'
,
1e-4
)
if
prefix
==
"embed_"
:
sgd
.
adagrad
.
initial_range
=
0
sgd
.
adagrad
.
initial_g2sum
=
strategy
.
get
(
prefix
+
'sparse_initial_g2sum'
,
3
)
bounds
=
strategy
.
get
(
prefix
+
'sparse_weight_bounds'
,
[
-
10
,
10
])
sgd
.
adagrad
.
weight_bounds
.
extend
(
bounds
)
elif
optimizer_name
==
"std_adagrad"
:
sgd
.
adagrad
.
learning_rate
=
\
strategy
.
get
(
prefix
+
'sparse_learning_rate'
,
0.05
)
sgd
.
adagrad
.
initial_range
=
\
strategy
.
get
(
prefix
+
'sparse_initial_range'
,
1e-4
)
if
prefix
==
"embed_"
:
sgd
.
adagrad
.
initial_range
=
0
sgd
.
adagrad
.
initial_g2sum
=
strategy
.
get
(
prefix
+
'sparse_initial_g2sum'
,
3
)
bounds
=
strategy
.
get
(
prefix
+
'sparse_weight_bounds'
,
[
-
10
,
10
])
...
...
python/paddle/fluid/incubate/fleet/parameter_server/pslib/optimizer_factory.py
浏览文件 @
e0aa1d65
...
...
@@ -319,6 +319,7 @@ class DistributedAdam(DistributedOptimizerImplBase):
# user do not have to set it in config_fleet
if
accessor
==
"DownpourFeatureValueAccessor"
\
or
accessor
==
"DownpourCtrAccessor"
\
or
accessor
==
"DownpourDoubleUnitAccessor"
\
or
accessor
==
"DownpourUnitAccessor"
:
if
st
.
get
(
"sparse_embedx_dim"
)
is
not
None
\
and
st
[
"sparse_embedx_dim"
]
!=
emb_to_size
[
key
]
-
3
:
...
...
@@ -534,7 +535,7 @@ class DistributedAdam(DistributedOptimizerImplBase):
if
server
.
_server
.
downpour_server_param
.
downpour_table_param
[
0
].
accessor
.
accessor_class
in
[
"DownpourCtrAccessor"
,
"DownpourCtrDoubleAccessor"
,
"DownpourUnitAccessor"
"DownpourUnitAccessor"
,
"DownpourDoubleUnitAccessor"
]:
opt_info
[
"dump_slot"
]
=
True
elif
server
.
_server
.
downpour_server_param
.
downpour_table_param
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录