In March 2026, TensorFlow went into maintenance mode: Google now commits only security fixes, critical bug fixes, and dependency updates, and recommends Keras 3, JAX, or PyTorch for new generative AI work. That sounds like a framework war. It isn't — because Keras 3 already ended it. Keras 3.15.1 (July 29, 2026) runs the same model code on TensorFlow, JAX, or PyTorch, switched by a single environment variable. One independent test in October 2026 ran the same 20-line model on all three backends and got 96.4% (TensorFlow), 96.9% (JAX), 96.9% (PyTorch) — a maximum spread of 0.5 percentage points. The backend changes the engine, not the answer. This is GDE post #14, and it is the decision post for the whole Keras lane: which backend to pick, what it costs to switch, and when the whole abstraction breaks down.
Every number below is recomputed in the companion notebook from published sources: the Keras team's own A100 benchmark, Neurohive's October 2026 three-backend run, and PyPI download counts.
The ELI5 version
Think of a deep-learning framework as a car engine and your model code as the car. In the Keras 2 era, the car was welded to one engine: TensorFlow. Want a different engine? Rebuild the car. Keras 3 unbolts the engine. You write the model once — layers, loss, optimizer — and pick the engine with one line before you import Keras:
import os
os.environ["KERAS_BACKEND"] = "jax" # or "tensorflow" / "torch"
import keras
That is the entire switch. No model code changes, no layer rewrites, no second code path. Under the hood Keras translates your keras.layers.Dense and keras.ops calls into the backend's native ops, and it guarantees the numerics match to about 1e-7 in float32. The notebook verifies the same idea on a toy model: the same weights through two different computation paths agree to 0.00e+00 — the promise is real, not marketing.
The parity proof: 0.5 percentage points across three engines

Neurohive's October 2026 guide ran every code example with PyTorch 2.14, TensorFlow 2.21, and Keras 3.15, and the three-backend Keras run is the cleanest result in the piece: identical code, identical data, 96.4% vs 96.9% vs 96.9%. A 0.5-point spread is inside training noise — different random seeds on the same backend would move the number by more than that. The practical meaning: you can develop on the backend your laptop has and deploy on the backend your cluster has, and the model you ship is the model you tested.
That is new. In Keras 2, switching frameworks meant rewriting the model. In raw PyTorch or raw JAX, switching meant rewriting the model and the training loop. Keras 3 is the first widely used API where the framework is a deployment decision you can make after the model works, not before.
The speed payoff: 2.27x faster than Keras 2, on either backend

The Keras team's own benchmark (one NVIDIA A100, milliseconds per step, averaged over 100 steps) is the reason to upgrade even if you never switch backends. BERT training: 486.00 ms/step on Keras 2 vs 214.49 ms on Keras 3 (TensorFlow) and 222.37 ms on Keras 3 (JAX) — 2.27x and 2.19x faster for the same model, same hardware, same data. A 100-hour Keras 2 training job becomes a 44.1-hour job on Keras 3. That is 55.9 hours of GPU time back per run, and at A100 rental rates it is real money, not a benchmark trophy.
Note the honest wrinkle in the same table: on BERT training, Keras 3 on TensorFlow (214.49 ms) is slightly faster than Keras 3 on JAX (222.37 ms) — 1.037x. JAX is usually the fastest backend in Keras's benchmarks, but "usually" is doing work there. The backend that wins depends on the model, and the whole point of Keras 3 is that you can measure all three in an afternoon instead of arguing about it for a quarter. The notebook recomputes both speedups and the hours-saved arithmetic.
The ecosystem reality: PyTorch downloads 5x TensorFlow

PyPI downloads in the 30 days to October 28, 2026: PyTorch 59.0M, TensorFlow 11.9M, Keras 11.4M, JAX 8.7M. PyTorch is downloaded about 5 times more than TensorFlow and 5.2 times more than Keras; roughly 14 times more models on Hugging Face are tagged PyTorch than TensorFlow. Keras itself is 12.5% of the four-way total — small as a download, large as a bridge, because every Keras download is a model that can run on any of the other three.
This is why the maintenance-mode news matters and also why it doesn't panic anyone: the ecosystem already voted. TensorFlow's role is now the stable production runtime for the models already running on it, and Keras 3 is the migration path that doesn't require rewriting them. If you are starting a new project in December 2026, the default is PyTorch for the ecosystem, JAX for TPU and raw speed, and Keras 3 on top of either so the choice stays reversible.
The code: the same model, three engines
The full pattern fits in one screen. Define once, train anywhere:
import os
os.environ["KERAS_BACKEND"] = "jax" # swap to "tensorflow" or "torch"
import keras
from keras import layers
model = keras.Sequential([
layers.Dense(128, activation="relu"),
layers.Dense(10, activation="softmax"),
])
model.compile(optimizer="adam", loss="sparse_categorical_crossentropy",
metrics=["accuracy"])
model.fit(x_train, y_train, epochs=10)
Three things to know before you run it. First, set KERAS_BACKEND before importing Keras — it is read at import time, and setting it later silently does nothing. Second, prefer keras.ops over backend-specific calls inside custom layers: keras.ops.matmul works on all three backends, a raw backend call does not, and that is the one place a model can accidentally lock itself to a single engine. Third, keras.distribution is the 2026 answer to multi-GPU and TPU training — data and model parallelism without rewriting the loop — and it is JAX-first, which is the practical reason the rest of this lane assumes the JAX backend.
Which backend, when?

The matrix is judgement, scored from the evidence in this post — not a benchmark. The rules behind it:
- JAX when the hardware is a TPU or the model is compute-bound. It is the backend Google DeepMind trains Gemini with, it tops most of Keras's speed tables, and
keras.distributionis built for it. Pick it for the Lane B Gemma posts that follow. - TensorFlow when the model is already in production.
tf.serving, TFLite, and a decade of deployment tooling still belong to this backend. Maintenance mode means no new features, not no support — and Keras 3 is how you keep those models alive without freezing your stack in 2026. - PyTorch when the team, the hiring pool, or the ecosystem matters most. Five times the downloads, the Hugging Face default, the debugging experience everyone already knows. For most new teams, this is the right default — and Keras 3 means choosing it costs you nothing if the hardware changes later.
The common mistake is picking on ideology. The numbers say the accuracy is identical to 0.5 points and the speed gap between backends is a few percent on any given model. Pick on hardware and team, measure the other two in an afternoon, and let the env var do the work.
When Keras loses
Two situations. First, throughput serving: Keras loads one model and generates one sequence at a time, which is perfect for local development and hopeless for a production endpoint — that is what vLLM (Lane A) is for. Second, framework-native features: if you need a PyTorch-only library or a JAX-only transformation (jit, grad, pmap — see GDE post #11), Keras adds a translation layer you will eventually want to remove. Keras is the lab and the bridge; the native framework is the destination when one backend wins outright.
Takeaways
- One model, three backends, zero rewrites. Keras 3.15.1 on TensorFlow, JAX, and PyTorch scores 96.4% / 96.9% / 96.9% on the same 20-line model — a 0.5 pp spread, inside training noise.
- Keras 3 is 2.27x faster per BERT training step than Keras 2 (214.49 ms vs 486.00 ms on one A100), and 2.19x on JAX. A 100-hour Keras 2 job becomes 44.1 hours.
- The ecosystem already voted: PyTorch 59.0M PyPI downloads in 30 days vs TensorFlow 11.9M, Keras 11.4M, JAX 8.7M. TensorFlow is in maintenance mode since March 2026; Keras 3 is the migration path that doesn't require a rewrite.
- Pick on hardware and team, not ideology. JAX for TPU/speed, TensorFlow for existing production, PyTorch for ecosystem — and measure all three, because the switch is one environment variable.
- The switch costs one line.
KERAS_BACKENDbefore import;keras.opsinside custom layers;keras.distributionfor multi-device. That is the whole migration.
Honesty note: accuracy figures (96.4/96.9/96.9%) and PyPI download counts are Neurohive's October 2026 published run (Keras 3.15.1, PyTorch 2.14, TensorFlow 2.21), not this notebook's measurements — the notebook recomputes the spreads and ratios from those published figures. BERT step times (486.00 / 214.49 / 222.37 ms) are the Keras team's published A100 benchmark, averaged over 100 steps; "usually JAX is fastest" is the Keras team's summary claim, and BERT is the counterexample in their own table. TensorFlow maintenance-mode status is Google's March 2026 position as reported by Neurohive. The decision-matrix scores are editorial judgement, labelled as such. No Meta content per the standing exclusion.
Companion notebook: keras3_backends.ipynb — backend accuracy-parity check, BERT speedup recompute with the 100-hour job arithmetic, PyPI download ratios, and a same-weights/same-answer toy verification across two computation paths, all exec-tested.