Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #20978

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update README.md #20978

wants to merge 1 commit into from

Conversation

FNICKE
Copy link

@FNICKE FNICKE commented Mar 2, 2025

To Look Attractive

🚀 Keras 3: Deep Learning for Humans

Keras 3 is a multi-backend deep learning framework, with support for JAX, TensorFlow, PyTorch, and OpenVINO (for inference-only).
Effortlessly build and train models for:
📸 Computer Vision | 📝 Natural Language Processing | 🎵 Audio Processing | ⏳ Time Series Forecasting | ⭐ Recommender Systems

🔥 Why Choose Keras 3?

Accelerated Model Development – Ship deep learning solutions faster with an intuitive high-level API.
State-of-the-Art Performance – Pick the fastest backend for your architecture (often JAX! 🚀). [🔗 Benchmark Here](https://keras.io/getting_started/benchmarks/)
Datacenter-Scale Training – Seamlessly scale from laptop to large GPU/TPU clusters.

Join nearly three million developers 🌎—from startups to global enterprises—in harnessing the power of Keras 3.


📥 Installation

🔹 Install with pip

Keras 3 is available on PyPI as keras. (Keras 2 remains available as tf-keras.)

1️⃣ Install Keras:

pip install keras --upgrade

2️⃣ Install Backend Package(s):
To use keras, install at least one backend: tensorflow, jax, or torch.
🔹 TensorFlow is required for some features like preprocessing layers and tf.data pipelines.


💻 Local Installation

🏗️ Minimal Installation

Keras 3 is compatible with Linux & macOS.
🪟 Windows users: Use WSL2 for best support.

📌 Steps to install a local development version:

1️⃣ Install dependencies:

pip install -r requirements.txt

2️⃣ Run installation command:

python pip_build.py --install

3️⃣ Run API generation script when updating public APIs:

./shell/api_gen.sh

⚡ Adding GPU Support

The requirements.txt installs CPU-only versions of TensorFlow, JAX, and PyTorch.
For GPU support, use requirements-{backend}-cuda.txt files.

Example: Setting up a JAX GPU environment with conda:

conda create -y -n keras-jax python=3.10
conda activate keras-jax
pip install -r requirements-jax-cuda.txt
python pip_build.py --install

🔧 Configuring Your Backend

🛠️ Set the backend using an environment variable or by editing ~/.keras/keras.json.
Available backends: "tensorflow", "jax", "torch", "openvino"

📌 Example: Setting JAX as the backend

export KERAS_BACKEND="jax"

📌 In Google Colab:

import os
os.environ["KERAS_BACKEND"] = "jax"
import keras

🚨 Note: The backend must be configured before importing keras, and it cannot be changed after import.
🚀 OpenVINO Backend is inference-only – use it for model.predict() tasks.


🔄 Backwards Compatibility

Keras 3 works as a drop-in replacement for tf.keras (when using TensorFlow backend).
✔️ For existing tf.keras code – update your model.save() calls to the .keras format.
✔️ Custom components? Convert them to a backend-agnostic version in minutes!
✔️ Supports both tf.data.Dataset and PyTorch DataLoaders.


To Look Attractive
Copy link

google-cla bot commented Mar 2, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.44%. Comparing base (c356cae) to head (b719608).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #20978   +/-   ##
=======================================
  Coverage   82.44%   82.44%           
=======================================
  Files         561      561           
  Lines       53217    53217           
  Branches     8244     8244           
=======================================
  Hits        43874    43874           
  Misses       7336     7336           
  Partials     2007     2007           
Flag Coverage Δ
keras 82.26% <ø> (ø)
keras-jax 64.02% <ø> (ø)
keras-numpy 58.83% <ø> (ø)
keras-openvino 32.64% <ø> (ø)
keras-tensorflow 64.46% <ø> (ø)
keras-torch 64.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gbaned
Copy link
Collaborator

gbaned commented Mar 4, 2025

Hi @FNICKE Can you please sign the CLA? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants