Fact-checked by Grok 2 weeks ago

Keras

Keras is an open-source, high-level neural networks () written in , designed to facilitate fast experimentation and prototyping of models. It emphasizes user-friendliness, , and ease of , allowing developers to define and train complex models using simple, declarative while abstracting low-level details. Originally developed as an independent library, Keras now supports multiple backends including , , , and (for inference), enabling seamless portability across frameworks without altering core model . Developed by as part of the (Open-ended Neuro-Electronic Intelligent ) research project, Keras derives its name from the Greek word for "horn," inspired by a passage in Homer's . The library's initial version was released in late March 2015, with Keras 1.0 following in April 2016 after extensive community feedback and a near-complete rewrite to enhance stability and performance. By March 2017, with the release of Keras 2.0, it gained official integration as the high-level API for , marking a shift from standalone operation to deeper embedding within Google's ecosystem while maintaining . In November 2023, Keras 3.0 was officially released following a public beta period, representing a full rewrite that introduced true multi-backend compatibility and expanded support for data formats like arrays, DataFrames, DataLoaders, and tf.data Datasets. As of November 2025, the latest stable release is Keras 3.12.0. Key features include a functional for building arbitrary architectures, support for advanced techniques like model and quantization, and optimizations for distributed training and inference. Widely adopted for its simplicity and productivity, Keras powers applications at organizations such as , , and , contributing to advancements in fields like , , and generative AI.

Overview

Definition and Purpose

Keras is an open-source written in , designed to facilitate the building and training of models through a high-level, user-friendly . It serves as an that runs on top of underlying backends such as , , , or (for inference), thereby simplifying the development process while enhancing flexibility and performance. The primary purpose of Keras is to enable rapid experimentation and prototyping in deep learning by abstracting complex low-level operations, including tensor manipulations and numerical computations. At its core, Keras seeks to democratize deep learning by prioritizing developer productivity and ease of use over granular low-level control, allowing users to focus on model architecture and innovation rather than implementation details. This philosophy has made it particularly accessible to researchers, students, and practitioners seeking quick iterations without sacrificing the power of advanced deep learning techniques.

Design Principles

Keras embodies a user-centric philosophy, often described as "deep learning for humans," which prioritizes intuitive , rapid debugging, and minimal to reduce developer . This approach ensures that practitioners can focus on core problem-solving rather than low-level implementation details, making accessible to a broad audience including researchers and engineers. By emphasizing simplicity without sacrificing power—termed "simple but not simplistic"—Keras follows the principle of progressive disclosure of complexity, allowing users to start with basic models and scale to advanced architectures seamlessly. A of Keras' is , where components such as layers and models serve as reusable building blocks that can be stacked flexibly, akin to bricks, to construct complex neural networks efficiently. This modular structure promotes and code elegance, enabling fast and experimentation while keeping the lightweight and focused at the model level. Extensibility is another key principle, empowering users to define custom layers, loss functions, and optimizers through straightforward subclassing without modifying the core codebase. This design facilitates advanced research and integration of novel techniques, as custom components remain compatible across supported frameworks via standardized operations in keras.ops. To ensure portability, Keras maintains consistency across multiple backends, allowing the same codebase to run on engines like , , , or (for inference) with identical numerics and minimal adjustments. This backend-agnostic approach supports diverse workflows, from rapid prototyping in one framework to deployment in another, enhancing flexibility for production environments.

History

Origins and Early Development

Keras was created by , a software engineer at , in early 2015 as part of the (Open-ended Neuro-Electronic Intelligent ) research project. It was designed as a high-level neural networks to run on top of Theano, a then-popular backend. The project originated from Chollet's personal research efforts in , where he sought to streamline the process of building and experimenting with neural network models. Chollet's primary motivation stemmed from frustrations with the prevailing low-level frameworks like Theano, which demanded extensive even for straightforward models, hindering and iteration in research. He envisioned Keras as a user-friendly interface that prioritized simplicity, modularity, and extensibility, allowing developers to focus on architectural innovation rather than implementation details. This approach aligned with Chollet's goal of making more accessible to a broader audience beyond specialized experts. The initial public release occurred on March 27, 2015, marking Keras's debut as an open-source library under the . By April 2016, version 1.0 was launched, introducing a stable and expanded capabilities while maintaining Theano as the core backend; support for Microsoft's Cognitive Toolkit (CNTK) was added shortly thereafter to enhance compatibility with alternative computation engines. Early milestones included swift adoption within the research community for its efficiency in prototyping complex architectures, such as convolutional and recurrent neural networks, which accelerated experimentation in fields like and . By mid-2016, Keras had garnered thousands of users globally, evidenced by its integration into academic workflows and the influx of community-driven contributions via , including new layers and utilities that refined its core functionalities.

Integration with TensorFlow

In 2017, Google announced the integration of the Keras API into the core of as the tf.keras submodule, marking a significant step toward unifying high-level deep learning interfaces within the ecosystem. This move positioned Keras as the official high-level for , simplifying model development while leveraging 's underlying computational graph capabilities. The technical merger introduced tf.keras starting with TensorFlow 1.2, allowing developers to import and use Keras models and layers directly within without external dependencies. This submodule provided seamless interoperability, enabling Keras workflows to execute on TensorFlow's backend while maintaining the API's simplicity and modularity. As a result, users gained immediate access to TensorFlow's advanced features, such as distributed training across multiple GPUs or TPUs, and production deployment tools for serving models in environments like mobile devices or web services, all without requiring code rewrites. This integration culminated in TensorFlow 2.0, released in 2019, where Keras was designated as the default high-level API, emphasizing eager execution and intuitive model building. However, the shift presented transition challenges, including the gradual deprecation of the standalone Keras package in favor of tf.keras to reduce confusion and ensure compatibility. By June 2020, Keras 2.4.0 became the final independent release, redirecting all standalone APIs to tf.keras and establishing it as the sole implementation moving forward.

Evolution to Keras 3

Keras 3 was officially released on November 28, 2023, marking a significant milestone as a full rewrite of the framework that achieved complete independence from . This version introduced native multi-backend support, enabling seamless operation with , , and as primary backends, allowing users to switch dynamically for optimal performance without altering their code. The shift decoupled Keras from its previous exclusivity, which had been established in earlier integrations, fostering greater flexibility for researchers and developers across diverse ecosystems. Key updates in Keras 3 emphasized a unified that abstracts backend-specific details, utilizing keras.ops for consistent operations across layers, models, and metrics. This unification simplifies model portability and experimentation, while the addition of as an inference-only backend expanded deployment options for optimized inference on hardware. These enhancements addressed limitations in prior versions by prioritizing and performance, enabling workflows that leverage the strengths of each backend—such as JAX's for research-oriented tasks. From 2024 onward, Keras 3 saw iterative advancements focused on performance optimizations and deeper ecosystem integration. Releases like version 3.10.0 in May 2025 introduced weight sharding for handling large models and expanded support for over 50 operations, improving scalability in production environments. By July 2025, version 3.11.0 enhanced integration through compatibility with the NNX library, facilitating advanced research applications like custom training loops, alongside new ops for . Community-driven enhancements continued into 2025, with version 3.12.0 in October adding a model API for efficient compression and GPTQ quantization for int4 models, reflecting ongoing contributions from open-source collaborators. In early 2025, Keras faced a challenge with the disclosure of CVE-2025-12058 on October 29, 2025, a in the Keras.Model.load_model that allowed arbitrary local loading and server-side request (SSRF) via crafted .keras archives exploiting the StringLookup layer. Even with the safe_mode=True mitigation, attackers could access sensitive data during . The Keras team issued a in version 3.12.0, recommending users update to 3.12.0 or later and validate model sources to mitigate risks. This incident underscored the importance of secure in frameworks amid growing adoption.

Core Components

Models and Layers

In Keras, models serve as the primary containers for organizing layers into a cohesive structure that enables end-to-end and . The Model class encapsulates a of layers, defining inputs and outputs explicitly to facilitate flow through . This design allows models to handle complex architectures while providing methods for fitting , making predictions, and evaluating performance, all while managing the underlying computational graph. Layers form the atomic building blocks of Keras models, each implementing a tensor-in, tensor-out computation function that processes inputs to produce outputs, often while maintaining learnable state such as weights. Common examples include the Dense layer for fully connected operations, the Conv2D layer for applying 2D convolutions typically used in image processing, and the LSTM layer for handling sequential data through recurrent mechanisms. These layers are configurable with parameters like weights (e.g., matrices) and biases, which are updated during to optimize the model's . Key properties of layers include their input and output shapes, which are inferred from the layer's configuration and the shape of incoming tensors to ensure compatibility within a model. Layers also feature a trainability flag that controls whether their weights are updated during training, allowing selective freezing for techniques like . Additionally, many layers incorporate built-in operations such as activation functions (e.g., ReLU or ), applied directly to the output to introduce non-linearity. Model compilation is a crucial step that prepares a model for by specifying the optimizer (e.g., ), the function (e.g., sparse categorical crossentropy for tasks), and evaluation metrics (e.g., accuracy). This configuration defines the optimization objective and monitoring criteria, enabling efficient gradient computation and across the entire model. For instance, models can be compiled as compile(model, optimizer='adam', loss='sparse_categorical_crossentropy'), tailoring the process to the specific problem.

APIs: Sequential and Functional

Keras provides two primary application programming interfaces () for defining models: the Sequential API and the Functional API. These leverage layers as the fundamental building blocks to construct models, enabling users to assemble architectures tailored to specific tasks. The Sequential API facilitates the creation of models as a linear stack of layers, making it suitable for straightforward, architectures without branching or multiple inputs. Users instantiate a Sequential model and append layers sequentially, either by passing a list during initialization or using the add() method. For instance, a simple model can be defined as follows:
python
from keras import layers
model = layers.Sequential([
    layers.Dense(128, activation='relu'),
    layers.Dense(10)
])
This automatically infers the input shape upon the first or when explicitly specified, building the model's weights accordingly. It is ideal for quick prototyping of simple neural networks, such as multi-layer perceptrons, due to its simplicity and ease of use for . However, the Sequential is limited to linear topologies and cannot handle models with multiple inputs, outputs, or shared layers. In contrast, the Functional API enables the construction of more complex models by treating layers as callable objects within a (DAG), supporting non-linear , multiple inputs and outputs, and layer sharing. Models are built by defining input tensors with keras.Input(), applying layers via functional calls (e.g., output = Dense(32)(input_tensor)), and instantiating a Model object with the inputs and outputs. An example for a multi-input model, such as one text title, body, and tags for prioritization, is:
python
from keras import layers
title_input = layers.Input(shape=(20,), name='title')
body_input = layers.Input(shape=(100,), name='body')
tags_input = layers.Input(shape=(5,), name='tags')
title_features = layers.Dense(64, activation='relu')(title_input)
body_features = layers.Dense(64, activation='relu')(body_input)
tags_features = layers.Dense(32, activation='relu')(tags_input)
features = layers.concatenate([title_features, body_features, tags_features])
priority_output = layers.Dense(1, activation='sigmoid', name='priority')(features)
model = layers.Model(inputs=[title_input, body_input, tags_input], outputs=priority_output)
This API excels in scenarios requiring advanced topologies, such as siamese networks, residual connections in models like ResNet, or multi-output predictions, offering built-in validation and serialization capabilities. Unlike the , it accommodates arbitrary connections between layers, making it the recommended choice for most production-level applications beyond simple stacks. The choice between the Sequential and Functional APIs depends on the model's complexity: the Sequential API is preferred for of linear models, while the Functional API is essential for advanced architectures involving branching, merging, or reuse of layers. For even greater flexibility, Keras supports a subclassing approach by inheriting from keras.Model, allowing users to implement fully custom models with arbitrary logic in the call() method. In this method, layers are defined in the __init__() constructor, and the forward pass is overridden in call(), enabling dynamic behaviors not possible in static graph-based APIs. A basic example is:
python
from keras import layers
class CustomModel(layers.Model):
    def __init__(self):
        super().__init__()
        self.dense1 = layers.Dense(32, activation='relu')
        self.dense2 = layers.Dense(5, activation='softmax')

    def call(self, inputs):
        x = self.dense1(inputs)
        return self.dense2(x)
model = CustomModel()
This subclassing API is particularly useful for research-oriented or highly dynamic models, such as tree-recursive neural networks, where control flow depends on input data, though it requires manual implementation of serialization methods for reproducibility.

Features and Capabilities

Backend Support

Keras 3 introduces a multi-backend architecture, allowing the same high-level to run on , , , or (for inference only). This design decouples the frontend from the underlying computation engine, enabling seamless integration with diverse ecosystems and hardware. Backend selection in Keras 3 is flexible and can be configured programmatically via keras.config.set_backend(), by setting the KERAS_BACKEND environment variable, or through the ~/.keras/keras.json configuration file, with as the default. For instance, developers can switch to for research-oriented tasks by executing keras.config.set_backend('jax') before importing other modules, ensuring code portability without modifications. This approach includes automatic fallback mechanisms if a preferred backend is unavailable, promoting robustness across environments. The primary advantages of this multi-backend support lie in reduced and enhanced flexibility: the same model code can leverage JAX's high-performance transformations on TPUs and GPUs, TensorFlow's production-scale deployment tools, PyTorch's dynamic computation graphs for , or OpenVINO's optimizations for edge . Performance trade-offs exist, with JAX often providing the best speed on accelerators due to its , while numerics remain consistent across backends up to approximately 1e-7 precision in float32, though differences in or pooling operations may arise. This portability extends to data pipelines, supporting formats like tf.data.Dataset, PyTorch DataLoader, arrays, and Pandas DataFrames without alteration. However, limitations persist, as not all Keras features are uniformly available across backends—for example, certain TensorFlow-specific probability distributions may be absent in , and currently lacks support for some operations, though expansions are planned in future releases. Performance is model-dependent, with no single backend universally superior; for instance, may outperform on specific GPU workloads. This multi-backend capability represents a significant evolution from earlier versions, restoring and enhancing the original vision of framework-agnostic development introduced in Keras's origins.

Key Functionalities

Keras provides preprocessing layers for data preparation, particularly for tasks. These layers enable real-time data augmentation by applying transformations such as , width/height shifts, shearing, zooming, horizontal flips, and directly within the model, thereby enhancing model generalization and mitigating . Layers like RandomRotation, RandomTranslation, RandomZoom, RandomFlip, and Normalization can be stacked before the core model layers to generate augmented data during training. Keras also supports loading image datasets via image_dataset_from_directory, which creates a tf.data.Dataset from directory structures, compatible with multi-backend workflows. Keras includes a suite of built-in optimizers for gradient-based parameter updates during training, such as (SGD), which applies and acceleration to accelerate convergence, and , an adaptive method that computes individual s for each parameter based on first- and second-moment estimates. These optimizers can be configured with parameters like , decay, and clipnorm to suit specific training dynamics. Complementing optimizers, Keras provides loss functions to measure prediction errors, including categorical cross-entropy for multi-class classification tasks, which computes the cross-entropy loss between true one-hot encoded labels and predicted probability distributions. Other probabilistic losses, such as binary cross-entropy for and sparse categorical cross-entropy for integer labels, are also available. For flexibility, users can implement custom optimizers and losses by subclassing the keras.optimizers.Optimizer base class or defining callable functions that return scalar tensors, ensuring compatibility with the multi-backend architecture. Callbacks in Keras serve as modular hooks into the training lifecycle, allowing dynamic adjustments and monitoring without altering core model code. The EarlyStopping callback monitors a specified , such as validation loss, and terminates training if it fails to improve for a defined number of epochs (patience), restoring the best weights to prevent . Similarly, ModelCheckpoint saves the model or its weights at the end of each or when a metric improves, configurable to monitor validation accuracy or loss and save only the best-performing version. These and other callbacks, like ReduceLROnPlateau for rate reduction, are passed as a list to the fit() method and executed at events such as epoch ends or batch completions. Evaluation metrics in Keras quantify model performance beyond , with built-in options for tasks including accuracy, which measures the proportion of correct predictions, , which calculates the ratio of true positives to predicted positives, and , which assesses true positives relative to actual positives. These metrics support , categorical, and multiclass scenarios, with variants like binary accuracy for two-class problems and top-k categorical accuracy for ranking-based . Custom metrics can be defined as functions returning scalar values or by subclassing the keras.metrics.[Metric](/page/Metric) class, enabling domain-specific assessments like F1-score combinations of . All metrics accumulate state across batches and can be reset, updated, and aggregated to provide aggregated results at ends.

Usage and Implementation

Building and Training Models

Keras provides a streamlined workflow for building and training models, consisting of three primary steps: defining the model architecture, compiling the model with training configurations, and fitting the model to data. Models are defined using high-level such as the Sequential or Functional , which allow stacking layers into a computational . Once defined, the model is compiled by specifying an optimizer (e.g., or SGD), a (e.g., categorical for tasks), and optional metrics (e.g., accuracy or ) via the compile() method; this step prepares the model for training by configuring the underlying backend operations. The training process is then initiated with the fit() method, which accepts training data, the number of epochs, batch size, and validation data to monitor performance and prevent . Data handling in Keras is flexible to accommodate various scales and formats during training. The fit() method directly supports inputs like NumPy arrays or pandas DataFrames for small to medium datasets, automatically handling batching, shuffling, and splitting (e.g., via the validation_split parameter to reserve a fraction of data for validation). For large-scale training, Keras integrates seamlessly with tf.data.Dataset for efficient, prefetching data pipelines when using the TensorFlow backend, or PyTorch's DataLoader when using the PyTorch backend, as well as custom generators like Keras' Sequence class, which enables on-the-fly data augmentation and multiprocessing with parameters such as workers and use_multiprocessing to parallelize loading from disk or databases. For the TensorFlow backend, distributed training in Keras leverages 's tf.distribute API to scale across multiple GPUs or s with minimal code changes, primarily through . A such as MirroredStrategy is created to detect and utilize available devices (typically 2 to GPUs on a single host), and model definition, compilation, and fitting are scoped within strategy.scope() to replicate variables and synchronize gradients across devices. The fit() method then trains using a global batch size, distributing data subsets to each device while aggregating updates; this approach supports synchronous execution and is compatible with callbacks for checkpointing. For setups, TPUStrategy extends this to cloud environments like Cloud s. Additionally, for the JAX backend, Keras provides the keras.distribution API (e.g., DataParallel) for multi-device training using concepts like DeviceMesh and TensorLayout. Model in Keras facilitates persistence and deployment through saving and loading mechanisms that preserve , weights, and . The full model can be saved in the portable .keras format using model.save(filepath), which includes the , weights, optimizer , and details in a zip archive; it is reloaded via keras.models.load_model(filepath), reconstructing the exact model for continued or . For weights-only saving, model.save_weights(filepath, save_format='h5') stores parameters in HDF5 format, allowing loading into an existing model with model.load_weights(filepath)—ideal for or without saving the full structure. Custom layers or losses require hooks like get_config() to ensure compatibility during loading.

Examples and Best Practices

Keras provides straightforward examples that demonstrate its ease of use for common tasks, such as image classification on the MNIST using the Sequential API. This approach is ideal for beginners and linear model architectures, allowing quick prototyping without complex graph definitions. A canonical example involves training a (CNN) to classify handwritten digits from the MNIST , achieving approximately 99% accuracy. The process begins by loading and preprocessing the data, followed by defining the model layers, compiling the model with an optimizer and , and training it over several epochs. The following code snippet illustrates this workflow:
python
from tensorflow import keras
from tensorflow.keras import layers

# Load and preprocess data
(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
x_train = x_train.reshape(60000, 28, 28, 1).astype("float32") / 255
x_test = x_test.reshape(10000, 28, 28, 1).astype("float32") / 255
y_train = y_train.astype("int32")
y_test = y_test.astype("int32")

# Define Sequential model
model = keras.Sequential(
    [
        layers.Conv2D(32, 3, activation="relu"),
        layers.Flatten(),
        layers.Dense(128, activation="relu"),
        layers.Dense(10),
    ]
)

# Compile and train
model.compile(
    optimizer="adam",
    loss=keras.losses.SparseCategoricalCrossentropy(from_logits=True),
    metrics=["accuracy"],
)
model.fit(x_train, y_train, batch_size=64, epochs=5, validation_split=0.2)
This example highlights Keras's intuitive layer stacking and built-in data handling, making it accessible for rapid experimentation. To optimize model development, several best practices enhance efficiency and reliability in Keras workflows. Incorporating validation splits during , such as the validation_split=0.2 in model.fit(), reserves a portion of the training data for evaluation, helping detect early without requiring separate validation sets. Leveraging callbacks like EarlyStopping or ModelCheckpoint automates monitoring and saving, preventing unnecessary computation and preserving the best-performing model based on validation metrics. For and , controlling models by saving them with timestamps—using model.save(f'model_{timestamp}.keras')—facilitates tracking iterations and rollback, especially in team environments. Users should be aware of common that can derail Keras implementations. Shape mismatches in layers, often arising from incorrect input specifications like mismatched tensor dimensions between convolutional and dense layers, lead to runtime errors; always verify shapes using model.summary() before . Ignoring GPU limits can cause out-of-memory errors during batch ; mitigate this by using backend-specific configurations for growth (e.g., TensorFlow's tf.config.experimental.set_memory_growth), or by reducing batch sizes to fit available hardware. For more complex scenarios, the Functional API enables hybrid architectures, particularly useful in transfer learning where pre-trained models like ResNet are fine-tuned. This involves loading a base model (e.g., ResNet50 with pre-trained weights), freezing its layers, and adding custom classification heads via functional connections, allowing efficient adaptation to new tasks like custom image datasets while retaining learned features.

Reception and Impact

Adoption and Community

Keras has achieved significant adoption in both academia and industry, driven by its user-friendly interface and multi-backend compatibility. In academia, Keras is frequently cited in research papers, with the original Keras publication garnering over 1,400 citations on , reflecting its role in enabling rapid prototyping of models across diverse fields such as and . For instance, studies in and analysis have leveraged Keras for tasks like cell detection and implementations. In industry, Keras powers projects at major companies including , where it serves as the high-level API for in applications like text classification and model deployment; , for recommender systems; and , for data analysis pipelines. The Keras community is vibrant and supportive, centered around its official GitHub repository at keras-team/keras, which boasts over 63,500 stars, 19,600 forks, and more than 81 releases as of 2025, indicating sustained development and contributions from a global developer base. Forums like host thousands of questions under the Keras tag, providing a rich resource for troubleshooting and best practices in and . Additionally, Keras features prominently in major conferences, such as dedicated sessions on its applications at NeurIPS, where tutorials and talks highlight its integration in cutting-edge research workflows. The ecosystem surrounding Keras further enhances its appeal through seamless integrations with complementary libraries. For visualization during training, Keras natively supports TensorBoard, allowing users to log metrics, monitor model performance, and inspect computational graphs effortlessly via callbacks. In , Keras integrates deeply with , enabling direct loading and saving of pretrained models from the Hugging Face Hub, which facilitates for tasks like text generation and large models such as Gemma and . Since its inception in 2015, Keras has profoundly impacted by lowering barriers to entry for beginners and accelerating cycles. Its high-level abstractions and modular design have democratized access to advanced architectures, enabling faster experimentation and broader innovation without requiring deep expertise in low-level tensor operations. This has contributed to its role as a foundational tool in the evolution of applications across sectors.

Criticisms and Limitations

Keras's high-level abstraction, while facilitating , can limit fine-grained control necessary for advanced research tasks, particularly when compared to the more flexible and imperative style of or the lower-level operations in raw . This design choice prioritizes simplicity over extensibility, making it challenging to implement custom operations or debug intricate model behaviors without delving into backend-specific code. The multi-backend support in Keras 3 introduces a slight performance overhead during backend switching and execution compared to using native frameworks like or directly, as the abstraction layer adds minimal but measurable latency in operations such as tensor manipulations. Benchmarks indicate that while Keras 3 achieves near-parity in training speed for standard models, the overhead becomes noticeable in high-throughput scenarios or when frequently alternating backends. Reliance on multiple backends, such as , , and , exposes Keras to dependency issues, including version conflicts that can disrupt compatibility across environments and lead to installation errors or inconsistent behavior during model deployment. This vulnerability was starkly illustrated in 2025, when several security flaws in Keras's file handling and model loading mechanisms were disclosed, allowing arbitrary file access, server-side request forgery (SSRF), and remote code execution through malicious .keras archives. Specific incidents, tracked as CVE-2025-12058, CVE-2025-1550, and CVE-2025-9905, highlighted gaps in safe deserialization and "" protections, potentially compromising AI/ML pipelines in production settings. These issues were addressed in Keras version 3.9 and later releases. Additionally, Keras places less emphasis on compared to graph-focused frameworks, resulting in backend-dependent implementations for dynamic graph features like conditional branching or variable-length sequences, which can lead to inconsistencies or reduced efficiency in eager execution modes. This limitation arises from the framework's default eager execution paradigm, where symbolic tensors cannot always integrate seamlessly with custom functions, necessitating workarounds that undermine portability across backends.

References

  1. [1]
    About Keras 3
    Keras 3 is a Python deep learning API, a multi-framework API compatible with JAX, TensorFlow, or PyTorch, and is simple, flexible, and powerful.
  2. [2]
    Introducing Keras 3.0
    After five months of extensive public beta testing, we're excited to announce the official release of Keras 3.0. Keras 3 is a full rewrite of Keras that ...Missing: history | Show results with:history
  3. [3]
    Introducing Keras 1.0 - The Keras Blog
    Apr 11, 2016 · Keras was initially released a year ago, late March 2015. It has made tremendous progress since, both on the development front, and as a ...Missing: source | Show results with:source
  4. [4]
    Introducing Keras 2 - The Keras Blog
    Mar 14, 2017 · Although Keras has supported TensorFlow as a runtime backend since December 2015, the Keras API had so far been kept separate from the ...Tensorflow Integration · Api Changes · Breaking Changes
  5. [5]
  6. [6]
    Keras: Deep Learning for humans
    Keras is a deep learning API designed for humans, focusing on debugging speed, code elegance, and multi-framework support with JAX, TensorFlow, and PyTorch.The Functional API · About Keras 3 · Code examples · Generative Deep Learning
  7. [7]
    An interview with François Chollet - PyImageSearch
    Jul 2, 2018 · François: I created Keras around February / March 2015. Deep learning was a very different field back then. First, it was smaller. There ...
  8. [8]
    keras 1.0.0 - PyPI
    Newer version available (3.11.3). Released: Apr 11, 2016. Deep Learning for Python. Navigation. Project description; Release history; Download files ...
  9. [9]
    Training and Serving ML models with tf.keras - The TensorFlow Blog
    Aug 17, 2018 · Keras quickly gained traction after its introduction and in 2017, the Keras API was integrated into core Tensorflow as tf. keras .
  10. [10]
    Keras: The high-level API for TensorFlow
    Jun 8, 2023 · Keras is the high-level API of the TensorFlow platform. It provides an approachable, highly-productive interface for solving machine learning (ML) problems.The Sequential model · Working with RNNs · Serialization and saving
  11. [11]
  12. [12]
    Announcing TensorFlow 2.0 Beta - Medium
    Jun 7, 2019 · Announcing TensorFlow 2.0 Beta · Keras as a high-level API for quick and easy model design and training · Eager execution as a default for fast, ...
  13. [13]
    Release Keras 2.4.0 · keras-team/keras
    ### Summary of Keras 2.4.0 Release Notes
  14. [14]
    CVE-2025-12058 Detail - NVD
    Oct 29, 2025 · This vulnerability stems from the way the StringLookup layer is handled during model loading from a specially crafted .keras archive. The ...
  15. [15]
    CVE-2025-12058 - Red Hat Customer Portal
    Oct 30, 2025 · This vulnerability stems from the way the StringLookup layer is handled during model loading from a specially crafted .keras archive. The ...
  16. [16]
    The Model class - Keras
    A model grouping layers into an object with training/inference features. There are three ways to instantiate a Model.
  17. [17]
    Keras layers API
    Layers are the basic building blocks of neural networks in Keras. A layer consists of a tensor-in tensor-out computation function (the layer's call method) and ...Convolution layers · Core layers · Preprocessing layers · Recurrent layers
  18. [18]
    Keras documentation: The Sequential class
    ### Summary of Sequential API in Keras
  19. [19]
    The Functional API - Keras
    Mar 1, 2019 · The Keras functional API is a way to create models that are more flexible than the keras.Sequential API. The functional API can handle models ...Use the same graph of layers... · Models with multiple inputs... · toy ResNet model
  20. [20]
    Getting started with Keras
    Getting started with Keras. Learning resources. Are you a machine learning engineer looking for a Keras introduction one-pager? Read our guide Introduction ...About Keras 3 · The Keras ecosystem · Keras FAQ · Keras 3 benchmarksMissing: history | Show results with:history
  21. [21]
    tf.keras.preprocessing.image.ImageDataGenerator - TensorFlow
    keras. Overview. layers. Overview. linalg. Overview · diag · diag_part · matmul ... ImageDataGenerator · Iterator · NumpyArrayIterator · apply_affine_transform ...
  22. [22]
    SGD - Keras
    Gradient descent (with momentum) optimizer. Update rule for parameter w with gradient g when momentum is 0: w = w - learning_rate * g
  23. [23]
    Adam - Keras
    Adam optimization is a stochastic gradient descent method that is based on adaptive estimation of first-order and second-order moments.AdamW · Nadam · Adamax
  24. [24]
    Optimizers - Keras
    Available optimizers. Usage with compile() & fit(). An optimizer is one of the two arguments required for compiling a Keras model.Adam · SGD · RMSprop · AdamW
  25. [25]
    Probabilistic losses - Keras
    Computes the cross-entropy loss between true labels and predicted labels. Use this cross-entropy loss for binary (0 or 1) classification applications.CategoricalCrossentropy class · CategoricalFocalCrossentropy... · Poisson class
  26. [26]
    EarlyStopping - Keras
    Stop training when a monitored metric has stopped improving. Assuming the goal of a training is to minimize the loss.
  27. [27]
    ModelCheckpoint - Keras
    ModelCheckpoint callback is used in conjunction with training using model.fit() to save a model or weights (in a checkpoint file) at some interval.
  28. [28]
    Callbacks API - Keras
    You can use callbacks to: Write TensorBoard logs after every batch of training to monitor your metrics; Periodically save your model to disk; Do early stopping ...EarlyStopping · ModelCheckpoint · Base Callback class · ReduceLROnPlateau
  29. [29]
    Accuracy metrics - Keras
    Accuracy class​​ Calculates how often predictions equal labels. This metric creates two local variables, total and count that are used to compute the frequency ...Binaryaccuracy Class · Categoricalaccuracy Class · Sparsecategoricalaccuracy...Missing: recall | Show results with:recall
  30. [30]
  31. [31]
    Metrics - Keras
    A metric is a function that is used to judge the performance of your model. Metric functions are similar to loss functions.Accuracy metrics · Regression metrics · Classification metrics based...
  32. [32]
    Training & evaluation with the built-in methods - Keras
    Mar 1, 2019 · This guide covers training, evaluation, and prediction (inference) models when using built-in APIs for training & validation (such as Model.fit(), Model. ...Api Overview: A First... · Checkpointing Models · Using Learning Rate...
  33. [33]
    Model training APIs - Keras
    Running multiple batches inside a single compiled function call can greatly improve performance on TPUs or small models with a large Python overhead. At most, ...
  34. [34]
    Multi-GPU distributed training with TensorFlow - Keras
    Apr 28, 2020 · This guide teaches you how to use the tf.distribute API to train Keras models on multiple GPUs, with minimal changes to your code.Introduction · Single-Host, Multi-Device... · Using Callbacks To Ensure...
  35. [35]
  36. [36]
    Save, serialize, and export models - Keras
    This section covers the basic workflows for handling custom layers, functions, and models in Keras saving and reloading.Saving · Custom Objects · Model SerializationMissing: initial | Show results with:initial
  37. [37]
    Whole model saving & loading - Keras
    Saves a model as a .keras file. Arguments. model: Keras model instance to be saved. filepath: str or pathlib.Path object. Path where to save the model.
  38. [38]
    Simple MNIST convnet - Keras
    Apr 21, 2020 · A simple convnet that achieves ~99% test accuracy on MNIST. This example uses Keras 3. View in Colab • GitHub source
  39. [39]
    Transfer learning & fine-tuning - Keras
    Apr 15, 2020 · Introduction. Transfer learning consists of taking features learned on one problem, and leveraging them on a new, similar problem.Freezing Layers... · The Typical... · Build A Model
  40. [40]
    ResNet and ResNetV2 - Keras
    For image classification use cases, see this page for detailed examples. For transfer learning use cases, make sure to read the guide to transfer learning & ...
  41. [41]
    Keras: The Python Deep Learning library - Semantic Scholar
    Jun 1, 2018 · Background Citations. 87. Methods Citations. 558. View All. 1,416 Citations; Related Papers. 1,416 Citations. Filters. Sort by Most Influenced ...<|separator|>
  42. [42]
    Keras R-CNN: library for cell detection in biological images using ...
    Jul 11, 2020 · Keras R-CNN is a Python package that performs automated cell identification for both brightfield and fluorescence images and can process large image sets.
  43. [43]
    Introducing Keras: Deep Learning with Python - Skillsoft
    Keras is a powerful and free open-source Python library that is particularly attractive. Keras can be used with Theano and TensorFlow to build almost any sort ...
  44. [44]
    Deep Learning for Recommender Systems: A Netflix Case Study
    May 29, 2025 · In this article, we outline some of the challenges encountered and lessons learned in using deep learning for recommender systems at Netflix.
  45. [45]
    keras-team/keras: Deep Learning for humans - GitHub
    Keras 3 is a multi-backend deep learning framework, with support for JAX, TensorFlow, PyTorch, and OpenVINO (for inference-only).Keras · Releases 81 · Pull requests 39 · Activity<|control11|><|separator|>
  46. [46]
    Newest 'keras' Questions - Stack Overflow
    I've got a very small python script using a Model.h5 which should be loaded in order to classify some pictures. Here's my python script : import tensorflow ...
  47. [47]
    Yifei Feng · Keras - SlidesLive
    Dec 13, 2019 · Neural Information Processing Systems (NeurIPS) is a multi-track machine learning and computational neuroscience conference that includes ...
  48. [48]
    TensorBoard - Keras
    TensorBoard is a visualization tool provided with TensorFlow. A TensorFlow installation is required to use this callback.Missing: integration | Show results with:integration
  49. [49]
    Using Keras at Hugging Face
    Keras is deeply integrated with the Hugging Face Hub. This means you can load and save models on the Hub directly from the library.
  50. [50]
    Loading Hugging Face Transformers Checkpoints - Keras
    Jun 17, 2025 · KerasHub allows you to easily load models from HuggingFace Transformers. Here's an example of how to load a Gemma causal language model.KerasHub built-in... · Loading a HuggingFace model · Fine-tuning a Gemma...
  51. [51]
    The origins of keras: A deep learning revolution - BytePlus
    "The purpose of Keras is to be a simple, high-level interface that makes deep learning more accessible," Chollet has stated. This philosophy transformed how ...Missing: definition | Show results with:definition
  52. [52]
    Exploring the Power and Versatility of Keras Prebuilt Models in ...
    Jan 12, 2024 · By providing these advanced tools, Keras has lowered the barrier to entry for experimenting with deep learning. It has fostered a community ...
  53. [53]
    PyTorch vs TensorFlow vs Keras for Deep Learning - DataCamp
    Aug 2, 2023 · Frequent updates · Inconsistent homonyms · Missing symbolic loops · Limited GPU support · Low implementation speed.
  54. [54]
    Keras vs Tensorflow vs Pytorch - GeeksforGeeks
    Jul 23, 2025 · TensorFlow has a steeper learning curve compared to Keras, which is known for its user-friendly interface. PyTorch offers flexibility without ...
  55. [55]
    Pytorch Vs Tensorflow Vs Keras: The Differences You Should Know
    Sep 11, 2025 · PyTorch enables faster prototyping, while TensorFlow might be more suitable when customized neural network features are required. 5) Should I ...
  56. [56]
    Keras 3 benchmarks
    We benchmark the three backends of Keras 3 (TensorFlow, JAX, PyTorch) alongside Keras 2 with TensorFlow. Find code and setup details for reproducing our ...Results · Discussion · Key Finding 2: Keras 3 Is...Missing: multi- | Show results with:multi-
  57. [57]
    Migrating Keras 2 code to multi-backend Keras 3
    Oct 23, 2023 · This guide will help you migrate TensorFlow-only Keras 2 code to multi-backend Keras 3 code. The overhead for the migration is minimal.Going From Keras 2 To Keras... · Tensorflow Variables... · Switching To Keras OpsMissing: initial | Show results with:initial
  58. [58]
  59. [59]
  60. [60]
    Inside CVE-2025-1550: Remote Code Execution via Keras Models
    Apr 29, 2025 · Exploring a critical vulnerability in Keras models that allows remote code execution through malformed files, discovered by Huntr researcher ...
  61. [61]
    Is TensorFlow Keras “Safe Mode” actually safe? - JFrog
    Mar 12, 2025 · Learn about the TensorFlow Keras ML model vulnerability that can be exploited to inject arbitrary code even in "Safe Mode".
  62. [62]
    What are Symbolic and Imperative APIs in TensorFlow 2.0?
    Jan 29, 2019 · Imperative models can be more difficult to reuse. For example, you cannot access intermediate layers or activations with a consistent API.
  63. [63]
    Inputs to eager execution function cannot be Keras symbolic tensors
    Aug 29, 2019 · I am trying to implement sample- and pixel-dependent dependent loss weighting in tf.Keras (TensorFlow 2.0.0rc0) for a 3-D U-Net with sparse annotation data.In which circumstances we cannot use symbolic execution?inputs to eager execution function cannot be keras symbolic tensors ...More results from stackoverflow.com