Skip to content

Commit 616bc30

Browse files
authored
Document OpenVINO backend support (#2028)
* Document OpenVINO backend support Signed-off-by: Kazantsev, Roman <[email protected]> * Update templates/keras_3/keras_3_announcement.md * Apply suggestions from code review --------- Signed-off-by: Kazantsev, Roman <[email protected]>
1 parent b7a95a5 commit 616bc30

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

templates/keras_3/keras_3_announcement.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
After five months of extensive public beta testing,
22
we're excited to announce the official release of Keras 3.0.
33
Keras 3 is a full rewrite of Keras that enables you to
4-
run your Keras workflows on top of either JAX, TensorFlow, or PyTorch, and that
5-
unlocks brand new large-scale model training and deployment capabilities.
4+
run your Keras workflows on top of either JAX, TensorFlow, PyTorch, or OpenVINO (for inference-only),
5+
and that unlocks brand new large-scale model training and deployment capabilities.
66
You can pick the framework that suits you best,
77
and switch from one to another based on your current goals.
88
You can also use Keras as a low-level cross-framework language
@@ -257,6 +257,32 @@ as long as you've implemented the stateful version (e.g. `call()` or `update_sta
257257

258258
---
259259

260+
## Run inference with the OpenVINO backend.
261+
262+
Starting with release 3.8, Keras introduces the OpenVINO backend that is an inference-only backend,
263+
meaning it is designed only for running model predictions using `predict()` method.
264+
This backend enables to leverage OpenVINO performance optimizations directly
265+
within the Keras workflow, enabling faster inference on OpenVINO supported hardware.
266+
267+
To switch to the OpenVINO backend, set the KERAS_BACKEND environment variable
268+
to `"openvino"` or specify the backend in the local configuration file at `~/.keras/keras.json`.
269+
Here is an example of how to infer a model (trained with PyTorch, JAX, or TensorFlow backends),
270+
using the OpenVINO backend:
271+
272+
```python
273+
import os
274+
os.environ["KERAS_BACKEND"] = "openvino"
275+
import keras
276+
277+
loaded_model = keras.saving.load_model(...)
278+
predictions = loaded_model.predict(...)
279+
```
280+
281+
Note that the OpenVINO backend may currently lack support for some operations.
282+
This will be addressed in upcoming Keras releases as operation coverage is being expanded.
283+
284+
---
285+
260286
## Moving from Keras 2 to Keras 3
261287

262288
Keras 3 is highly backwards compatible with Keras 2:

theme/landing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h1 class="mb-5">Simple. Flexible. Powerful.</h1>
7777
<div class="row">
7878
<div class="col-xl-8 mx-auto" id="announcement-box">
7979
Keras is now available for<br>
80-
JAX, TensorFlow, and PyTorch!<br>
80+
JAX, TensorFlow, PyTorch, and OpenVINO!<br>
8181
<a href="/keras_3/" id="announcement-link">Read the Keras 3.0 release announcement</a>
8282
</div>
8383
</div>

0 commit comments

Comments
 (0)