Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Preparing the PC for TensorflowSetting up a virtual Python environment | ||||||||
Line: 41 to 41 | ||||||||
TensorFlow relies on the cuda toolkit![]() | ||||||||
Changed: | ||||||||
< < | https://medium.com/@juancrrn/installing-cuda-and-cudnn-in-ubuntu-20-04-for-deep-learning-dad8841714d6![]() | |||||||
> > | https://medium.com/@juancrrn/installing-cuda-and-cudnn-in-ubuntu-20-04-for-deep-learning-dad8841714d6![]() ![]() | |||||||
The script testGPU.py below shows the number of GPUs that TensorFlow has fouind:
#!/home/uli/.virtualenvs/AI/bin/python import tensorflow as tf print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU'))) |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Preparing the PC for TensorflowSetting up a virtual Python environment | ||||||||
Line: 35 to 35 | ||||||||
![]() | ||||||||
Changed: | ||||||||
< < | TensorFlow relies on the cuda toolkit![]() | |||||||
> > | When looking at the Software & Updates program we see that the nvidia-driver-535 is used to control the NVidia GeForce GTX 950 module. Make sure that the nouveau driver is disabled! | |||||||
Changed: | ||||||||
< < | ![]() | |||||||
> > | ![]() | |||||||
Changed: | ||||||||
< < | To run the installer script I had to boot into single user mode, avoiding to start the desktop system. This can be done typing "e" at the boot screen and adding "single" to the boot command. | |||||||
> > | TensorFlow relies on the cuda toolkit![]() | |||||||
Changed: | ||||||||
< < | In the "Additional Drivers" tab of the Software & Updates program you see that we are using the manually installed NVidia driver: | |||||||
> > | https://medium.com/@juancrrn/installing-cuda-and-cudnn-in-ubuntu-20-04-for-deep-learning-dad8841714d6![]() | |||||||
Changed: | ||||||||
< < | ![]() | |||||||
> > | The script testGPU.py below shows the number of GPUs that TensorFlow has fouind:
#!/home/uli/.virtualenvs/AI/bin/python import tensorflow as tf print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU'))) | |||||||
Changed: | ||||||||
< < | When trying a very simple TensorFlow program:
#!/usr/bin/python3 import tensorflow as tf import numpy as np from tensorflow import keras model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])]) | |||||||
> > | After installation of cuda-11.8 and cuDNN-8.6 this is what I get, when I run the script: | |||||||
Changed: | ||||||||
< < | I get: | |||||||
> > | ![]() | |||||||
Changed: | ||||||||
< < | ![]() | |||||||
> > | To get rid of these warnings I first had to install tensorrt from the NVidia WEB site![]() ![]() ![]() | |||||||
-- ![]() Comments | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | ||||||||
| ||||||||
Line: 64 to 72 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Preparing the PC for TensorflowSetting up a virtual Python environment | ||||||||
Line: 45 to 45 | ||||||||
![]() | ||||||||
Changed: | ||||||||
< < | When trying a very simple TensorFlow program: | |||||||
> > | When trying a very simple TensorFlow program: | |||||||
#!/usr/bin/python3 import tensorflow as tf import numpy as np from tensorflow import keras model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])]) I get: |
Line: 1 to 1 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Added: | |||||||||||||||
> > |
Preparing the PC for TensorflowSetting up a virtual Python environmentThe procedure is described in https://www.freecodecamp.org/news/virtualenv-with-virtualenvwrapper-on-ubuntu-18-04.![]() Setting up the GPUWhen trying my first simple TensorFlow program I saw this warning:![]() ![]() ![]() ![]() ![]() import tensorflow as tf import numpy as np from tensorflow import keras model = tf.keras.Sequential([keras.layers.Dense(units=1, input_shape=[1])]) I get: ![]() ![]() Comments
|