Ubuntu16.04下TensorFlow-GPU搭配Keras运行报错求助
Hey there, let's break down what's going on here. First off, that line starting with 2018-02-23 11:19:13.457201: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node r... is actually an INFO-level log message from TensorFlow, not an error. It's just telling you that TensorFlow successfully detected and initialized your GPU's NUMA node configuration—this part is totally normal.
Since you mentioned running into issues with the Keras notebook code, the real error is probably hidden after this info log. Here are targeted troubleshooting steps tailored to your environment (Ubuntu 16.04, Python 3.5, TensorFlow-GPU 1.4.1, PyCharm):
Verify Keras-TensorFlow version compatibility
TensorFlow 1.4.1 works best with Keras 2.1.2 (newer Keras versions often don't play nice with older TF builds). Check your current Keras version in PyCharm's terminal:pip show kerasIf it's not 2.1.2, reinstall the compatible version:
pip uninstall keras -y pip install keras==2.1.2Check CUDA/cuDNN version matching
TensorFlow 1.4.1 requires CUDA 8.0 and cuDNN 6.0. Mismatched versions are a super common culprit here. Verify your CUDA version with:nvcc --versionTo check cuDNN, look at the version definitions in
/usr/local/cuda/include/cudnn.h(search forCUDNN_MAJORandCUDNN_MINOR).Confirm PyCharm's interpreter setup
Sometimes PyCharm defaults to the system-wide Python instead of your TF-GPU enabled environment. Go toFile > Settings > Project: [Your Project Name] > Project Interpreterand make sure you've selected the Python 3.5 environment where you installed TensorFlow-GPU and Keras.Grab the full error log
The info message you shared is just the tip of the iceberg. Look for lines starting withE(ERROR) after it—those will tell you exactly what's broken (like GPU memory exhaustion, missing CUDA libraries, or misconfigured Keras backend settings).
If you're just annoyed by the verbose info logs and want to quiet them down, add this at the very top of your notebook code:
import tensorflow as tf tf.logging.set_verbosity(tf.logging.ERROR)
内容的提问来源于stack exchange,提问作者sayem48

