← AI Terminology

Keras

Keras is a high-level deep learning API that provides a clean, modular interface for building and training neural networks — originally a standalone library, now the official high-level API of TensorFlow, and as of Keras 3 a multi-backend framework supporting TensorFlow, JAX, and PyTorch.

It is designed for fast experimentation with minimal boilerplate.
Why It Matters in AI
Keras democratised deep learning: its model.compile() / model.fit() API let researchers and practitioners build working neural networks in minutes rather than days. It became the standard entry point for TensorFlow, making Google's ML ecosystem accessible. Keras 3 (2024) re-introduced true multi-backend support, letting the same model code run on TensorFlow, JAX, or PyTorch — positioning it as a universal high-level layer.
Key Points
Aspect Description
Creator François Chollet (Google), first released 2015; integrated into TensorFlow 2.0 (2019)
Keras 3 Multi-backend: KERAS_BACKEND=jax/tensorflow/torch — same code runs on all three
API style Sequential API (stack layers), Functional API (DAG), Subclassing API (custom models)
Callbacks EarlyStopping, ModelCheckpoint, ReduceLROnPlateau, TensorBoard — plug into training
Applications keras.applications: pre-trained models (ResNet, VGG, EfficientNet, MobileNet) ready to use
model.fit() High-level training loop with callbacks, metrics, validation — replaces manual training code
Simple Analogy
A LEGO instruction booklet for neural networks: instead of understanding how each plastic piece is moulded, you snap standardised blocks together (layers), follow the build steps (compile, fit), and get a working model. Advanced builders can still design custom pieces (subclassing), but the standard blocks cover most needs.
Common Usage Examples
  • model = keras.Sequential([Dense(128, activation='relu'), Dense(10, activation='softmax')])
  • model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])
  • model.fit(X_train, y_train, epochs=20, validation_split=0.2, callbacks=[EarlyStopping(patience=3)])
  • Transfer learning: base = keras.applications.EfficientNetB0(include_top=False); model = keras.Model(inputs=base.input, outputs=Dense(5)(base.output))
  • Keras 3: os.environ['KERAS_BACKEND'] = 'jax'; import keras — same model runs on JAX backend
Summary
In short: Keras is the high-level deep learning API that made neural network development accessible — and as Keras 3, it is evolving into a universal layer over TensorFlow, JAX, and PyTorch.