Installation with both CPU/GPU tensorflow modules
See original GitHub issueIt is said in the document that keras will automatically run on GPU with tensorflow backend.
However, I found Keras depends on the installation order of tensorflow modules. It seems that keras always use the module installed last. For example,
pip install tensorflow-gpu tensorflow
Keras will use CPU under this circumenstance.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:16
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Install TensorFlow with pip
Step-by-step instructions · 1. System requirements · 2. Install Miniconda · 3. Create a conda environment · 4. GPU setup · 5. Install...
Read more >CPU and GPU Tensorflow Installation - Stack Overflow
If you have tensorflow-gpu installed there really isn't any reason to also have tensorflow. Without the presence of a gpu it will just...
Read more >Installation - TensorFlow 2 Object Detection API tutorial
There are two different variations of TensorFlow that you might wish to install, depending on whether you would like TensorFlow to run on...
Read more >How to Install TensorFlow with GPU Support on Windows 10 ...
Note: I used the same procedure for doing the CPU version. I created a new "env" naming it "tf-CPU" and installed the CPU...
Read more >TensorFlow on the HPC Clusters
ssh <YourNetID>@della.princeton.edu # or adroit, tigergpu $ module load anaconda3/2022.5 ... TensorFlow 2.x for multicore CPUs can be installed as follows:
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is there any way to get the above solution to work from a tensorflow-gpu container? TF fails to import using this container on a non-gpu machine. It’d be nice to be able to use the same docker image for both machine types.
I have experimented with this a bit on my machine as well and it seems to me that the default behaviour working directly with
tensorflow==1.1.0
is following:If I perform the installation in the following order:
then GPU version is being used But if I install it in the opposite order:
then CPU version is being used.
I have performed the experiment not using keras, just importing tensorflow directly (the same way keras does it in the tensorflow backend module). And I have installed it directly to the root python 2.7. on Ubuntu 16.04.2.