TensorFlow

Z MetaCentrum
Skočit na navigaci Skočit na vyhledávání

Description

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) communicated between them. The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API.

License

Apache License, Version 2.0

Usage

TensorFlow as a Singularity container (preffered option)

Newer versions of TensorFlow are available solely as Singularity images optimized for usage with NVidia GPUs (NVidia GPU Cloud, NGC). The NGC packages are placed in the directory /cvmfs/singularity.metacentrum.cz; you have to list the directory first to see its contents:

ls /cvmfs/singularity.metacentrum.cz

To use a selected version of TensdorFlow image, run the image within interactive job as:

qsub -I -l select=1:mem=16gb:scratch_local=10gb:ngpus=1:gpu_cap=cuda60:cuda_version=11.0 -q gpu -l walltime=4:00:00
singularity shell --nv /cvmfs/singularity.metacentrum.cz/NGC/TensorFlow\:21.03-tf2-py3.SIF

More about Nvidia GPU cloud usage can be found at NVidia deep learning frameworks wiki page.

TensorFlow as a module

please use the Singularity version above whenever possible

Available modules:

tensorflow-2.0.0-gpu-python3
tensorflow-1.13.1-gpu-python3
tensorflow-1.7.1-gpu-python3
tensorflow-1.7.1-cpu-python3
tensorflow-1.5.0-gpu
tensorflow-1.5.0-cpu-python3
tensorflow-1.4.1-gpu
tensorflow-1.3.0-cpu
tensorflow-1.3.0-cpu-python3
tensorflow-1.3.0-gpu
tensorflow-1.3.0-gpu-python3

Usage:

module add tensorflow-1.0.1-cpu                 (for CPU version of TensorFlow 1.0.1 in Python 2.7.6)
module add tensorflow-1.0.1-cpu-python3         (for CPU version of TensorFlow 1.0.1 in Python 3.4.1)
module add tensorflow-1.0.1-gpu                 (for GPU version of TensorFlow 1.0.1 in Python 2.7.6)
module add tensorflow-1.0.1-gpu-python3         (for GPU version of TensorFlow 1.0.1 in Python 3.4.1)
module add tensorflow-2.0.0-gpu-python3         (for GPU version of TensorFlow 2.0.0 in Python 3.4.1)

Once you add the module that best suits your needs, the use is as simple as running python and importing the tensorflow module...

python
>>> import tensorflow as tf
>>> (etc.)

Tip: if you are using tensorflow-2.0.0-gpu-python3 and receive a message "Illegal instruction", ask for GPU cards supporting avx512 instructions

PBS -l select=...:cpu_flag=avx512dq

Documentation

https://www.tensorflow.org/overview

Homepage

https://www.tensorflow.org/