Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time is 1875.640280 #17

Closed
bigsea00001 opened this issue Jan 10, 2018 · 5 comments
Closed

time is 1875.640280 #17

bigsea00001 opened this issue Jan 10, 2018 · 5 comments

Comments

@bigsea00001
Copy link

I am wondering if the train screen changes every 1875 seconds and this speed is correct.
Can not use this program with CUDA?

[2/150][50] Loss_DA: 0.205057 Loss_DB: 0.193327 Loss_GA: 0.415360 Loss_GB: 0.413623 time: 1875.640280
[4/150][100] Loss_DA: 0.200707 Loss_DB: 0.211183 Loss_GA: 0.295002 Loss_GB: 0.341839 time: 3606.393274

@shaoanlu
Copy link
Owner

Please check if tensorflow is using gpu. Also,

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

this can list the available devices on your machine.

@bigsea00001
Copy link
Author

Thank you for answer.
As you can see, I have device_type: "CPU" as shown below. I am using Cuda 8.0, gtx 1060 6GB, and I will look for a solution.

[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 9750307169120904566
]

@shaoanlu
Copy link
Owner

You're welcome. Good luck and happy swapping.

@BillyHalley
Copy link

@bigsea00001 Did you manage to resolve it?

@Yare-zz
Copy link

Yare-zz commented Feb 22, 2018

I had this issue, which is now resolved. For future reference:

I first installed tensorflow-gpu 1.5, but didn't test it. I had CUDA 8 installed (with cuDNN 5.1), but tensorflow 1.5 expects CUDA 9 (with cuDNN 7). Normally this would have been obvious the first time I tried to use the notebooks and tensorflow exploded with a missing DLL error. However, the failure was masked as a result of running this command in the notebook:

pip install keras_vggface

This package installs the CPU-based tensorflow as a dependency. And so when I ran the training notebooks everything silently "worked" as it fell back on CPU tensorflow. I resolved the issue by doing:

pip uninstall tensorflow

And then trying:

python
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

This finally raised an error that I was missing CUDA 9 DLLs. I installed the CUDA 9 stack, relisted my local devices, and the GPU finally showed up. Training times improved drastically.

@shaoanlu , you might consider adding some of these notes to your readme. Many of your users are probably unaware that they are running in CPU. In my notebook I also threw in the list_local_devices call right after importing tensorflow so I can verify immediately if I'm working with GPU or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants