2022-11-19 11:53:34.377464: 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-11-19 11:53:34.377500: 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.
inference start
load_model start
load start
2022-11-19 11:53:35.795849: 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
2022-11-19 11:53:35.795885: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2022-11-19 11:53:35.795906: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (iZbp10isq62a384lqzwsmsZ): /proc/driver/nvidia/version does not exist
2022-11-19 11:53:35.796354: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "example.py", line 19, in <module>
result = inference(test_img_dir)
File "example.py", line 6, in inference
model = predict.load_model('/data/python/fanyi/mobilenet_v2_140_224/saved_model.h5')
File "/data/python/fanyi/nsfw_detector/predict.py", line 58, in load_model
model = tf.keras.models.load_model(model_path, custom_objects={'KerasLayer': hub.KerasLayer},compile=False)
File "/usr/local/python3/lib/python3.7/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/keras_layer.py", line 137, in __init__
self._func = load_module(handle, tags)
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/keras_layer.py", line 352, in load_module
return module_v2.load(handle, tags=tags)
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/module_v2.py", line 90, in load
module_path = resolve(handle)
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/module_v2.py", line 52, in resolve
return registry.resolver(handle)
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/registry.py", line 42, in __call__
return impl(*args, **kwargs)
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py", line 88, in __call__
self._lock_file_timeout_sec())
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/resolver.py", line 402, in atomic_download
download_fn(handle, tmp_dir)
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py", line 83, in download
response = self._call_urlopen(request)
File "/usr/local/python3/lib/python3.7/site-packages/tensorflow_hub/compressed_module_resolver.py", line 96, in _call_urlopen
return url.urlopen(request)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/local/python3/lib/python3.7/urllib/request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>
How to solve this problem? Thank you for your reply
This appears to be a connection timeout with Tensorflow Hub. You'll need to troubleshoot your connection. This is unrelated to the core functionality of nsfw_detector.
How to solve this problem? Thank you for your reply