Search code examples
pythonpytorchroberta-language-model

Issue with loading the Roberta-base model


I am trying to use the Roberta-base model using AutoTokenizer.from_pretrained('roberta-base') but I get the following error:

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'

I have tried to install tensorflow but still the same error. Any idea what is going on?


Solution

  • You need to install with GPU, try this:

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

    See here for more details.