赞
踩
关于BERT和MLM:
Here I would like to introduce Masked language Modeling(MLM). Before the introduction, there are some basic ideas you need to know about BERT and MLM:
BERT + MLM 的思想在于:
在数据输入BERT训练前,使用MLM遮盖部分数据,然后让BERT填补这部分数据;MLM所遮盖的部分,可以是随机性遮盖一定比例的。
(mask some tokens before training in BERT; let BERT fill the missing part of the text)
The whole processes:
from transformers import BertTokenizer, BertForMaskedLM
import torch
tokenizer = BertTokenizer.from_pretrained(
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。