Using TensorFlow

How do I use TensorFlow version 2.x ?

You may use either Anaconda, or the modules bundle for Python 3.6/3.8/3.9. Configure your environment as shown in the Python Libraries section. After you have configured it, you can use TensorFlow as:

$ python3

Python 3.6.8 (default, Aug 24 2020, 17:57:11)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.version.VERSION
'2.4.0'
>>>

How do I use TensorFlow version 1.x ?

We have version 1.15 available, if you need to use the older version of TensorFlow. Both CPU and GPU packages are installed. Use the following command:

module load deprecated/tensorflow-1.15

After you have configured it, you can use TensorFlow as:

$ python3

Python 3.6.8 (default, Aug 24 2020, 17:57:11)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> tf.version.VERSION
'1.15.0'
>>>