cuda:12.2
cudnn:8.9.7
tensorflow库:2.17.0
(python310_test) {9:37}/home/code/python ➭ python mnist_test.py 2024-09-06 09:39:29.473128: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-09-06 09:39:29.473229: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-09-06 09:39:29.474765: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-09-06 09:39:29.486496: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-09-06 09:39:31.073095: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 2024-09-06 09:39:33.295797: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:33.356094: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:33.356833: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:33.360581: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:33.361110: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:33.361697: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:36.333888: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:36.334434: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:36.334755: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2022] Could not identify NUMA node of platform GPU id 0, defaulting to 0. Your kernel may not have been built with NUMA support. 2024-09-06 09:39:36.335313: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:887] could not open file to read NUMA node: /sys/bus/pci/devices/0000:01:00.0/numa_node Your kernel may have been built without NUMA support. 2024-09-06 09:39:36.335407: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1929] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1300 MB memory: -> device: 0, name: NVIDIA GeForce GTX 960, pci bus id: 0000:01:00.0, compute capability: 5.2 Epoch 1/5 2024-09-06 09:39:39.774178: I external/local_xla/xla/service/service.cc:168] XLA service 0x7fac628d10f0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2024-09-06 09:39:39.774274: I external/local_xla/xla/service/service.cc:176] StreamExecutor device (0): NVIDIA GeForce GTX 960, Compute Capability 5.2 2024-09-06 09:39:39.784928: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:269] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable. 2024-09-06 09:39:40.969447: I external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:454] Loaded cuDNN version 8907 WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1725586781.124390 1795 device_compiler.h:186] Compiled cluster using XLA! This line is logged at most once for the lifetime of the process. 1875/1875 [==============================] - 22s 10ms/step - loss: 0.3729 - accuracy: 0.8871 Epoch 2/5 1875/1875 [==============================] - 18s 10ms/step - loss: 0.1962 - accuracy: 0.9396 Epoch 3/5 1875/1875 [==============================] - 19s 10ms/step - loss: 0.1528 - accuracy: 0.9539 Epoch 4/5 1875/1875 [==============================] - 19s 10ms/step - loss: 0.1269 - accuracy: 0.9600 Epoch 5/5 1875/1875 [==============================] - 19s 10ms/step - loss: 0.1132 - accuracy: 0.9646 313/313 [==============================] - 3s 10ms/step - loss: 0.1134 - accuracy: 0.9652 1/1 [==============================] - 0s 115ms/step [7 2 1 0 4] [7 2 1 0 4]
前两种颜色的问题,网上都有相关的,忘了截图了,反正可以不用在意。
后两种颜色的解惑
https://blog.csdn.net/Deaohst/article/details/125708952