Introduction
TensorFlow is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) that flow between them. This flexible architecture lets you deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device without rewriting code. TensorFlow also includes TensorBoard, a data visualization toolkit.
Usage
No Format |
---|
module load anaconda/4.00py3.5 |
...
OR
module load anaconda/4.00py2.7 |
Installation
No Format |
---|
module load anaconda/4.00py3.5
conda install tensorflow
python
Python 3.5.4 |Anaconda custom (64-bit)| (default, Aug 14 2017, 13:26:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>>
|
Anaconda with Python 2.7
No Format |
---|
module load anaconda/4.00py2.7
[root@gowonda2 ~]# conda install tensorflow
Fetching package metadata .........
Solving package specifications: .
Package plan for installation in environment /sw/anaconda/py27-ver400:
The following NEW packages will be INSTALLED:
backports: 1.0-py27_0
backports.weakref: 1.0rc1-py27_0
bleach: 1.5.0-py27_0
html5lib: 0.9999999-py27_0
libprotobuf: 3.4.0-0
markdown: 2.6.9-py27_0
mock: 2.0.0-py27_0
pbr: 1.10.0-py27_0
protobuf: 3.4.0-py27_0
tensorflow: 1.3.0-0
tensorflow-base: 1.3.0-py27_0
tensorflow-tensorboard: 0.1.5-py27_0
The following packages will be UPDATED:
conda: 4.3.16-py27_0 --> 4.3.30-py27h6ae6dc7_0
funcsigs: 0.4-py27_0 --> 1.0.2-py27_0
werkzeug: 0.11.4-py27_0 --> 0.12.2-py27_0
Proceed ([y]/n)?
|
Sample pbs script that will work with n060
https://github.com/jcjohnson/pytorch-examples/blob/master/tensor/two_layer_net_tensor.py
Reference
two_layer_net_tensor.py
No Format |
---|
#!/bin/sh
#PBS -m abe
#PBS -M youremail@griffith.edu.au
#PBS -N myTestRun
#PBS -q dljun
#PBS -l walltime=01:00:00
#PBS -l select=1:ncpus=1:ngpus=1:mem=16g,walltime=1:00:00
source $HOME/.bashrc
cd $PBS_O_WORKDIR
module load cuda/10.0
module load anaconda/5.3.1py3
#source activate tensorflow_gpuenv
source activate tensorflow-gpu
#module list
###source of the sample: https://github.com/jcjohnson/pytorch-examples/blob/master/tensor/two_layer_net_tensor.py
python sample/two_layer_net_tensor.py > output_${PBS_JOBID}.log
echo "Done with job" |
Reference
- https://github.com/tensorflow/tensorflow