Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
52358613
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
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看板
提交
52358613
编写于
12月 15, 2016
作者:
Y
Yu Yang
提交者:
GitHub
12月 15, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #909 from pengli09/add-label-to-chunk_evaluator
Add an extra parameter label to chunk_evaluator.
上级
438a4ec6
59ae6612
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
10 deletion
+15
-10
demo/sequence_tagging/linear_crf.py
demo/sequence_tagging/linear_crf.py
+2
-1
demo/sequence_tagging/rnn_crf.py
demo/sequence_tagging/rnn_crf.py
+2
-1
python/paddle/trainer_config_helpers/evaluators.py
python/paddle/trainer_config_helpers/evaluators.py
+11
-8
未找到文件。
demo/sequence_tagging/linear_crf.py
浏览文件 @
52358613
...
...
@@ -74,7 +74,8 @@ sum_evaluator(
chunk_evaluator
(
name
=
"chunk_f1"
,
input
=
[
crf_decoding
,
chunk
],
input
=
crf_decoding
,
label
=
chunk
,
chunk_scheme
=
"IOB"
,
num_chunk_types
=
11
,
)
...
...
demo/sequence_tagging/rnn_crf.py
浏览文件 @
52358613
...
...
@@ -112,7 +112,8 @@ sum_evaluator(
chunk_evaluator
(
name
=
"chunk_f1"
,
input
=
[
crf_decoding
,
chunk
],
input
=
crf_decoding
,
label
=
chunk
,
chunk_scheme
=
"IOB"
,
num_chunk_types
=
11
,
)
...
...
python/paddle/trainer_config_helpers/evaluators.py
浏览文件 @
52358613
...
...
@@ -327,9 +327,10 @@ def ctc_error_evaluator(
@
wrap_name_default
()
def
chunk_evaluator
(
input
,
name
=
None
,
chunk_scheme
=
None
,
num_chunk_types
=
None
,
):
label
,
chunk_scheme
,
num_chunk_types
,
name
=
None
,
):
"""
Chunk evaluator is used to evaluate segment labelling accuracy for a
sequence. It calculates the chunk detection F1 score.
...
...
@@ -363,22 +364,24 @@ def chunk_evaluator(
.. code-block:: python
eval = chunk_evaluator(input)
eval = chunk_evaluator(input
, label, chunk_scheme, num_chunk_types
)
:param input: The input layers.
:type input: LayerOutput
:param
name: The Evaluator name, it is not necessary
.
:type
name: basename|None
:param
label: An input layer containing the ground truth label
.
:type
label: LayerOutput
:param chunk_scheme: The labelling schemes support 4 types. It is one of
"IOB", "IOE", "IOBES", "plain".This Evaluator must
contain this chunk_scheme.
"IOB", "IOE", "IOBES", "plain". It is required.
:type chunk_scheme: basestring
:param num_chunk_types: number of chunk types other than "other"
:param name: The Evaluator name, it is optional.
:type name: basename|None
"""
evaluator_base
(
name
=
name
,
type
=
"chunk"
,
input
=
input
,
label
=
label
,
chunk_scheme
=
chunk_scheme
,
num_chunk_types
=
num_chunk_types
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录