tensorflow2

Version:

2.7.0, 2.5.2, tensorflow3

Category:

ai

Cluster:

Loki

Author / Distributor

https://www.tensorflow.org/

Description

TensorFlow is a leading open-source platform for machine learning and deep learning developed by Google. This build of TensorFlow 2.7.0 includes GPU support via CUDA 11.2 and is compiled using GCC 9.

Key capabilities include:

  • High-level APIs with tf.keras for rapid prototyping

  • Model saving and deployment with SavedModel format

  • GPU acceleration using cuDNN and cuBLAS

  • Eager execution and AutoGraph compilation

  • Support for multi-layer neural networks, loss functions, and optimizers

This module contains only core TensorFlow functionality — no extras or additional pip packages.

Documentation

$ python -c "import tensorflow as tf; print(tf.__version__)"

Common APIs:
------------
tf.keras         → High-level deep learning API
tf.data          → Input data pipelines
tf.function      → Graph-based function wrapper
tf.config        → GPU memory and runtime control
tf.saved_model   → Export/restore models

GPU Status:
$ python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

Help:
  >>> help(tf)
  >>> tf.__version__

Examples/Usage

  • Load the module:

$ module load tensorflow2-py39-cuda11.2-gcc9/2.7.0
  • Run a basic test in Python:

import tensorflow as tf
print("TF version:", tf.__version__)
print("GPUs:", tf.config.list_physical_devices('GPU'))
  • Define and train a minimal model:

model = tf.keras.Sequential([
    tf.keras.layers.Dense(64, activation='relu'),
    tf.keras.layers.Dense(1)
])
model.compile(optimizer='adam', loss='mse')
import numpy as np
x = np.random.rand(100, 10)
y = np.random.rand(100, 1)
model.fit(x, y, epochs=1)
  • Unload the module:

$ module unload tensorflow2-py39-cuda11.2-gcc9/2.7.0

Installation

Source code is obtained from TensorFlow