Transformers ‘BertTokenizer‘ object is not callable
Transformers的版本过低,
升级transformers版本 >= 3.3.0
如果在mac上直接pip install transformers会有问题,需要指定transformer版本。即:
直接指定安装 版本的 transformers 即可
pip install transformers==3.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
1
参考网站:
https://github.com/UKPLab/sentence-transformers/issues/221
https://github.com/huggingface/transformers/issues/2831#issuecomment-600141935