-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: module 'tensorflow' has no attribute 'Tensor' when using documentation code (Tokenizer.batch_decode) #21135
Comments
Hi, @gaurav-95 |
transformers-cli env gives me this.
Could you elaborate on what system info do you need? No dedicated gpu in machine. My virtualenvironment is called "cronenv" Update: I was able to run the same code on a google colab notebook, seems like a problem with my environment. |
Hi, @gaurav-95
Since you are not getting it could you please check your transformers installation? (just run |
Thanks for getting back and hinting towards the problem. I can confirm there was something wrong with my python installation. Steps that resolved it for me.
|
LOL, I got the same thing happen to me as well I think??? Ill give this a try :) BTW how did you delete the env? |
我遇到了同样的问题,把tensorflow卸载,einops降到0.7.0版本后,又可以正常出图了。 |
System Info
Windows 10, VSCode
Who can help?
No response
Information
I was referring to the documentation on huggingface to run the facebook OPT model here:
https://huggingface.co/docs/transformers/main/en/model_doc/opt#transformers.OPTForCausalLM
And I've received the following error on my Windows 10 machine in VScode.
I first thought it was specific to this model, But I'm facing the same issue on other models.
I have tried uninstalling TensorFlow and reinstalling it.
I have upgraded "transformers" library as well. But to no avail. This seems to be a recent problem.
The virtual environment I'm using says I have these versions of tensorflow and transformers.
Reproduction
Steps to reproduce the behaviour:
Assuming required libraries are installed error message shows up.
Expected behavior
Expected the output as per shown in documentation.
The text was updated successfully, but these errors were encountered: