Hi,
When I ran the demo.ipynb notebook no GPU memory is utilized. What changes do I need to make to run it in GPU?
Thanks
Have you installed CUDA or any other graphical platform?
yes. I have a working Titan GPU environment. Usually, we will transfer the model to GPU by model.to(device) or model.cuda(). But here I didn't find anything like that.
You do not need model.to(device), just open the jupyter notebook in your gpu virtualenv.
I am doing that only. But during running, no GPU memory is utilized (checking via nvidia-smi).
Okay lets start from the beginning.
Linux,
Anaconda,
cuDNN,
no
I can run other deeplearning programs without any error. So I think the environment is fine.
Did you install the gpu version of tensorflow?
Also check in the Nvidia control panel for the icon of gpu activity
Ok
You can try this:
$ pip freeze | grep tensorflow to check if you have tensorflow-gpu python package is installed.tensorboard==1.9.0
tensorflow-gpu==1.9.0
$ pip uninstall tensorflow$ pip install tensorflow-gpu==1.9.0@cardboardcode Sorry for the late reply. My tensorflow was not gpu version. Now I can run in GPU. I have another doubt, how can I specify the GPU device, currently it is running on all GPUs available.
Thanks
I have same problem,i use nvidia-smi to check the gpu ,but i found the gpu doesn't show work,while the program is running ,so how can i check whether i use gpu.
1.Linux2.not Anacoda 3.installed cuda &cudnn 4.yes,there is a program shows "/usr/bin/python" using gpu0 and"/home/sky/anaconda/envs/fastai/bin/python"using gpu 1,which occupy 1g ,and both 2 cards
have 16G for GPU memory. Besides tensorfow==1.40 tensorflow-gpu==1.3.0 tensorflow-tensorboard==0.1.8, I also set path for CUDA in my bashrc.
I have solved the problem, I uninstall the tensorflow==1.40,just keep tensorflow-gpu ,and it works.
if you don't have a GPU, you can run the notebook on Google Collab.
Most helpful comment
You can try this:
$ pip freeze | grep tensorflowto check if you have tensorflow-gpu python package is installed.You should see the following terminal output:
$ pip uninstall tensorflow$ pip install tensorflow-gpu==1.9.0