【问题标题】:Issue with loading the Roberta-base model加载基于 Roberta 的模型时出现问题
【发布时间】:2022-01-13 18:44:31
【问题描述】:

我正在尝试使用 AutoTokenizer.from_pretrained('roberta-base') 的 Roberta-base 模型,但出现以下错误:

RuntimeError: Failed to import transformers.modeling_tf_utils because of the following error (look up to see its traceback):
No module named 'tensorflow.python.keras.engine.keras_tensor'

我尝试安装 tensorflow 但仍然出现同样的错误。知道发生了什么吗?

【问题讨论】:

    标签: python pytorch roberta-language-model


    【解决方案1】:

    你需要安装GPU,试试这个:

    pip install --ignore-installed --upgrade tensorflow-gpu
    

    更多详情请见here

    【讨论】:

    • 效果很好,谢谢
    • 效果很好,谢谢
    猜你喜欢
    • 2017-03-01
    • 2021-05-05
    • 2021-01-31
    • 1970-01-01
    • 2020-03-09
    • 1970-01-01
    • 2022-06-28
    • 2022-07-14
    • 2022-06-23
    相关资源
    最近更新 更多