keras-team /keras

Deep Learning for humans

★ 64,419⑂ 19,821👁 1,848⑃ 10,224● 13,070▤ 93◈ 92
PythonApache-2.0Created 2015-03-28keras.io/
64,419
stars
+2
19,821
forks
1,848
watchers
10,224
prs
13,070
issues
93
releases
92
discussions

README

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.

- Accelerated model development: Ship deep learning solutions faster thanks to the high-level UX of Keras
and the availability of easy-to-debug runtimes like PyTorch or JAX eager execution.
- State-of-the-art performance: By picking the backend that is the fastest for your model architecture (often JAX!),
leverage speedups ranging from 20% to 350% compared to other frameworks. Benchmark here.
- Datacenter-scale training: Scale confidently from your laptop to large clusters of GPUs or TPUs.

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


2. 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.

3. (Optional) Install remote file access support.

To save to and load from Google Cloud Storage (gs:// paths) without TensorFlow, install the gcs extra:


pip install "keras[gcs]"


 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


2. Run installation command from the root directory.


python pip_build.py --install


3. 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.6.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:

shell
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


 C

Top issues

Discussions

Latest release

Keras 3.12.4 v3.12.4 2026-07-29
Keras 3.12.4

Keras 3.12.4 is a security patch release that hardens dataset loading and model file handling against insecure deserialization and decompression-bomb attacks.

 Security Fixes

 Restrict unpickling when loading IMDB and Reuters datasets — Replaces np.load(allow_pickle=True) with a restricted unpickler that only permits numpy array reconstruction, preventing arbitrary code execution via crafted .npz files (CWE-502). (23047) by @LinZiyuu
 Verify all intermediary H5 groups when navigating H5 files — Manually resolves nested H5 group paths to verify group types at each step, p

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON