Mac 模型保存地址
.cache/
1.载入词表
tokenizer = BertTokenizer.from_pretrained("./localpath/")
除了你自己建的文件夹名外,后面一定要加个/,才能保证该方法找到你的vocab.txt
2.载入模型
bert = BertModel.from_pretrained("./localpath")
Mac 模型保存地址
.cache/
1.载入词表
tokenizer = BertTokenizer.from_pretrained("./localpath/")
除了你自己建的文件夹名外,后面一定要加个/,才能保证该方法找到你的vocab.txt
2.载入模型
bert = BertModel.from_pretrained("./localpath")