<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 Pro Build 17134</li>
<li>TensorFlow installed from (source or binary): Package (pip install tensorflow-gpu)</li>
<li>TensorFlow version: 1.12.0</li>
<li>Python version: 3.6.7</li>
<li>Installed using virtualenv? pip? conda?: pip</li>
<li>CUDA/cuDNN version: CUDA 9/CuDNN 7.4.1.5</li>
<li>GPU model and memory: GTX 1070ti 416.34</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong></p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong><br>
I have been working with some code in keras that works fine with the cpu version of tensorflow (pip install tensorflow)  Since each epoch was taking a minute to run, I wanted to throw my 1070ti at the problem. I installed tensorflow-gpu (pip install tensorflow-gpu) along with CUDA and CuDNN.  I then did a quick restart but when I went to run my code again it didn't make keras use the gpu version of tensorflow.  I uninstalled tensorflow (pip uninstall tensorflow) gave it another restart and now getting the following error with the DLL load failing.  Reinstalling the cpu version of Tensorflow getting it working again but only on the CPU.  I can't see what I have done wrong but any help is appreciated.  I have a look through some of the past issues but the solutions only seem to be for the CPU package not importing.  Might have missed some finesse there so please do point out the obvious.</p>
<p dir="auto"><strong>Any other info / logs</strong></p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">import tensorflow as tf<br>
Traceback (most recent call last):<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic<br>
return _load(spec)<br>
ImportError: DLL load failed: The specified module could not be found.</p>
</blockquote>
</blockquote>
</blockquote>
<p dir="auto">During handling of the above exception, another exception occurred:</p>
<p dir="auto">Traceback (most recent call last):<br>
File "&lt;pyshell#0&gt;", line 1, in <br>
import tensorflow as tf<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow_<em>init</em>_.py", line 24, in <br>
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python_<em>init</em>_.py", line 49, in <br>
from tensorflow.python import pywrap_tensorflow<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <br>
raise ImportError(msg)<br>
ImportError: Traceback (most recent call last):<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <br>
from tensorflow.python.pywrap_tensorflow_internal import *<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <br>
_pywrap_tensorflow_internal = swig_import_helper()<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper<br>
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\imp.py", line 243, in load_module<br>
return load_dynamic(name, filename, file)<br>
File "C:\Users\natha\AppData\Local\Programs\Python\Python36\lib\imp.py", line 343, in load_dynamic<br>
return _load(spec)<br>
ImportError: DLL load failed: The specified module could not be found.</p>
<p dir="auto">Failed to load the native TensorFlow runtime.</p>
<p dir="auto">See <a href="https://www.tensorflow.org/install/errors" rel="nofollow">https://www.tensorflow.org/install/errors</a></p>
<p dir="auto">for some common reasons and solutions.  Include the entire stack trace<br>
above this error message when asking for help.</p>
<p dir="auto">As announced in release notes, TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets. This means on any CPU that do not have these instruction sets either CPU or GPU version of TF will fail to load with any of the following errors:</p>
<ul dir="auto">
<li><code class="notranslate">ImportError: DLL load failed:</code></li>
<li>A crash with return code 132</li>
</ul>
<p dir="auto">Our recommendation is to build TF from sources on these systems.</p>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: No</li>
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: ubuntu/windows/macos</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.6 and up</li>
<li><strong>Python version</strong>:  2.7, 3.3, 3.4, 3.5, 3.6 and any newer</li>
<li><strong>Bazel version (if compiling from source)</strong>: n/a</li>
<li><strong>GCC/Compiler version (if compiling from source)</strong>: n/a</li>
<li><strong>CUDA/cuDNN version</strong>: any</li>
<li><strong>GPU model and memory</strong>: any</li>
<li><strong>Exact command to reproduce</strong>: python -c "import tensorflow as tf"</li>
</ul>