Home 9 Resources 9 Software 9 TensorFlow

TensorFlow

TensorFlow is an open source software library for numerical computation using data flow graphs. It is widely used in machine learning.  Tensorflow is sometimes used as the computational backend to other AI software, including Keras.

Tensorflow is available on Bridges-2 and on Neocortex.

Documentation

 

Using TensorFlow on Bridges-2

When using TensorFlow on Bridges-2, keep these things in mind:

  • TensorFlow cannot be run on the Bridges-2 login nodes. The SLURM scheduler  (Simple Linux Utility for Resource Management) manages and allocates all of Bridges-2 compute nodes. All of your production computing must be done on Bridges-2 compute nodes.
  • Choose the correct partition and module for the type of node you want to use.  TensorFlow can be run on Bridges-2 GPU nodes or on CPU nodes. Be certain to load the correct module and use the correct partition.  See the Bridges-2 User Guide for information on Bridges-2  partitions.
  • Activate the Python virtual environment after you load the tensorflow module.  Typically this is done with the source activate command.
  • However, the activation command can vary with older versions of TensorFlow.
  • If you want to use TensorBoard to visualize your TensorFlow data, you must add lines to your TensorFlow code to log TensorFlow summaries.
  • Singularity containers for TensorFlow are available for use on Bridges-2 in directory /ocean/containers/ngc/tensorflow. Multiple containers are available, for different versions of python and supporting software.  These containers can be used on the GPU nodes. See Singularity images on Bridges-2 for more information on the available containers.

Batch use

TensorFlow can be run in batch mode on Bridges-2.  You will need to create a batch job and then submit it to one of Bridges-2’s partitions using the sbatch command.  See the Running Jobs section of the Bridges-2 User Guide for more information on running batch jobs.

Interactive use

TensorFlow can be used in an interactive session on Bridges-2.  You will need to request an interactive session with the interact command.  See the Running Jobs section of this User Guide for more information on interact.

Using TensorFlow on Neocortex

Your TensorFlow code must be migrated to the Cerebras architecture before it will run successfully on Neocortex. You must port your code to use the Cerebras libraries instead of the default  libraries.

Detailed instructions to do this are given in the Code Migration section of the Neocortex User Documentation.