From 0c5d321e4da0e2ed4b968b0daee8685855b202f1 Mon Sep 17 00:00:00 2001 From: yzeng Date: Mon, 26 May 2025 17:48:13 -0400 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=AA=E5=85=B3?= =?UTF-8?q?=E4=BA=8E=E5=8F=A5=E5=AD=903=E6=8E=A9=E7=A0=81=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E7=9A=84=E5=8F=AF=E8=83=BD=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cn-Book/2.处理文本数据.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cn-Book/2.处理文本数据.md b/cn-Book/2.处理文本数据.md index adb8051..d43fb4d 100644 --- a/cn-Book/2.处理文本数据.md +++ b/cn-Book/2.处理文本数据.md @@ -466,7 +466,7 @@ print(tokenizer.decode(tokenizer.encode(text))) > > + 句子1(掩码矩阵):`[1, 1, 1, 1, 0]` > + 句子2(掩码矩阵):`[1, 1, 1, 1, 0]` -> + 句子3(掩码矩阵):`[1, 1, 1, 0, 0]` +> + 句子3(掩码矩阵):`[1, 1, 1, 1, 0]` > > 在这个掩码矩阵中,`1` 表示模型会关注的 token,`0` 表示模型会忽略的填充 token。通过这种掩码矩阵,模型知道在计算和训练时哪些 token 是有效内容,哪些 token 是填充部分,无需关注。