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 是填充部分,无需关注。