Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
67bd4cd6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
67bd4cd6
编写于
11月 22, 2017
作者:
C
chengduo
提交者:
GitHub
11月 22, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5802 from chengduoZH/reorder_parameter
reorder parameters of layer
上级
f04c97a0
7177c276
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
16 addition
and
16 deletion
+16
-16
python/paddle/v2/fluid/layers.py
python/paddle/v2/fluid/layers.py
+16
-16
未找到文件。
python/paddle/v2/fluid/layers.py
浏览文件 @
67bd4cd6
...
...
@@ -17,13 +17,13 @@ __all__ = [
def
fc
(
input
,
size
,
num_flatten_dims
=
1
,
param_attr
=
None
,
param_initializer
=
None
,
bias_attr
=
None
,
bias_initializer
=
None
,
name
=
None
,
act
=
None
,
n
um_flatten_dims
=
1
,
n
ame
=
None
,
main_program
=
None
,
startup_program
=
None
):
"""
...
...
@@ -32,15 +32,15 @@ def fc(input,
Args:
input: The input tensor to the function
size: The size of the layer
num_flatten_dims: Number of columns in input
param_attr: The parameters/weights to the FC Layer
param_initializer: Initializer used for the weight/parameter.
If None, XavierInitializer() is used
bias_attr: The bias parameter for the FC layer
bias_initializer: Initializer used for the bias.
If None, then ConstantInitializer() is used
name: Name/alias of the function
act: Activation to be applied to the output of FC layer
n
um_flatten_dims: Number of columns in input
n
ame: Name/alias of the function
main_program: Name of the main program that calls this
startup_program: Name of the startup program
...
...
@@ -111,9 +111,9 @@ def fc(input,
def
embedding
(
input
,
size
,
data_type
=
'float32'
,
is_sparse
=
False
,
param_attr
=
None
,
data_type
=
'float32'
,
main_program
=
None
,
startup_program
=
None
):
"""
...
...
@@ -122,9 +122,9 @@ def embedding(input,
Args:
input: The input to the function
size: The size of the layer
data_type: The type of data : float32, float_16, int etc
is_sparse: A flag that decleares whether the input is sparse
param_attr: Parameters for this layer
data_type: The type of data : float32, float_16, int etc
main_program: Name of the main program that calls this
startup_program: Name of the startup program
...
...
@@ -152,7 +152,6 @@ def embedding(input,
# TODO(qijun): expose H0 and C0
def
dynamic_lstm
(
input
,
size
,
data_type
=
'float32'
,
param_attr
=
None
,
bias_attr
=
None
,
use_peepholes
=
True
,
...
...
@@ -160,6 +159,7 @@ def dynamic_lstm(input,
gate_activation
=
'sigmoid'
,
cell_activation
=
'tanh'
,
candidate_activation
=
'tanh'
,
data_type
=
'float32'
,
main_program
=
None
,
startup_program
=
None
):
helper
=
LayerHelper
(
'lstm'
,
**
locals
())
...
...
@@ -200,9 +200,9 @@ def dynamic_lstm(input,
def
data
(
name
,
shape
,
append_batch_size
=
True
,
data_type
=
'float32'
,
type
=
core
.
VarDesc
.
VarType
.
LOD_TENSOR
,
append_batch_size
=
True
,
main_program
=
None
,
startup_program
=
None
,
stop_gradient
=
True
):
...
...
@@ -212,9 +212,9 @@ def data(name,
Args:
name: The name/alias of the function
shape: Tuple declaring the shape.
append_batch_size: Whether or not to append the data as a batch.
data_type: The type of data : float32, float_16, int etc
type: The output type. By default it is LOD_TENSOR.
append_batch_size: Whether or not to append the data as a batch.
main_program: Name of the main program that calls this
startup_program: Name of the startup program
stop_gradient: A boolean that mentions whether gradient should flow.
...
...
@@ -600,12 +600,12 @@ def sequence_conv(input,
num_filters
,
filter_size
=
3
,
filter_stride
=
1
,
act
=
None
,
padding
=
None
,
bias_attr
=
None
,
bias_initializer
=
None
,
param_attr
=
None
,
param_initializer
=
None
,
act
=
None
,
main_program
=
None
,
startup_program
=
None
):
"""
...
...
@@ -658,16 +658,16 @@ def sequence_conv(input,
def
conv2d
(
input
,
num_filters
,
name
=
None
,
filter_size
=
[
1
,
1
],
act
=
None
,
groups
=
None
,
filter_size
,
stride
=
[
1
,
1
],
padding
=
None
,
bias_attr
=
None
,
bias_initializer
=
None
,
groups
=
None
,
param_attr
=
None
,
param_initializer
=
None
,
bias_attr
=
None
,
bias_initializer
=
None
,
act
=
None
,
name
=
None
,
main_program
=
None
,
startup_program
=
None
):
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录