keras README

The project's README from github.com/keras-team/keras. As one markdown file: README.md.

Keras 3: Deep Learning for Humans

Keras 3 is a multi-backend deep learning framework, with support for JAX, TensorFlow, PyTorch, and OpenVINO (for inference-only). Effortlessly build and train models for computer vision, natural language processing, audio processing, timeseries forecasting, recommender systems, etc.

Join nearly three million developers, from burgeoning startups to global enterprises, in harnessing the power of Keras 3.

Installation

Install with pip

Keras 3 is available on PyPI as keras. Note that Keras 2 remains available as the tf-keras package.

  1. Install keras:
pip install keras --upgrade
  1. Install backend package(s).

To use keras, you should also install the backend of choice: tensorflow, jax, or torch. Additionally, The openvino backend is available with support for model inference only.

Local installation

Minimal installation

Keras 3 is compatible with Linux and macOS systems. For Windows users, we recommend using WSL2 to run Keras. To install a local development version:

  1. Install dependencies:
pip install -r requirements.txt
  1. Run installation command from the root directory.
python pip_build.py --install
  1. Run API generation script when creating PRs that update keras_export public APIs:
./shell/api_gen.sh

Backend Compatibility Table

The following table lists the minimum supported versions of each backend for the latest stable release of Keras (v3.x):

Backend Minimum Supported Version
TensorFlow 2.16.1
JAX 0.4.20
PyTorch 2.1.0
OpenVINO 2026.2.0

Adding GPU support

The requirements.txt file will install a CPU-only version of TensorFlow, JAX, and PyTorch. For GPU support, we also provide a separate requirements-{backend}-cuda.txt for TensorFlow, JAX, and PyTorch. These install all CUDA dependencies via pip and expect a NVIDIA driver to be pre-installed. We recommend a clean Python environment for each backend to avoid CUDA version mismatches. As an example, here is how to create a JAX GPU environment with conda:

conda create -y -n keras-jax python=3.10
conda activate keras-jax
pip install -r requirements-jax-cuda.txt
python pip_build.py --install

Configuring your backend

You can export the environment variable KERAS_BACKEND or you can edit your local config file at ~/.keras/keras.json to configure your backend. Available backend options are: "tensorflow", "jax", "torch", "openvino". Example:

export KERAS_BACKEND="jax"

In Colab, you can do:

import os
os.environ["KERAS_BACKEND"] = "jax"

import keras

Note: The backend must be configured before importing keras, and the backend cannot be changed after the package has been imported.

Note: The OpenVINO backend is an inference-only backend, meaning it is designed only for running model predictions using model.predict() method.

Backwards compatibility

Keras 3 is intended to work as a drop-in replacement for tf.keras (when using the TensorFlow backend). Just take your existing tf.keras code, make sure that your calls to model.save() are using the up-to-date .keras format, and you're done.

If your tf.keras model does not include custom components, you can start running it on top of JAX or PyTorch immediately.

If it does include custom components (e.g. custom layers or a custom train_step()), it is usually possible to convert it to a backend-agnostic implementation in just a few minutes.

In addition, Keras models can consume datasets in any format, regardless of the backend you're using: you can train your models with your existing tf.data.Dataset pipelines or PyTorch DataLoaders.

Why use Keras 3?

Read more in the Keras 3 release announcement.

keras (keras-team/keras)

neural-networks
Searching Database…

64.4K ·GitHub
What is this?Keras 3 is a multi-backend deep learning framework that lets you build and train models for computer vision, NLP, audio, timeseries, and recommender systems on top of JAX, TensorFlow, or PyTorch.
Is it a framework or just a wrapper around TensorFlow?It's a high-level framework that runs on top of whichever backend you pick (JAX, TensorFlow, or PyTorch), not tied to TensorFlow anymore, and can act as a drop-in replacement for tf.keras.
How do I install it and pick a backend?Install with pip (keras package), then install your backend of choice (tensorflow, jax, or torch); configure the active backend via the KERAS_BACKEND environment variable or the ~/.keras/keras.json config file before importing keras.
Which backends does it support and what are the minimum versions?TensorFlow ≥2.16.1, JAX ≥0.4.20, PyTorch ≥2.1.0, and OpenVINO ≥2026.2.0 for inference-only; GPU support needs a pre-installed NVIDIA driver plus the backend-specific CUDA requirements file.
Any install pitfalls on Windows, or restrictions with the OpenVINO backend?Windows isn't directly supported for local installs — the README recommends using WSL2; also the OpenVINO backend only supports running predictions, not training.
Who is this for — researchers only, or production teams too?Both: it targets everyone from solo developers prototyping on a laptop to large companies scaling training across GPU/TPU clusters, with nearly three million developers already using it.
Why pick one backend over another?You can choose whichever backend is fastest for your model architecture — JAX is often the speed winner, with reported speedups of 20% to 350% versus other frameworks — while still keeping the same high-level Keras API.
Will my existing tf.keras code still work?Yes, if it uses standard components it can run unchanged, and even custom layers or training steps usually only need a few minutes of changes to become backend-agnostic.
Can I mix Keras with native PyTorch or JAX code?Yes — you can train a Keras model inside a training loop written from scratch in native TF, JAX, or PyTorch, or embed it as part of a PyTorch Module or JAX model function.
What happened to Keras 2?Keras 2 still exists but has been renamed and is distributed separately as the 'tf-keras' package on PyPI.
Creator
keras-team
Size
56.3 MB
Stars
64.4K
Age
11y
Commits · 90 Days