Skip to content
Snippets Groups Projects
Commit 6140f612 authored by Jan Siwiec's avatar Jan Siwiec
Browse files

Update tensorflow.md

parent 62568cb5
No related branches found
No related tags found
1 merge request!411Add section about using TensorFlow with GPUs
...@@ -4,14 +4,16 @@ TensorFlow (TF) is an open-source software library which can compile tensor oper ...@@ -4,14 +4,16 @@ TensorFlow (TF) is an open-source software library which can compile tensor oper
very quickly on both CPUs and GPUs. It is often used as a backend for machine learning libraries very quickly on both CPUs and GPUs. It is often used as a backend for machine learning libraries
and models. and models.
We heavily recommend the usage of `Tensorflow 2.x`. TensorFlow 1 has been long deprecated and it We heavily recommend the usage of `TensorFlow 2.x`. TensorFlow 1 has been long deprecated and it
will probably be difficult to make it run on GPUs on our clusters. will probably be difficult to make it run on GPUs on our clusters.
## Installation ## Installation
For TensorFlow to work with GPUs, you have to use several libraries (CUDA, cuDNN, NCCL etc.) For TensorFlow to work with GPUs, you have to use several libraries (CUDA, cuDNN, NCCL etc.)
with versions that are compatible together. with versions that are compatible together.
You can load the correct modules with the following command: You can load the correct modules with the following command:
```console ```console
$ ml TensorFlow $ ml TensorFlow
``` ```
...@@ -19,6 +21,7 @@ $ ml TensorFlow ...@@ -19,6 +21,7 @@ $ ml TensorFlow
If you want to upgrade the TensorFlow version used in this package or install additional Python If you want to upgrade the TensorFlow version used in this package or install additional Python
modules, you can simply create a virtual environment and install a different TensorFlow version modules, you can simply create a virtual environment and install a different TensorFlow version
inside it: inside it:
```console ```console
$ python3 -m venv venv $ python3 -m venv venv
$ source venv/bin/activate $ source venv/bin/activate
...@@ -53,7 +56,7 @@ Using the available `TensorFlow` module should make sure that these modules will ...@@ -53,7 +56,7 @@ Using the available `TensorFlow` module should make sure that these modules will
### Selecting GPUs ### Selecting GPUs
You can select how many and which (Nvidia) GPUs will be used by TensorFlow with the You can select how many and which (NVIDIA) GPUs will be used by TensorFlow with the
`CUDA_VISIBLE_DEVICES` environment variable. `CUDA_VISIBLE_DEVICES` environment variable.
```console ```console
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment