From 32f7176de3f20e53ae2116a2364e8413d8f31469 Mon Sep 17 00:00:00 2001 From: caoying03 Date: Wed, 17 May 2017 15:54:27 +0800 Subject: [PATCH] remove chunk evaluator. --- demo/semantic_role_labeling/api_train_v2.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/demo/semantic_role_labeling/api_train_v2.py b/demo/semantic_role_labeling/api_train_v2.py index c323046407..f9c1fa80da 100644 --- a/demo/semantic_role_labeling/api_train_v2.py +++ b/demo/semantic_role_labeling/api_train_v2.py @@ -6,9 +6,6 @@ import paddle.v2.dataset.conll05 as conll05 import paddle.v2.evaluator as evaluator import paddle.v2 as paddle -logger = logging.getLogger('paddle') -logger.setLevel(logging.WARN) - word_dict, verb_dict, label_dict = conll05.get_dict() word_dict_len = len(word_dict) label_dict_len = len(label_dict) @@ -155,11 +152,6 @@ def main(is_predict=False): label=target, param_attr=paddle.attr.Param(name='crfw')) evaluator.sum(input=crf_dec) - evaluator.chunk( - input=crf_dec, - label=target, - chunk_scheme="IOB", - num_chunk_types=label_dict_len / 2) # create parameters parameters = paddle.parameters.create(crf_cost) @@ -250,4 +242,4 @@ def main(is_predict=False): if __name__ == '__main__': - main(is_predict=True) + main(is_predict=False) -- GitLab