Closed rickwierenga closed 2 years ago
Please answer the following questions for yourself before submitting an issue.
https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/eager_few_shot_od_training_tf2_colab.ipynb
Colab tutorial does not work. Cell starting with tf.keras.backend.clear_session() gives the following error.
tf.keras.backend.clear_session()
Building model and restoring weights for fine-tuning... --------------------------------------------------------------------------- UnimplementedError Traceback (most recent call last) [<ipython-input-17-5906ad4ff27f>](https://lhmbecrxdw-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220922-060051-RC00_476055999#) in <module> 37 # Run model through a dummy image so that variables are created 38 image, shapes = detection_model.preprocess(tf.zeros([1, 640, 640, 3])) ---> 39 prediction_dict = detection_model.predict(image, shapes) 40 _ = detection_model.postprocess(prediction_dict, shapes) 41 print('Weights restored!') 3 frames [/usr/local/lib/python3.7/dist-packages/object_detection/models/ssd_resnet_v1_fpn_keras_feature_extractor.py](https://lhmbecrxdw-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220922-060051-RC00_476055999#) in _extract_features(self, preprocessed_inputs) 222 223 image_features = self.classification_backbone( --> 224 ops.pad_to_multiple(preprocessed_inputs, self._pad_to_multiple)) 225 226 feature_block_list = [] UnimplementedError: Exception encountered when calling layer "conv1_conv" " f"(type Conv2D). {{function_node __wrapped__Conv2D_device_/job:localhost/replica:0/task:0/device:GPU:0}} DNN library is not found. [Op:Conv2D] Call arguments received by layer "conv1_conv" " f"(type Conv2D): • inputs=tf.Tensor(shape=(1, 646, 646, 3), dtype=float32)
1 download notebook 2 upload notebook to colab 3 hit run
run without error
-
default colab, latest (?)
This fixes it.
!apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2
Are you satisfied with the resolution of your issue? Yes No
As the problem is resolved closing the issue.
Thank you.
Prerequisites
Please answer the following questions for yourself before submitting an issue.
1. The entire URL of the file you are using
https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/eager_few_shot_od_training_tf2_colab.ipynb
2. Describe the bug
Colab tutorial does not work. Cell starting with
tf.keras.backend.clear_session()
gives the following error.3. Steps to reproduce
1 download notebook 2 upload notebook to colab 3 hit run
4. Expected behavior
run without error
5. Additional context
-
6. System information
default colab, latest (?)