New: OpenVINO backend
OpenVINO is now available as an infererence-only Keras backend. You can start using it by setting the backend
field to "open_vino"
in your keras.json
config file.
OpenVINO is a deep learning inference-only framework tailored for CPU (x86, ARM), certain GPUs (OpenCL capable, integrated and discrete) and certain AI accelerators (Intel NPU).
Because OpenVINO does not support gradients, you cannot use it for training (e.g. model.fit()
) -- only inference. You can train your models with the JAX/TensorFlow/PyTorch backends, and when trained, reload them with the OpenVINO backend for inference on a target device supported by OpenVINO.
New: ONNX model export
You can now export your Keras models to the ONNX format from the JAX, TensorFlow, and PyTorch backends.
Just pass format="onnx"
in your model.export()
call:
# Export the model as a ONNX artifact
model.export("path/to/location", format="onnx")
# Load the artifact in a different process/environment
ort_session = onnxruntime.InferenceSession("path/to/location")
# Run inference
ort_inputs = {
k.name: v for k, v in zip(ort_session.get_inputs(), input_data)
}
predictions = ort_session.run(None, ort_inputs)
New: Scikit-Learn API compatibility interface
It's now possible to easily integrate Keras models into Sciki-Learn pipelines! The following wrapper classes are available:
keras.wrappers.SKLearnClassifier
: implements the sklearnClassifier
APIkeras.wrappers.SKLearnRegressor
: implements the sklearnRegressor
APIkeras.wrappers.SKLearnTransformer
: implements the sklearnTransformer
API
Other feature additions
- Add new ops:
- Add
keras.ops.diagflat
- Add
keras.ops.unravel_index
- Add
- Add new activations:
- Add
sparse_plus
activation - Add
sparsemax
activation
- Add
- Add new image augmentation and preprocessing layers:
- Add
keras.layers.RandAugment
- Add
keras.layers.Equalization
- Add
keras.layers.MixUp
- Add
keras.layers.RandomHue
- Add
keras.layers.RandomGrayscale
- Add
keras.layers.RandomSaturation
- Add
keras.layers.RandomColorJitter
- Add
keras.layers.RandomColorDegeneration
- Add
keras.layers.RandomSharpness
- Add
keras.layers.RandomShear
- Add
- Add argument
axis
totversky
loss
JAX specific changes
- Add support for JAX named scope
TensorFlow specific changes
- Make
keras.random.shuffle
XLA compilable
PyTorch specific changes
- Add support for
model.export()
andkeras.export.ExportArchive
with the PyTorch backend, supporting both the TF SavedModel format and the ONNX format.
New Contributors
- @LavanyaKV1234 made their first contribution in #20553
- @jakubxy08 made their first contribution in #20563
- @dhantule made their first contribution in #20565
- @roebel made their first contribution in #20575
- @Surya2k1 made their first contribution in #20613
- @edge7 made their first contribution in #20584
- @adrinjalali made their first contribution in #20599
- @mmicu made their first contribution in #20655
- @rkazants made their first contribution in #19727
- @lkk7 made their first contribution in #20682
- @Furkan-rgb made their first contribution in #20684
- @punkeel made their first contribution in #20694
- @kas2020-commits made their first contribution in #20709
Full Changelog: v3.7.0...v3.8.0