From 78c63d46cde8a33e7180aaba8057a09535ba0c4d Mon Sep 17 00:00:00 2001 From: igfuns <68889682+igfuns@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:14:12 +0800 Subject: [PATCH] Update train.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 输出每一个分类的分数 --- senta/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/senta/train.py b/senta/train.py index f0c4056..714241e 100644 --- a/senta/train.py +++ b/senta/train.py @@ -278,7 +278,7 @@ def predict(self, texts_, aspects=None): else: for text, probs in zip(texts_, batch_result): label = self.label_map[np.argmax(probs)] - results.append((text, label)) + results.append((text, label,probs)) return results def train(self, json_path):