The whole track in one run
This lesson stitches together everything the track introduced separately. The .keras format (lesson 1), cross-backend loading (lesson 4), and export (lesson 5) aren't three unrelated tricks — they're three stages of one pipeline that carries a model from a fast training engine to a stable serving runtime without ever retraining it.
Three stages, three contexts
Stage 1 — train where it's fastest. Set the JAX backend, build and fit the model, and write a single model.keras. The optimizer state rides along, so this checkpoint is fully resumable. Stage 2 — load where it's stable. In a separate process with the TensorFlow backend selected, load_model reads the same file; the backend-agnostic weights mean nothing is lost in the handoff. Stage 3 — export for production. Project the loaded model onto a serving format with export, and ship it through TF Serving, TFLite, or TF.js.
Why the backend switch happens between processes
Notice each stage is its own script with its own KERAS_BACKEND. The backend is locked once import keras runs, so you can't flip engines mid-program — the switch lives at the process boundary, and the .keras file is what carries the model across that boundary intact. That file is the contract; the backends on either side are interchangeable.