githubharald / SimpleHTR

Handwritten Text Recognition (HTR) system implemented with TensorFlow.
https://towardsdatascience.com/2326a3487cd5
MIT License
1.99k stars 893 forks source link

Add cudnn64_8.dll to the Windows/System32 folder, otherwise the program cannot run properly. #162

Closed huanghaiyang closed 1 year ago

huanghaiyang commented 1 year ago

-------------------------------------------------wrong--------------------------------------------------- $ python main.py 2023-08-07 15:30:51.211933: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll C:\Python39\lib\site-packages\tensorflow\python\keras\legacy_tf_layers\normalization.py:307: UserWarning: tf.layers.batch_normalization is deprecated and will be removed in a future version. Please use tf.keras.layers.BatchNormalization instead. In particular, tf.control_dependencies(tf.GraphKeys.UPDATE_OPS) should not be used (consult the tf.keras.layers.BatchNormalization documentation). warnings.warn( C:\Python39\lib\site-packages\tensorflow\python\keras\engine\base_layer_v1.py:1692: UserWarning: layer.apply is deprecated and will be removed in a future version. Please use layer.__call__ method instead. warnings.warn('layer.apply is deprecated and ' 2023-08-07 15:30:52.696087: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library nvcuda.dll 2023-08-07 15:30:52.713616: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: pciBusID: 0000:01:00.0 name: NVIDIA GeForce RTX 3060 Laptop GPU computeCapability: 8.6 coreClock: 1.702GHz coreCount: 30 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 312.97GiB/s 2023-08-07 15:30:52.713647: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll 2023-08-07 15:30:52.719226: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll 2023-08-07 15:30:52.719254: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll 2023-08-07 15:30:52.722907: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll 2023-08-07 15:30:52.724296: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll 2023-08-07 15:30:52.796349: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusolver64_11.dll 2023-08-07 15:30:52.799609: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll 2023-08-07 15:30:52.800094: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll 2023-08-07 15:30:52.800160: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0 WARNING:tensorflow:From C:\Python39\lib\site-packages\tensorflow\python\keras\layers\normalization.py:534: _colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. C:\Python39\lib\site-packages\tensorflow\python\keras\layers\legacy_rnn\rnn_cell_impl.py:909: UserWarning: tf.nn.rnn_cell.LSTMCell is deprecated and will be removed in a future version. This class is equivalent as tf.keras.layers.LSTMCell, and will be replaced by that in Tensorflow 2.0. warnings.warn("tf.nn.rnn_cell.LSTMCell is deprecated and will be " WARNING:tensorflow:tf.nn.rnn_cell.MultiRNNCell is deprecated. This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0. WARNING:tensorflow:From D:\work\github\SimpleHTR\src\model.py:117: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equivalent to this API WARNING:tensorflow:From C:\Python39\lib\site-packages\tensorflow\python\ops\rnn.py:438: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.RNN(cell), which is equivalent to this API C:\Python39\lib\site-packages\tensorflow\python\keras\engine\base_layer_v1.py:1700: UserWarning: layer.add_variable is deprecated and will be removed in a future version. Please use layer.add_weight method instead. warnings.warn('layer.add_variable is deprecated and ' WARNING:tensorflow:From C:\Python39\lib\site-packages\tensorflow\python\keras\layers\legacy_rnn\rnn_cell_impl.py:987: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor 2023-08-07 15:30:53.707701: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-08-07 15:30:53.709228: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: pciBusID: 0000:01:00.0 name: NVIDIA GeForce RTX 3060 Laptop GPU computeCapability: 8.6 coreClock: 1.702GHz coreCount: 30 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 312.97GiB/s 2023-08-07 15:30:53.709271: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0 2023-08-07 15:30:54.187110: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix: 2023-08-07 15:30:54.187135: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0 2023-08-07 15:30:54.187139: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N 2023-08-07 15:30:54.187282: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3469 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce RTX 3060 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6) 2023-08-07 15:30:54.800861: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll

if addd cudnn64_8.dll to windows/system32, no recognized result, if removed it ,program ran properly**

------------------------------------------right-------------------------------------------------------------- $ python main.py 2023-08-07 15:31:04.799866: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll C:\Python39\lib\site-packages\tensorflow\python\keras\legacy_tf_layers\normalization.py:307: UserWarning: tf.layers.batch_normalization is deprecated and will be removed in a future version. Please use tf.keras.layers.BatchNormalization instead. In particular, tf.control_dependencies(tf.GraphKeys.UPDATE_OPS) should not be used (consult the tf.keras.layers.BatchNormalization documentation). warnings.warn( C:\Python39\lib\site-packages\tensorflow\python\keras\engine\base_layer_v1.py:1692: UserWarning: layer.apply is deprecated and will be removed in a future version. Please use layer.__call__ method instead. warnings.warn('layer.apply is deprecated and ' 2023-08-07 15:31:06.244292: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library nvcuda.dll 2023-08-07 15:31:06.261843: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: pciBusID: 0000:01:00.0 name: NVIDIA GeForce RTX 3060 Laptop GPU computeCapability: 8.6 coreClock: 1.702GHz coreCount: 30 deviceMemorySize: 6.00GiB deviceMemoryBandwidth: 312.97GiB/s 2023-08-07 15:31:06.261871: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll 2023-08-07 15:31:06.267069: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll 2023-08-07 15:31:06.267094: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll 2023-08-07 15:31:06.271350: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll 2023-08-07 15:31:06.273010: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll 2023-08-07 15:31:06.357132: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusolver64_11.dll 2023-08-07 15:31:06.360239: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll 2023-08-07 15:31:06.361343: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found 2023-08-07 15:31:06.361356: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1766] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... WARNING:tensorflow:From C:\Python39\lib\site-packages\tensorflow\python\keras\layers\normalization.py:534: _colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version. Instructions for updating: Colocations handled automatically by placer. C:\Python39\lib\site-packages\tensorflow\python\keras\layers\legacy_rnn\rnn_cell_impl.py:909: UserWarning: tf.nn.rnn_cell.LSTMCell is deprecated and will be removed in a future version. This class is equivalent as tf.keras.layers.LSTMCell, and will be replaced by that in Tensorflow 2.0. warnings.warn("tf.nn.rnn_cell.LSTMCell is deprecated and will be " WARNING:tensorflow:tf.nn.rnn_cell.MultiRNNCell is deprecated. This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0. WARNING:tensorflow:From D:\work\github\SimpleHTR\src\model.py:117: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equivalent to this API WARNING:tensorflow:From C:\Python39\lib\site-packages\tensorflow\python\ops\rnn.py:438: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version. Instructions for updating: Please use keras.layers.RNN(cell), which is equivalent to this API C:\Python39\lib\site-packages\tensorflow\python\keras\engine\base_layer_v1.py:1700: UserWarning: layer.add_variable is deprecated and will be removed in a future version. Please use layer.add_weight method instead. warnings.warn('layer.add_variable is deprecated and ' WARNING:tensorflow:From C:\Python39\lib\site-packages\tensorflow\python\keras\layers\legacy_rnn\rnn_cell_impl.py:987: calling Zeros.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version. Instructions for updating: Call initializer instance with the dtype argument instead of passing it to the constructor 2023-08-07 15:31:07.289050: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-08-07 15:31:07.289849: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix: 2023-08-07 15:31:07.289861: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] Python: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] Tensorflow: 2.5.0 Init with stored values from ../model/snapshot-13 Recognized: "word" Probability: 0.9806374311447144