From ae1b5f7375822395179e751d8ee0da131b0a56a6 Mon Sep 17 00:00:00 2001 From: wa007 <2864436211@qq.com> Date: Wed, 7 Apr 2021 11:00:51 +0800 Subject: [PATCH] Is there a bug in there? Is there a bug in there? --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 66c8a7b..be642cb 100644 --- a/utils.py +++ b/utils.py @@ -144,7 +144,7 @@ def _sample_mask(seg, mask_alpha, mask_beta, end = beg + 1 cnt_ngram = 1 while end < seg_len: - if _is_start_piece([seg[beg]]): + if _is_start_piece([seg[end]]): cnt_ngram += 1 if cnt_ngram > n: break