I get the following error when l run tensorflow in GPU.
2018-09-15 18:56:51.011724: E tensorflow/core/common_runtime/direct_session.cc:158] Internal: cudaGetDevi
The reason for this error is the mismatch of your installed Cuda Toolkit version and the version of the python package cudatoolkit, which is usually installed as dependency of tensorflow-gpu.
In order to fix this you have to first match your tensorflow version with your installed Cuda Toolkit version like shown here
Then you have to check the version of your cudatoolkit package. This have to match major and minor version, so e.g. if you have Cuda Toolkit 9.0 installed and cudatoolkit9_1 is installed you need to downgrade to cudatoolkit9 via your python.