Home

tfkeras

tf.keras is the TensorFlow implementation of the Keras high-level neural networks API. It provides a unified, high-level interface for building and training deep learning models within the TensorFlow framework. Built on top of TensorFlow core, tf.keras supports eager execution, graph mode, and tf.function for performance optimization.

The API offers three model-building approaches: Sequential, the Functional API, and model subclassing. It includes a

Models can be trained with the fit method, evaluated with evaluate, and used for inference via predict.

History and scope: Keras originated as an independent, user-friendly API for building neural networks and was

tf.keras is maintained as part of the TensorFlow project, with contributions from Google and the broader open-source

---

comprehensive
set
of
layers,
loss
functions,
optimizers,
metrics,
and
callbacks,
enabling
the
construction
of
simple
stacks
as
well
as
complex
architectures
with
multiple
inputs
and
outputs.
tf.keras
also
supports
custom
layers
and
models
expressed
as
Python
classes.
Saving
and
loading
are
supported
through
the
TensorFlow
SavedModel
format,
with
historical
compatibility
for
HDF5.
The
API
integrates
with
other
TensorFlow
components
such
as
tf.data
for
data
pipelines
and
tf.distribute
strategies
for
scalable
training
on
multiple
GPUs,
TPUs,
or
other
devices.
adopted
as
the
high-level
API
of
TensorFlow
in
the
2.x
era.
tf.keras
is
the
standard
way
to
build
models
in
TensorFlow,
balancing
ease
of
use
with
TensorFlow-specific
optimizations
and
integrations.
community.
It
is
widely
used
in
education,
research,
and
production
deployments.