导入错误:无法从“变压器”(未知位置)导入名称“TFBertModel”

时间:2021-03-29 14:17:43

标签: tensorflow huggingface-transformers

我正在尝试使用带有拥抱面转换器的张量流模型。到目前为止没有成功......任何提示将不胜感激!

Python 3.7.4 (default, Aug 13 2019, 20:35:49)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>> tensorflow.__version__
'2.0.0'
>>> from transformers import TFBertModel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'TFBertModel' from 'transformers' (unknown location)
>>>

0 个答案:

没有答案