Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
bff4cec3
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看板
提交
bff4cec3
编写于
6月 14, 2018
作者:
Y
Yibing Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Format lod_reset's doc
上级
fbbac505
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
20 addition
and
19 deletion
+20
-19
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+20
-19
未找到文件。
python/paddle/fluid/layers/nn.py
浏览文件 @
bff4cec3
...
...
@@ -3411,8 +3411,8 @@ def softmax_with_cross_entropy(logits, label, soft_label=False):
def
smooth_l1
(
x
,
y
,
inside_weight
=
None
,
outside_weight
=
None
,
sigma
=
None
):
"""
This layer computes the smooth L1 loss for Variable
`x` and
`y`.
It takes the first dimension of
`x` and
`y` as batch size.
This layer computes the smooth L1 loss for Variable
:attr:`x` and :attr:
`y`.
It takes the first dimension of
:attr:`x` and :attr:
`y` as batch size.
For each instance, it computes the smooth L1 loss element by element first
and then sums all the losses. So the shape of ouput Variable is
[batch_size, 1].
...
...
@@ -3421,15 +3421,15 @@ def smooth_l1(x, y, inside_weight=None, outside_weight=None, sigma=None):
x (Variable): A tensor with rank at least 2. The input value of smooth
L1 loss op with shape [batch_size, dim1, ..., dimN].
y (Variable): A tensor with rank at least 2. The target value of smooth
L1 loss op with same shape as `x`.
L1 loss op with same shape as
:attr:
`x`.
inside_weight (Variable|None): A tensor with rank at least 2. This
input is optional and should have same shape with
`x`. If provided,
the result of (`x - y`) will be multiplied by this tensor element by
element.
input is optional and should have same shape with
:attr:`x`. If
provided, the result of (:attr:`x` - :attr:`y`) will be multiplied
by this tensor element by
element.
outside_weight (Variable|None): A tensor with rank at least 2. This
input is optional and should have same shape with
x. If provided,
the out smooth L1 loss will be multiplied by this tensor element
by element.
input is optional and should have same shape with
:attr:`x`. If
provided, the out smooth L1 loss will be multiplied by this tensor
element
by element.
sigma (float|None): Hyper parameter of smooth L1 loss layer. A float
scalar with default value 1.0.
...
...
@@ -3634,12 +3634,12 @@ def reshape(x, shape, actual_shape=None, act=None, inplace=True, name=None):
def
lod_reset
(
x
,
y
=
None
,
target_lod
=
None
):
"""
LoD Reset Operator. Set LoD of **x** to a new one specified by **y**
or
**target_lod**. When **y** provided, **y.lod** would be considered as target
LoD first, otherwise **y.data** would be considered as target LoD. If **y**
is not provided, target LoD should be specified by **target_lod**.
If target LoD is specified by **Y.data** or **target_lod**, only one level
LoD is supported.
Set LoD of :attr:`x` to a new one specified by :attr:`y`
or
:attr:`target_lod`. When :attr:`y` provided, :attr:`y.lod` would be
considered as target LoD first, otherwise :attr:`y.data` would be
considered as target LoD. If :attr:`y` is not provided, target LoD should
be specified by :attr:`target_lod`. If target LoD is specified by
:attr:`Y.data` or :attr:`target_lod`, only one level
LoD is supported.
.. code-block:: text
...
...
@@ -3692,15 +3692,16 @@ def lod_reset(x, y=None, target_lod=None):
Args:
x (Variable): Input variable which could be a Tensor or LodTensor.
y (Variable|None): If provided, output's LoD would be derived from y.
y (Variable|None): If provided, output's LoD would be derived
from :attr:`y`.
target_lod (list|tuple|None): One level LoD which should be considered
as target LoD when
y
not provided.
as target LoD when
:attr:`y`
not provided.
Returns:
Variable: Output variable with LoD specified by this
operato
r.
Variable: Output variable with LoD specified by this
laye
r.
Raises:
ValueError: If
y and target_lod
are both None.
ValueError: If
:attr:`y` and :attr:`target_lod`
are both None.
Examples:
.. code-block:: python
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录