duanshengliu / End-to-end-for-chinese-plate-recognition

基于u-net,cv2以及cnn的中文车牌定位,矫正和端到端识别软件,其中unet和cv2用于车牌定位和矫正,cnn进行车牌识别,unet和cnn都是基于tensorflow的keras实现
Apache License 2.0
515 stars 117 forks source link

cudnn和cuda版本是多少? #10

Closed Mrzhaopy closed 8 months ago

Mrzhaopy commented 3 years ago

作者您好: 我现在按照您提供的配置使用预测,预测时候报错如下,能再提供下cuda和cudnn以及keras的版本吗: File "test.py", line 26, in img_src, img_mask = unet_predict(unet, img_src_path) File "/home/lusen/python_zyy/End-to-end-for-chinese-plate-recognition/License-plate-recognition/Unet.py", line 109, in unet_predict img_mask = unet.predict(img_src) # 归一化除以255后进行预测 File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 908, in predict use_multiprocessing=use_multiprocessing) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_arrays.py", line 723, in predict callbacks=callbacks) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_arrays.py", line 394, in model_iteration batch_outs = f(ins_batch) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/backend.py", line 3476, in call run_metadata=self.run_metadata) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1472, in call run_metadata_ptr) tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found. (0) Unknown: 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/Conv2D}}]] [[conv2d_18/Relu/_2965]] (1) Unknown: 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/Conv2D}}]] 0 successful operations.

duanshengliu commented 3 years ago

keras:2.3.1 关于cudnn和cuda看你的显卡,上网搜一下和你自己显卡的版本对应关系,我的是1050Ti,安装的是以下版本,cuda应该是要10.0版本,因为tensorflow版本是1.15.2的原因,然后cudnn和cuda版本匹配就行 cudnn:7.6.4 cuda:10.0

------------------ 原始邮件 ------------------ 发件人: "duanshengliu/End-to-end-for-chinese-plate-recognition" <notifications@github.com>; 发送时间: 2020年12月28日(星期一) 上午10:38 收件人: "duanshengliu/End-to-end-for-chinese-plate-recognition"<End-to-end-for-chinese-plate-recognition@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [duanshengliu/End-to-end-for-chinese-plate-recognition] cudnn和cuda版本是多少? (#10)

作者您好: 我现在按照您提供的配置使用预测,预测时候报错如下,能再提供下cuda和cudnn以及keras的版本吗: File "test.py", line 26, in img_src, img_mask = unet_predict(unet, img_src_path) File "/home/lusen/python_zyy/End-to-end-for-chinese-plate-recognition/License-plate-recognition/Unet.py", line 109, in unet_predict img_mask = unet.predict(img_src) # 归一化除以255后进行预测 File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 908, in predict use_multiprocessing=use_multiprocessing) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_arrays.py", line 723, in predict callbacks=callbacks) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_arrays.py", line 394, in model_iteration batch_outs = f(ins_batch) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/keras/backend.py", line 3476, in call run_metadata=self.run_metadata) File "/home/lusen/anaconda3/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1472, in call run_metadata_ptr) tensorflow.python.framework.errors_impl.UnknownError: 2 root error(s) found. (0) Unknown: 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/Conv2D}}]] [[conv2d_18/Relu/_2965]] (1) Unknown: 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/Conv2D}}]] 0 successful operations.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Mrzhaopy commented 3 years ago

升级我的cudnn从7.5.0到7.6.4问题就解决了