Showing posts with label keras. Show all posts
Showing posts with label keras. Show all posts

Monday, 27 October 2025

Keras Models API

 Keras Models API provides three ways to create models.

  • Sequential Model - the simple model - consists of layers. applied in succession.  You can create a Sequential model by passing a list of layers to the constructor of Sequential.
  • The alternative, and preferred method for most use cases, is the Functional API. which is more flexible than the keras.Sequential API.  It enables the building of graphs of Layers.
  • Model subclassing is building from scratch. for out of the box use cases.

All Eyes on Keras - Layer = IO TRANSFORMATION

What is it and Why Use it

Keras is the high-level API for TensorFlow, covering all aspect of workflow, from data processing to (hyperparameter) tuning to deployment.  It is the API to be used by default.
 
Layers and Models, Layers and Models

The core data structs of Keras are layers and models.
  • A layer is a simple input/output transformation
  • A model is a directed acyclic graph (DAG) of layers (production flow of layers, and thus a production flow of transformations)
A model is thus a "special" series of input-output transformations i.e. a "series" of layers.

Sidebar: what are hyperparameters

Hyperparameters are parameters you set before training a model. They can be set by a user or by a tuning algorithm. Example parameters could include learning rate (how fast the model learns), or number of layers in the neural network (more layers the more complex patterns the neural net can learn).