Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
aa560dbb
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
aa560dbb
编写于
11月 11, 2016
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug in sum_cost
上级
ebb153b0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
7 deletion
+13
-7
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+12
-6
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py
.../trainer_config_helpers/tests/configs/test_cost_layers.py
+1
-1
未找到文件。
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
aa560dbb
...
...
@@ -4048,7 +4048,8 @@ def cross_entropy(input, label, name=None, coeff=1.0, layer_attr=None):
.. code-block:: python
cost = cross_entropy(input, label)
cost = cross_entropy(input=input_layer,
label=label_layer)
:param input: The first input layer.
:type input: LayerOutput.
...
...
@@ -4084,7 +4085,8 @@ def cross_entropy_with_selfnorm(input, label, name=None, coeff=1.0,
.. code-block:: python
cost = cross_entropy_with_selfnorm(input, label)
cost = cross_entropy_with_selfnorm(input=input_layer,
label=label_layer)
:param input: The first input layer.
:type input: LayerOutput.
...
...
@@ -4122,7 +4124,7 @@ def sum_cost(input, name=None, layer_attr=None):
.. code-block:: python
cost = sum_cost(input)
cost = sum_cost(input
=input_layer
)
:param input: The first input layer.
:type input: LayerOutput.
...
...
@@ -4133,6 +4135,7 @@ def sum_cost(input, name=None, layer_attr=None):
:return: LayerOutput object.
:rtype: LayerOutput.
"""
assert
isinstance
(
input
,
LayerOutput
)
Layer
(
name
=
name
,
type
=
LayerType
.
SUM_COST
,
inputs
=
[
input
.
name
],
...
...
@@ -4141,7 +4144,8 @@ def sum_cost(input, name=None, layer_attr=None):
return
LayerOutput
(
name
,
LayerType
.
SUM_COST
,
parents
=
[
input
])
parents
=
[
input
],
size
=
1
)
@
wrap_name_default
()
...
...
@@ -4152,7 +4156,8 @@ def huber_cost(input, label, name=None, coeff=1.0, layer_attr=None):
.. code-block:: python
cost = huber_cost(input, label)
cost = huber_cost(input=input_layer,
label=label_layer)
:param input: The first input layer.
:type input: LayerOutput.
...
...
@@ -4188,7 +4193,8 @@ def multi_binary_label_cross_entropy(input, label, name=None, coeff=1.0,
.. code-block:: python
cost = multi_binary_label_cross_entropy(input, label)
cost = multi_binary_label_cross_entropy(input=input_layer,
label=label_layer)
:param input: The first input layer.
:type input: LayerOutput
...
...
python/paddle/trainer_config_helpers/tests/configs/test_cost_layers.py
浏览文件 @
aa560dbb
...
...
@@ -25,4 +25,4 @@ outputs(ctc_layer(input=seq_in, label=labels),
huber_cost
(
input
=
data_layer
(
name
=
'huber_probs'
,
size
=
1
),
label
=
data_layer
(
name
=
'huber_label'
,
size
=
1
)),
multi_binary_label_cross_entropy
(
input
=
probs
,
label
=
xe_label
),
sum_cost
(
hidden
))
sum_cost
(
input
=
hidden
))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录