Registry / ai-ml / keras-nightly

keras-nightly

JSON →
library3.15.0.dev2026061405pypypiunverified

Keras 3 is a multi-backend deep learning framework that supports JAX, TensorFlow, PyTorch, and OpenVINO (for inference-only). The `keras-nightly` package provides daily development builds of Keras, offering access to the latest features and bug fixes. It focuses on accelerated model development and state-of-the-art performance by leveraging backend-specific optimizations.

pip install keras-nightly
INSTALL
IMPORT
SIG · KERAS-NIGHTLY
K
keras-nightly
ai-mlpythonv3.15.0.dev2026061405
Install
34.9s avg
Import
14270ms
Disk
849MB
Pass rate
1/ 10
Env Coverage1 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.12.0.dev2025100703 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 34.93s
py 3.11
4/16 runs
15/16 runs
py 3.12
4/16 runs
15/16 runs
py 3.13
4/16 runs
12/16 runs
py 3.9
✕ timeout
15/16 runs
849MB installed
● package 849MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

keras
import keras
import keras

This quickstart demonstrates how to set a Keras backend, load data, build a sequential convolutional neural network, compile it, and train it using Keras 3. Ensure a backend (e.g., TensorFlow) is installed and the `KERAS_BACKEND` environment variable is set before importing `keras`.

import os import keras import numpy as np # Configure the Keras backend (e.g., 'tensorflow', 'jax', 'torch') os.environ["KERAS_BACKEND"] = "tensorflow" # Load a dataset (x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data() x_train = x_train.astype("float32") / 255 x_test = x_test.astype("float32") / 255 x_train = np.expand_dims(x_train, -1) x_test = np.expand_dims(x_test, -1) # Build a simple model model = keras.Sequential( [ keras.layers.Input(shape=(28, 28, 1)), keras.layers.Conv2D(32, kernel_size=(3, 3), activation="relu"), keras.layers.MaxPooling2D(pool_size=(2, 2)), keras.layers.Conv2D(64, kernel_size=(3, 3), activation="relu"), keras.layers.MaxPooling2D(pool_size=(2, 2)), keras.layers.Flatten(), keras.layers.Dropout(0.5), keras.layers.Dense(10, activation="softmax"), ] ) # Compile the model model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"]) # Train the model model.fit(x_train, y_train, batch_size=128, epochs=5, validation_split=0.1) # Evaluate the model loss, accuracy = model.evaluate(x_test, y_test) print(f"Test accuracy: {accuracy:.4f}")
Debug
Known issues
breakingKeras 3.13.0 and newer versions require Python 3.11 or higher. Using older Python versions will result in installation or runtime errors.
fix
Upgrade your Python environment to 3.11 or newer.
affects: >=3.13.0
breakingThe `tensorflow.keras` namespace is deprecated for Keras 3.x. All imports should be directly from `keras` (e.g., `import keras`, `from keras import layers`).
fix
Update all `from tensorflow.keras import ...` statements to `from keras import ...` and `tf.keras.` prefixes to `keras.`.
affects: Keras 3.x
breakingSaving models to the TensorFlow SavedModel format via `model.save()` is no longer supported in Keras 3. Loading TensorFlow SavedModels via `keras.models.load_model()` is also not supported.
fix
For saving, use the native Keras format (`.keras` extension) with `model.save()`. For SavedModel export, use `model.export(filepath)`. For loading existing TensorFlow SavedModels for inference in Keras 3, use `keras.layers.TFSMLayer(saved_model_path, call_endpoint='serving_default')`.
affects: Keras 3.x
gotchaKeras-nightly builds are development versions and may contain bugs, incomplete features, or unstable APIs. They are not recommended for production environments.
fix
For stable production applications, use the `keras` package (stable release) instead of `keras-nightly`.
affects: All nightly builds
gotchaThe Keras backend (TensorFlow, JAX, or PyTorch) must be configured *before* the first `import keras` statement in your application. Changing the backend after import is not supported.
fix
Set the `KERAS_BACKEND` environment variable (e.g., `os.environ["KERAS_BACKEND"] = "tensorflow"`) or edit the `~/.keras/keras.json` config file before importing `keras`.
affects: Keras 3.x
gotchaWhen using the TensorFlow backend with Keras 3 on GPU, `jit_compile` for `Model` is `True` by default. This can cause XLA-related errors if your custom layers or models use TensorFlow operations not supported by XLA.
fix
If you encounter XLA errors with custom components, set `jit_compile=False` in your `Model` constructor: `model = keras.Model(..., jit_compile=False)`.
affects: Keras 3.x with TensorFlow backend on GPU
Upgrade
Version history
3.15.0.dev2026061405latest on PyPI · released Jun 14, 2026
Audit
Dependencies
pythonrequiredKeras 3.x requires Python 3.11 or higher.
tensorflowoptionalOne of the supported deep learning backends for Keras 3.
jaxoptionalOne of the supported deep learning backends for Keras 3.
torchoptionalOne of the supported deep learning backends for Keras 3.
openvinooptionalAn inference-only backend supported by Keras 3.
Agent activity
24 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources