-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtensorflow_gpu_howto
44 lines (35 loc) · 2.64 KB
/
tensorflow_gpu_howto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
How to get tensorflow-gpu working on your personal computer:
Resources:
https://medium.com/@lmoroney_40129/installing-tensorflow-with-gpu-on-windows-10-3309fec55a00
https://towardsdatascience.com/tensorflow-gpu-installation-made-easy-use-conda-instead-of-pip-52e5249374bc
First- check whether your gpu is cuda compatible:
1. type control /name Microsoft.DeviceManager in command prompt (cmd)
2. Your gpu(s) is/are listed under Display Adapters, you can check if this is cuda compatible on the nvidia website
3. if there is a triangle with an exclamation point next to your gpu, your driver update might have messed things up.
Right click on the gpu and select properties. Select roll back driver update. This should fix the problem and the
comment in the properties should say device working properly.
Second - install anaconda if you don't have it already
Third - open anaconda prompt and type : conda create --name tf_gpu tensorflow-gpu
This creates a new environment and installs everything necessary for tensorflow-gpu, including the right cuda and cudnn version
Last - check your installation by typing:
1. conda activate tf_gpu
2. python
3. sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
The log_device_placement argument prints the gpu detected. Make sure the name of your gpu is printed in the console.
NOTE: Driver Issues
Although all the previous steps may work, you might still get an error when you actually start training your network.
If you get a cuda driver error that says the driver is too old, you need to update the driver (not all of CUDA!)
Go to this website: https://www.nvidia.com/Download/index.aspx
Input the information specific to the gpu you are using and download that driver
If the installation fails, read the error.
If you are using a GeForce gpu the error will direct you to download a driver installer specific to GeForce
Download that installer and run the application
Go to drivers and check for updates - update the necessary drivers
Try to run your training again - you might have to restart your computer
TroubleShooting Tips:
1. If you updated the NVIDIA driver and your computer is now crashing when you train your program, try updating your Windows -
This will most likely update the driver and update it to a version that will not crash your Windows system
2. I have been unsuccessful in trying to download specific drivers - it seems to only work through GeForce/NVIDIA directly
(not even apt-get commands), and Windows updates
Please feel free to post an issue regarding a problem you are facing that is not covered here and I will try my best to help!
Good Luck and Happy Deep Learning!