How to evolve for tensorflow with gpu without gpu
Earlier I asked if it is possible to run a gpu-enabled tensorflow on a cpu. I was told it is possible and basic code to switch whichever device I want to use, but not how to get the initial code working on a computer that has no gpu at all. For example, I would like to train on a computer with NVidia gpu, but on a laptop that only has a processor. How should I do it? I tried to just write the code as usual, but it works before I can even switch which device I want to use. I am using Python on Linux.
source to share
This topic might be helpful: Tensorflow: ImportError: libcusolver.so.8.0: Can't open shared object file: No such file or directory
I tried to import tensorflow with tensorflow-gpu loaded in uni HPC login node which has no GPUs. It works well. I don't have an Nvidia graphics core on my laptop, so I never went through the installation process. But I think the reason is that it cannot find the corresponding CUDA libraries, cuDNN.
But why don't you just use the cpu version? As @Finbarr Timbers pointed out, you can still run the model on a GPU machine.
source to share
What errors are you getting? It is very possible to train on a GPU, but to develop on a processor - many do it, including me. In fact, Tensorflow will automatically put your code on the GPU if possible .
If you add the following code to your model, you can see which devices are in use:
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
This should change when you run your model on a GPU computer.
source to share