Skip to content
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

Something makes cell six die in demo notebook. #2

Open
ScriptHound opened this issue Mar 28, 2022 · 2 comments
Open

Something makes cell six die in demo notebook. #2

ScriptHound opened this issue Mar 28, 2022 · 2 comments

Comments

@ScriptHound
Copy link

After this line cell dies idle:

predicted = self.model.predict(image_np)[0]

There are many warnings btw:
traceback.txt

@akucia
Copy link
Owner

akucia commented Mar 31, 2022

This part looks like an issue with CUDA GPU libraries

2022-03-28 12:54:27.132131: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2022-03-28 12:54:27.132153: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Segmentation Models: using `tf.keras` framework.
extracting effnet-b3-FPN-160-tversky-hands.tar.gz
2022-03-28 12:54:30.458265: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/scripthound/analog_watch_recognition/analog-watch-recognition/venv/lib/python3.8/site-packages/cv2/../../lib64:
2022-03-28 12:54:30.458286: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2022-03-28 12:54:30.458298: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (magi3): /proc/driver/nvidia/version does not exist

Make sure you can run any tf code on the GPU

import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

These tutorials might be helpful:
https://www.tensorflow.org/install/gpu
https://www.tensorflow.org/install/gpu

Alternatively, you could run the notebook without a GPU if you set env var CUDA_VISIBLE_DEVICES=-1 before you import Tensorflow. See more here https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars

@akucia
Copy link
Owner

akucia commented Mar 31, 2022

Warnings like this

WARNING:tensorflow:Unable to restore custom metric. Please ensure that the layer implements `get_config` and `from_config` when saving. In addition, please use the `custom_objects` arg when calling `load_model()`.

and similar to these

WARNING:absl:Importing a function (__inference_block4a_expand_activation_layer_call_and_return_conditional_losses_4624933) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.
WARNING:absl:Importing a function (__inference_block2a_activation_layer_call_and_return_conditional_losses_4594619) with ops with unsaved custom gradients. Will likely fail if a gradient is requested.

Can be ignored if you use models for inference. The models might fail if you run .fit method though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants