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
CTop issues
#19571MLX Backend 59 comments · 2024-04-20#18442🚀 Contributing to Keras: Open Projects, Ideas and Roadmap 🚀56 comments · 2023-07-14#19246[BUG][all_reduce] INVALID_ARGUMENT: You must feed a value for placeholder tensor26 comments · 2024-03-01#18467Keras 2 <> Keras 3 incompatibilities18 comments · 2023-05-29#23696Migrate internal `ops.*` calls to `backend.ops.*`16 comments · 2026-09-20#21801`plot_model` `rankdir="LR"` does not show U-shape plot for a UNet14 comments · 2025-10-30#21785`keras.ops.` in `tf.data` regardless of backends14 comments · 2025-10-26#19230Backend-Agnostic Types14 comments · 2024-02-26
Discussions
#24095Proposal: a portability auditor for user-defined Keras layers and models0 comments · 2026-10-29#23237PerNodeDrop: A Practical and Efficient Alternative to DropConnect:- – Exploring Node-Owned Stochasticity0 comments · 2026-07-09#23090PerNodeDrop: A Practical and Efficient Alternative to DropConnect:- – Exploring Node-Owned Stochasticity1 comments · 2026-06-14#23079MCP to help OSS devs understand keras-team/keras0 comments · 2026-06-12#22888[Question] Is the validation behavior in keras.ops.conv_transpose intentionally different between symbolic and eager paths?3 comments · 2026-05-13#22299Validation R2 drastically different in Keras 3 (eager mode) compared to Keras 2 (graph mode)2 comments · 2026-02-26#22144Question about intended behavior of is_continuous_axis for decreasing axes1 comments · 2026-02-10#21872Validation progress0 comments · 2025-11-26
Latest release
Keras 3.12.4 v3.12.4 2026-07-29Keras 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