diff --git a/paddlepalm/reader/cls.py b/paddlepalm/reader/cls.py index c13cbfe9806e1d9988ba80055570ce0cb6916434..dd5e7f3b88b980410de13a23d2b10717b88ea6b3 100644 --- a/paddlepalm/reader/cls.py +++ b/paddlepalm/reader/cls.py @@ -66,7 +66,7 @@ class Reader(reader): "position_ids": [[-1, -1], 'int64'], "segment_ids": [[-1, -1], 'int64'], "input_mask": [[-1, -1, 1], 'float32'], - "label_ids": [[-1, 1], 'int64'], + "label_ids": [[-1], 'int64'], "task_ids": [[-1, -1], 'int64'] } else: diff --git a/paddlepalm/reader/match.py b/paddlepalm/reader/match.py index 2dcdc12c4afac4e004777ff378a76bae027963b4..d6be0f82a4bac255341f3c58a14430c078314bf1 100644 --- a/paddlepalm/reader/match.py +++ b/paddlepalm/reader/match.py @@ -64,7 +64,7 @@ class Reader(reader): "position_ids": [[-1, -1], 'int64'], "segment_ids": [[-1, -1], 'int64'], "input_mask": [[-1, -1, 1], 'float32'], - "label_ids": [[-1, 1], 'int64'], + "label_ids": [[-1], 'int64'], "task_ids": [[-1, -1], 'int64'] } else: diff --git a/paddlepalm/reader/mlm.py b/paddlepalm/reader/mlm.py index 5230844d052c6725cf747f448c723bd22a801dd9..e4dff3477f3ffd56864bcbaed439f7bd03716377 100644 --- a/paddlepalm/reader/mlm.py +++ b/paddlepalm/reader/mlm.py @@ -65,8 +65,8 @@ class Reader(reader): "segment_ids": [[-1, -1], 'int64'], "input_mask": [[-1, -1, 1], 'float32'], "task_ids": [[-1, -1], 'int64'], - "mask_label": [[-1, 1], 'int64'], - "mask_pos": [[-1, 1], 'int64'], + "mask_label": [[-1], 'int64'], + "mask_pos": [[-1], 'int64'], } diff --git a/paddlepalm/task_paradigm/cls.py b/paddlepalm/task_paradigm/cls.py index ed40709902f0a47784c51c7cd8dddb057422345c..b590b6fe7ffa68d3e5c4fde3c7a2922df6d257d7 100644 --- a/paddlepalm/task_paradigm/cls.py +++ b/paddlepalm/task_paradigm/cls.py @@ -43,7 +43,7 @@ class TaskParadigm(task_paradigm): @property def inputs_attrs(self): if self._is_training: - reader = {"label_ids": [[-1, 1], 'int64']} + reader = {"label_ids": [[-1], 'int64']} else: reader = {} bb = {"sentence_embedding": [[-1, self._hidden_size], 'float32']} diff --git a/paddlepalm/task_paradigm/match.py b/paddlepalm/task_paradigm/match.py index a286cbfc5dee00a6198d9190c93ac7d792f536b2..d42c64a7d32cdf3aa3d8fb32ed7890c6f41119c5 100644 --- a/paddlepalm/task_paradigm/match.py +++ b/paddlepalm/task_paradigm/match.py @@ -44,7 +44,7 @@ class TaskParadigm(task_paradigm): @property def inputs_attrs(self): if self._is_training: - reader = {"label_ids": [[-1, 1], 'int64']} + reader = {"label_ids": [[-1], 'int64']} else: reader = {} bb = {"sentence_pair_embedding": [[-1, self._hidden_size], 'float32']} diff --git a/paddlepalm/task_paradigm/mlm.py b/paddlepalm/task_paradigm/mlm.py index b77483a31995dcf1eb405f98eba9fcc0f2d17f1d..81dda86aac431ee6ae42621d27c10247c29b01ac 100644 --- a/paddlepalm/task_paradigm/mlm.py +++ b/paddlepalm/task_paradigm/mlm.py @@ -33,8 +33,8 @@ class TaskParadigm(task_paradigm): @property def inputs_attrs(self): reader = { - "mask_label": [[-1, 1], 'int64'], - "mask_pos": [[-1, 1], 'int64']} + "mask_label": [[-1], 'int64'], + "mask_pos": [[-1], 'int64']} if not self._is_training: del reader['mask_label'] del reader['batchsize_x_seqlen']