我正在尝试运行 TrackNet的神经网络。
[Youtube] https://www.youtube.com/watch?v=7IVUyhMkyms&t=5s
[存储库] https://nol.cs.nctu.edu.tw:234/open-source/TrackNet/
Ubuntu: 16.04
CUDA: 10.0
cuDNN: 7.4.2
Tensorflow-GPU: 1.13.1 (by pip)
Python: 3.5
我通过成功运行教程来检查我的Tensorflow是否正确安装。
但是,当我尝试运行predict_video.py
时,会引发错误,
2020-02-05 15:39:18.115954: E tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
2020-02-05 15:39:18.124059: E tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
Traceback (most recent call last):
File "predict_video.py", line 117, in <module>
pr = m.predict(np.array([X]))[0]
File ".../ENV/lib/python3.5/site-packages/keras/engine/training.py", line 1462, in predict
callbacks=callbacks)
File ".../ENV/lib/python3.5/site-packages/keras/engine/training_arrays.py", line 324, in predict_loop
batch_outs = f(ins_batch)
File ".../ENV/lib/python3.5/site-packages/tensorflow/python/keras/backend.py", line 3076, in __call__
run_metadata=self.run_metadata)
File ".../ENV/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1439, in __call__
run_metadata_ptr)
File ".../ENV/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 528, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[{{node conv2d_1/convolution}}]]
下面是tensorflow/python/client/session.py
def __call__(self, *args, **kwargs):
# TODO(b/74355905): Support argument and return value nested structures,
# and tensor-like objects such as SparseTensors.
run_metadata = kwargs.get('run_metadata', None)
try:
run_metadata_ptr = tf_session.TF_NewBuffer() if run_metadata else None
# TODO(mrry): Switch to raising an exception from the SWIG wrapper.
with errors.raise_exception_on_not_ok_status() as status:
ret = tf_session.TF_SessionRunCallable(
self._session._session, self._handle, args, status,
(1439) run_metadata_ptr)
if run_metadata:
proto_data = tf_session.TF_GetBuffer(run_metadata_ptr)
run_metadata.ParseFromString(compat.as_bytes(proto_data))
finally:
if run_metadata_ptr:
tf_session.TF_DeleteBuffer(run_metadata_ptr)
return ret
任何帮助将不胜感激!
答案 0 :(得分:0)
问题是CUDA + CUDNN + TensorFlow版本之间不兼容。
您需要检查此站点的Linux兼容性,以验证所需的确切CUDA + CUDNN + TensorFlow版本:
https://www.tensorflow.org/install/source#tested_build_configurations