Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
62573d89
P
Paddle
项目概览
Crayon鑫
/
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看板
未验证
提交
62573d89
编写于
9月 29, 2019
作者:
H
Huihuang Zheng
提交者:
GitHub
9月 29, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add lod_level parameter to paddle.fluid.data (#20065)
上级
3aa331d9
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
9 addition
and
5 deletion
+9
-5
paddle/fluid/API.spec
paddle/fluid/API.spec
+1
-1
python/paddle/fluid/data.py
python/paddle/fluid/data.py
+8
-4
未找到文件。
paddle/fluid/API.spec
浏览文件 @
62573d89
...
...
@@ -567,7 +567,7 @@ paddle.fluid.contrib.BasicLSTMUnit.sublayers (ArgSpec(args=['self', 'include_sub
paddle.fluid.contrib.BasicLSTMUnit.train (ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
paddle.fluid.contrib.basic_lstm (ArgSpec(args=['input', 'init_hidden', 'init_cell', 'hidden_size', 'num_layers', 'sequence_length', 'dropout_prob', 'bidirectional', 'batch_first', 'param_attr', 'bias_attr', 'gate_activation', 'activation', 'forget_bias', 'dtype', 'name'], varargs=None, keywords=None, defaults=(1, None, 0.0, False, True, None, None, None, None, 1.0, 'float32', 'basic_lstm')), ('document', 'fe4d0c3c55a162b8cfe10b05fabb7ce4'))
paddle.fluid.contrib.ctr_metric_bundle (ArgSpec(args=['input', 'label'], varargs=None, keywords=None, defaults=None), ('document', 'b68d12366896c41065fc3738393da2aa'))
paddle.fluid.data (ArgSpec(args=['name', 'shape', 'dtype'
], varargs=None, keywords=None, defaults=('float32',)), ('document', '4b62e32530615a11b00e2ee52a53488a
'))
paddle.fluid.data (ArgSpec(args=['name', 'shape', 'dtype'
, 'lod_level'], varargs=None, keywords=None, defaults=('float32', 0)), ('document', '28ee6b35836449f44ce53467f0616137
'))
paddle.fluid.dygraph.Layer ('paddle.fluid.dygraph.layers.Layer', ('document', 'a889d5affd734ede273e94d4257163ab'))
paddle.fluid.dygraph.Layer.__init__ (ArgSpec(args=['self', 'name_scope', 'dtype'], varargs=None, keywords=None, defaults=(VarType.FP32,)), ('document', '6adf97f83acf6453d4a6a4b1070f3754'))
paddle.fluid.dygraph.Layer.add_parameter (ArgSpec(args=['self', 'name', 'parameter'], varargs=None, keywords=None, defaults=None), ('document', 'f35ab374c7d5165c3daf3bd64a5a2ec1'))
...
...
python/paddle/fluid/data.py
浏览文件 @
62573d89
...
...
@@ -20,7 +20,7 @@ from .layer_helper import LayerHelper
__all__
=
[
'data'
]
def
data
(
name
,
shape
,
dtype
=
'float32'
):
def
data
(
name
,
shape
,
dtype
=
'float32'
,
lod_level
=
0
):
"""
**Data Layer**
...
...
@@ -42,8 +42,12 @@ def data(name, shape, dtype='float32'):
name (str): The name/alias of the variable, see :ref:`api_guide_Name`
for more details.
shape (list|tuple): List|Tuple of integers declaring the shape.
dtype (np.dtype|VarType|str): The type of the data. Supported dtype:
bool, float16, float32, float64, int8, int16, int32, int64, uint8.
dtype (np.dtype|VarType|str, optional): The type of the data. Supported
dtype: bool, float16, float32, float64, int8, int16, int32, int64,
uint8. Default: float32
lod_level (int, optional): The LoD level of the LoDTensor. Usually users
don't have to set this value. For more details about when and how to
use LoD level, see :ref:`user_guide_lod_tensor` . Default: 0
Returns:
Variable: The global variable that gives access to the data.
...
...
@@ -88,6 +92,6 @@ def data(name, shape, dtype='float32'):
dtype
=
dtype
,
type
=
core
.
VarDesc
.
VarType
.
LOD_TENSOR
,
stop_gradient
=
True
,
lod_level
=
0
,
lod_level
=
lod_level
,
is_data
=
True
,
need_check_feed
=
True
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录