Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
PaddleRec
提交
61b1fd00
P
PaddleRec
项目概览
BaiXuePrincess
/
PaddleRec
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleRec
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
61b1fd00
编写于
3月 05, 2020
作者:
X
xiexionghang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
depend on paddle with bcloud
上级
72c56faf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
12 deletion
+13
-12
kagle/kagle_layer.py
kagle/kagle_layer.py
+6
-5
kagle/kagle_model.py
kagle/kagle_model.py
+7
-7
未找到文件。
kagle/kagle_layer.py
浏览文件 @
61b1fd00
...
@@ -66,7 +66,7 @@ class EmbeddingInputLayer(Layer):
...
@@ -66,7 +66,7 @@ class EmbeddingInputLayer(Layer):
emb
=
fluid
.
layers
.
continuous_value_model
(
emb
,
show_clk
,
self
.
_cvm
)
emb
=
fluid
.
layers
.
continuous_value_model
(
emb
,
show_clk
,
self
.
_cvm
)
self
.
_emb_layers
.
append
(
emb
)
self
.
_emb_layers
.
append
(
emb
)
output
=
fluid
.
layers
.
concat
(
input
=
self
.
_emb_layers
,
axis
=
1
,
name
=
self
.
_name
)
output
=
fluid
.
layers
.
concat
(
input
=
self
.
_emb_layers
,
axis
=
1
,
name
=
self
.
_name
)
return
output
,
{
'data_var'
:
data_var
}
return
output
,
{
'data_var'
:
data_var
}
class
LabelInputLayer
(
Layer
):
class
LabelInputLayer
(
Layer
):
...
@@ -167,7 +167,8 @@ class NormalizetionLayer(Layer):
...
@@ -167,7 +167,8 @@ class NormalizetionLayer(Layer):
bn
=
fluid
.
layers
.
data_norm
(
input
=
input_layer
,
name
=
self
.
_name
,
epsilon
=
1e-4
,
param_attr
=
{
bn
=
fluid
.
layers
.
data_norm
(
input
=
input_layer
,
name
=
self
.
_name
,
epsilon
=
1e-4
,
param_attr
=
{
"batch_size"
:
1e4
,
"batch_sum_default"
:
0.0
,
"batch_square"
:
1e4
})
"batch_size"
:
1e4
,
"batch_sum_default"
:
0.0
,
"batch_square"
:
1e4
})
inference_param
=
[
self
.
_name
+
'.batch_size'
,
self
.
_name
+
'.batch_sum'
,
self
.
_name
+
'.batch_square_sum'
]
inference_param
=
[
self
.
_name
+
'.batch_size'
,
self
.
_name
+
'.batch_sum'
,
self
.
_name
+
'.batch_square_sum'
]
return
bn
,
{
'inference_param'
:
{
'name'
:
'summary'
,
'params'
:
inference_param
,
'table_id'
:
summary_layer
.
get
(
'table_id'
,
-
1
)}}
return
bn
,
{
'inference_param'
:
{
'name'
:
'summary'
,
\
'params'
:
inference_param
,
'table_id'
:
summary_layer
.
get
(
'table_id'
,
-
1
)}}
class
NeuralLayer
(
Layer
):
class
NeuralLayer
(
Layer
):
...
@@ -205,8 +206,9 @@ class NeuralLayer(Layer):
...
@@ -205,8 +206,9 @@ class NeuralLayer(Layer):
fluid
.
ParamAttr
(
learning_rate
=
1.0
,
\
fluid
.
ParamAttr
(
learning_rate
=
1.0
,
\
initializer
=
fluid
.
initializer
.
NormalInitializer
(
loc
=
0.0
,
scale
=
scale
)),
initializer
=
fluid
.
initializer
.
NormalInitializer
(
loc
=
0.0
,
scale
=
scale
)),
bias_attr
=
bias
)
bias_attr
=
bias
)
inference_param
=
[
self
.
_name
+
'.w_0'
,
self
.
_name
+
'.b_0'
]
inference_param
=
[
self
.
_name
+
'.w_0'
,
self
.
_name
+
'.b_0'
]
return
fc
,
{
'inference_param'
:
{
'name'
:
'param'
,
'params'
:
inference_param
,
'table_id'
:
param_layer
.
get
(
'table_id'
,
-
1
)}}
return
fc
,
{
'inference_param'
:
{
'name'
:
'param'
,
'params'
:
inference_param
,
\
'table_id'
:
param_layer
.
get
(
'table_id'
,
-
1
)}}
class
SigmoidLossLayer
(
Layer
):
class
SigmoidLossLayer
(
Layer
):
...
@@ -239,7 +241,6 @@ class SigmoidLossLayer(Layer):
...
@@ -239,7 +241,6 @@ class SigmoidLossLayer(Layer):
}
}
}
}
def
generate_fluid
(
self
,
param
):
def
generate_fluid
(
self
,
param
):
"""R
"""R
"""
"""
...
...
kagle/kagle_model.py
浏览文件 @
61b1fd00
...
@@ -10,13 +10,13 @@ import paddle.fluid as fluid
...
@@ -10,13 +10,13 @@ import paddle.fluid as fluid
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
def
create
(
config
):
def
create
(
config
):
"""
"""
Create a model instance by config
Create a model instance by config
Args:
Args:
config(dict) : desc model type and net
config(dict) : desc model type and net
Return:
Return:
Model Instance
Model Instance
"""
"""
model
=
None
model
=
None
if
config
[
'mode'
]
==
'fluid'
:
if
config
[
'mode'
]
==
'fluid'
:
model
=
FluidModel
(
config
)
model
=
FluidModel
(
config
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录