I'm trying to play with BERT in Google Collab and
import tensorflow_hub as hub
but it raising ValueError:
The name 'tf.TrackableConstant' has already been registered to a serializable class. Found: <class 'tensorflow.python.eager.function_saved_model_utils.TrackableConstant'>
I believe It's a version conflict or smth like that, but can't fix it.
I've already tried restarting the environment, installing different versions of tensorflow and tensorflow_hub etc., but it didn't work.
Had the same issue with 2.9.2 but worked fine when I downgraded to 2.7
Tensorflow_hub is working fine and not showing any error when I tried replicating the same in Google Colab.(Please check the image below). I have also replicated this Classify text with BERT mdoel in Google colab which is working as expected.
Could you please try again and let us know if the issue still persists.
Related
Trying to import spacy into Google Colab but getting an error name '_C' is not defined. Is it problem with the torch somewhere inside?
torch version: 1.13.1
spacy version: 3.5.0
I've tried to upgrade spacy and cython, but it didn't work. What should I do?
As I said I've tried solutions from here, here and here
When I'm trying to downgrade numpy I'm getting a dependency error with scipy.
I've also tried to install torch 1.9.0 as in here but it also didn't work.
And I've tried to downgrade to spacy 3.4.3 which runs perfectly on my local machine -- didn't work.
UPD: just discovered that importing torch shows same error
UPD_2: this happened when I've uploaded my own notebook. When I open a new clear notebook -- everything works just fine.
I'm trying to run the following google colab:
https://colab.research.google.com/gist/zsyzzsoft/5fbb71b9bf9a3217576bebae5de46fc2/data-efficient-gans.ipynb?authuser=1#scrollTo=Re5R6VX8VNgo
colab no longer recognises gpu's with tensorflow 1.x. so is there any way to get this colab working again??
I have tried reinstalling to tensorflow 1.x and also upgrading the code to tensorflow 2 but nothing seems to work.
Google Colab removed support for Tensorflow 1, and it is not possible to use %tensorflow_version 1.x magic anymore. You have to install a specific version of tensorflow 1.x version using
pip install tensorflow==1.x
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
For more details please refer to this link. Thank You.
import tensorflow.compat.v1 as tf
Error displayed in vscode
output in jupyter
Despite trying all the possible options, I am not able to fix this error.
I am trying to learn machine learning to create a simple sign language detection system. In my VSCode, the above image is displayed.
You need to follow the instructions mentioned in this link to install the tensorflow then open the VS code in the same virtual environment.
Please check these similar issues for your reference.
I am a university professor trying to learn deep learning for a possible class in the future. I have been using google colab with GPU support for the past couple of months. Just recently, the GPU device is not found. But, I am doing everything that I have done in the past. I can't imagine that I have done anything wrong because I am just working through tutorials from books and the tensorflow 2.0 tutorials site.
tensorflow 2 on Colab GPU was broken recently due to an upgrade from CUDA 10.0 to CUDA 10.1. As of this afternoon, the issue should be resolved for the tensorflow builds bundled with Colab. That is, if you run the following magic command:
%tensorflow_version 2.x
then import tensorflow will import a working, GPU-compatible tensorflow 2.0 version.
Note, however, if you attempt to install a version of tensorflow using pip install tensorflow-gpu or similar, the result may not work in Colab due to system incompatibilities.
See https://colab.research.google.com/notebooks/tensorflow_version.ipynb for more information.
I am trying to test NVIDIA's Style GAN and am encountering an error when trying to run the pretrained_example.py file.
I get an import error from the line from tensorflow.python.ops import nccl_ops
ImportError: cannot import name 'nccl_ops'
I think I installed all the prerequisites properly and am using python 3.6. It could be a mac tensorflow issue possibly because it doesn't mention OSX on the github project. Any help would be appreciated. It might be a matter of installing a different version of tensorflow or something else, I'm not sure.
I updated tensorflow and it solved this issue