tf-keras
Deep learning for humans.
What it is and what it does
TF-Keras is the TensorFlow-native implementation of Keras, descended from the legacy `tf.keras` codebase. It provides a high-level, user-friendly API for defining, training, and evaluating deep neural networks using TensorFlow as the computational backend. The package includes layers, optimizers, loss functions, and utilities for building models ranging from simple sequential architectures to complex custom networks.
Unlike the newer Keras 3 (multi-backend implementation supporting JAX, PyTorch, and TensorFlow), TF-Keras is specifically optimized for TensorFlow workflows. It is production-stable and actively maintained, making it suitable for projects where TensorFlow is the primary or exclusive deep learning framework.
Use it for:
- Build and train sequential or functional neural network models for image classification, NLP, or regression tasks.
- Rapidly prototype deep learning models using high-level Keras layers and pre-built components.
- Fine-tune pre-trained models or transfer learning workflows within a TensorFlow ecosystem.
- Define custom layers and loss functions for specialized deep learning research or production systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
TF-Keras is the pure-TensorFlow implementation of Keras, providing a high-level API for building and training deep learning models with TensorFlow as the backend.
Yes, if you are committed to TensorFlow-based deep learning. TF-Keras is production-stable, actively maintained, has low install friction, and carries a permissive Apache 2.0 license. No known vulnerabilities. Install it as the standard Keras API for TensorFlow projects; consider Keras 3 only if you need multi-backend flexibility.
Install
tf-keras on PyPI
pip
pip install tf-kerasuv
uv add tf-keraspoetry
poetry add tf-kerasInstalling tf-keras
Before you install
Low install friction with a pure Python wheel. Actively maintained with a recent commit on 2026-08-14 and production-stable status. Requires Python 3.10 or later.
License in practice
Licensed under Apache 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install tf-keras
import tensorflow as tf
from tensorflow import keras
model = keras.Sequential([keras.layers.Dense(10, activation='relu')])
model.compile(optimizer='adam', loss='mse')
Requires Python 3.10 or later and TensorFlow as a runtime dependency.
Verify before relying
- Whether TF-Keras 2.21.0 is compatible with all current TensorFlow versions or has specific version constraints.
- Performance characteristics compared to the multi-backend Keras 3 implementation.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — tensorflow |
| Maintenance | actively maintained — 149 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,930,621/month — #2,447 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tf_keras-2.21.0-py3-none-any.whl
Keywords: keras, tensorflow, machine learning, deep learning
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
Keras-PreprocessingProvides data preprocessing and augmentation…
permissive · top 5,000 on PyPI
tf-keras-nightlyTF-Keras is a pure-TensorFlow implementation of…
permissive · top 5,000 on PyPI
tensorflow-addonsTensorFlow Addons provides experimental…
permissive · top 5,000 on PyPI
kerasKeras 3 is a multi-backend deep learning…
permissive · top 5,000 on PyPI
keras-nightlyA multi-backend deep learning framework that…
permissive · top 15,000 on PyPI
keras-nlpKeras-NLP provides pretrained models and…
permissive · top 15,000 on PyPI
keras-hubKerasHub provides Keras 3 implementations of…
permissive · top 15,000 on PyPI
tf-slimTensorFlow-Slim provides high-level layers,…
permissive · top 15,000 on PyPI
tensorflowTensorFlow is an open-source machine learning…
permissive · top 5,000 on PyPI
efficientnetProvides Keras and TensorFlow Keras…
permissive · top 15,000 on PyPI