Introduction:
TENSORFLOW is an interface for expressing machine learning
algorithms, and an implementation for executing such algorithms.
A computation expressed using TENSORFLOW can be
executed with little or no change on a wide variety of heterogeneous
systems, ranging from mobile devices such as phones
and tablets up to large-scale distributed systems of hundreds
of machines and thousands of computational devices such as
GPU cards. The system is flexible and can be used to express
a vast assortment of algorithms, including training and inference
algorithms for deep neural network models.
TENSORFLOW has been used for research and machine learning in areas such as
- speech recognition;
- computer vision;
- robotics;
- information retrieval;
- natural language processing;
- geographic information extraction;
- computational drug discovery.
Web site:
The home page at tensorflow.org:
https://www.tensorflow.org/
Reference:
- Martin Abadi et al,
TensorFlow: Large-Scale Machine Learning on Heterogeneous
Distributed Systems,
Preliminary White Paper, November 9, 2015,
http://download.tensorflow.org/paper/whitepaper2015.pdf
Usage:
TENSORFLOW 1.8 is available as a part of Anaconda/5.1.0. To use TENSORFLOW 1.8 you need to load the following modules on Cascades V100 nodes or Newriver P100 nodes:
module purge module load Anaconda/5.1.0 module load cuda/9.0.176 module load cudnn/7.1
For older versions, users will need to install them inside a virtual environment. Directions for doing so on the ARC clusters Cascades and NewRiver are given below.
Cascades Installation:
In this example, the user has decided to install TENSORFLOW 1.2 for Python 2.7. The user should log in interactively to Cascades and issue the following commands:
module purge module load Anaconda/2.3.0 module load cuda/8.0.44 module load cudnn/5.1 # Type y and hit enter when prompted with "Proceed ([y]/n)?" conda create -n tfcascades anaconda source activate tfcascades # ignore the warning messages that will follow the next command... pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl source deactivate
Cascades Usage:
Assume TENSORFLOW has been installed as in the above example.
Suppose that the following simple Python code is to be executed:
from __future__ import print_function import tensorflow as tf hello = tf.constant ( 'Hello, TensorFlow!' ) sess = tf.Session ( ) # Start the tf session print ( sess.run ( hello ) ) # Run the session
Then a typical batch job to run the code under TENSORFLOW might be:
#! /bin/bash #PBS -l procs=1,gpus=1 #PBS -l walltime=00:02:00 #PBS -q v100_normal_q #PBS -A yourallocationnamehere #PBS -W group_list=cascades #PBS -M youremail@vt.edu #PBS -m bea cd $PBS_O_WORKDIR module purge module load Anaconda/2.3.0 module load cuda/8.0.44 module load cudnn/5.1 source activate tfcascades python test.py
NewRiver Installation:
In this example, the user has decided to install TENSORFLOW 1.2 for Python 3.6. The user should log in interactively to Newriver and issue the following commands:
module purge module load Anaconda/4.2.0 module load cuda/8.0.44 module load cudnn/5.1 # Type y and hit enter when prompted with "Proceed ([y]/n)?" conda create -n tfnewriver anaconda source activate tfnewriver # ignore the warning message that will follow the next command... pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp36-cp36m-linux_x86_64.whl source deactivate
NewRiver Usage:
Assume TENSORFLOW has been installed as in the above example.
Suppose that the following simple Python code is to be executed:
from __future__ import print_function import tensorflow as tf hello = tf.constant ( 'Hello, TensorFlow!' ) sess = tf.Session ( ) # Start the tf session print ( sess.run ( hello ) ) # Run the session
Then a typical batch job to run the code under TENSORFLOW might be:
#! /bin/bash #PBS -l procs=1,gpus=1 #PBS -l walltime=00:02:00 #PBS -q p100_normal_q #PBS -A yourallocationnamehere #PBS -W group_list=newriver #PBS -M youremail@vt.edu #PBS -m bea cd $PBS_O_WORKDIR module purge module load Anaconda/4.2.0 module load cuda/8.0.44 module load cudnn/5.1 source activate tfnewriver python test.py
KERAS
Keras 2.1.6, https://keras.io/ is available as a part of Anaconda/5.1.0 on both Newriver and Cascades.
A complete set of files to carry out a similar process are available in
tensorflow_example.tar