TensorFlow-Intel

2.18.0 · active · verified Thu Apr 16

TensorFlow-Intel is an optimized distribution of the open-source machine learning framework TensorFlow, specifically tailored for Intel CPUs. It leverages Intel's oneAPI Deep Neural Network Library (oneDNN) primitives to enhance performance for deep learning workloads. This package is compatible with existing TensorFlow code and is maintained by Intel in collaboration with Google, aiming to provide maximal performance on Intel architectures. It is actively developed with regular updates to support newer TensorFlow versions and Intel hardware.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart code verifies the TensorFlow-Intel installation by performing a simple tensor operation and demonstrates a basic Keras model setup. A successful installation should print a tensor sum and the model summary.

import tensorflow as tf

# Verify TensorFlow installation and CPU setup
print(tf.reduce_sum(tf.random.normal([1000, 1000])))

# Basic Keras example
model = tf.keras.Sequential([
    tf.keras.layers.Dense(10, activation='relu', input_shape=(784,)),
    tf.keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
model.summary()

view raw JSON →