Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/keras-team/keras
/ types & classes
Types & classes
1,538 in github.com/keras-team/keras
⨍
Functions
12,633
◇
Types & classes
1,538
↳
Endpoints
141
↓ 906 callers
Class
KerasTensor
Symbolic tensor -- encapsulates a shape and a dtype. You can use `KerasTensor` instances to build computation graphs of Keras operations, suc
keras/src/backend/common/keras_tensor.py:7
↓ 173 callers
Class
OpenVINOKerasTensor
keras/src/backend/openvino/core.py:140
↓ 70 callers
Class
LayerBenchmark
benchmarks/layer_benchmark/base_benchmark.py:103
↓ 51 callers
Class
Sequential
`Sequential` groups a linear stack of layers into a `Model`. Examples: ```python model = keras.Sequential() model.add(keras.Input(sh
keras/src/models/sequential.py:20
↓ 41 callers
Class
InputSpec
Specifies the rank, dtype and shape of every input to a layer. Layers can expose (if appropriate) an `input_spec` attribute: an instance of `
keras/src/layers/input_spec.py:7
↓ 38 callers
Class
Functional
A `Functional` model is a `Model` defined as a directed graph of layers. Three types of `Model` exist: subclassed `Model`, `Functional` model,
keras/src/models/functional.py:27
↓ 33 callers
Class
ExampleModel
keras/src/trainers/trainer_test.py:47
↓ 31 callers
Class
Model
A model grouping layers into an object with training/inference features. There are three ways to instantiate a `Model`: ## With the "Functio
keras/src/models/model.py:37
↓ 25 callers
Class
GPTQConfig
Configuration class for the GPTQ (Gradient-based Post-Training Quantization) algorithm. GPTQ is a post-training quantization method that quan
keras/src/quantizers/gptq_config.py:5
↓ 25 callers
Class
SeedGenerator
Generates variable seeds upon each call to a function generating random numbers. In Keras, all random number generators (such as `keras.r
keras/src/random/seed_generator.py:13
↓ 24 callers
Class
DTypePolicy
A dtype policy for a Keras layer. A dtype policy determines a layer's computation and variable dtypes. Each layer has a policy. Policies can
keras/src/dtype_policies/dtype_policy.py:17
↓ 20 callers
Class
SGD
Gradient descent (with momentum) optimizer. Update rule for parameter `w` with gradient `g` when `momentum` is 0: ```python w = w - lear
keras/src/optimizers/sgd.py:7
↓ 19 callers
Class
QuantizedDTypePolicy
keras/src/dtype_policies/dtype_policy.py:216
↓ 16 callers
Class
GPTQ
keras/src/quantizers/gptq.py:273
↓ 15 callers
Class
CompileLoss
keras/src/trainers/compile_utils.py:421
↓ 15 callers
Class
FloatDTypePolicy
keras/src/dtype_policies/dtype_policy.py:210
↓ 15 callers
Class
JaxLayer
Keras Layer that wraps a JAX model. This layer enables the use of JAX components within Keras when using JAX as the backend for Keras. #
keras/src/utils/jax_layer.py:18
↓ 14 callers
Class
LossScaleOptimizer
An optimizer that dynamically scales the loss to prevent underflow. Loss scaling is a technique to prevent numeric underflow in intermediate
keras/src/optimizers/loss_scale_optimizer.py:16
↓ 14 callers
Class
QuantizedFloat8DTypePolicy
keras/src/dtype_policies/dtype_policy.py:260
↓ 13 callers
Class
Distiller
Distillation model for transferring knowledge from teacher to student. Knowledge distillation transfers knowledge from a large, complex model
keras/src/distillation/distiller.py:10
↓ 13 callers
Class
InputLayer
keras/src/layers/core/input_layer.py:10
↓ 13 callers
Class
TrackedDict
keras/src/utils/tracking.py:219
↓ 13 callers
Class
TrackedList
keras/src/utils/tracking.py:137
↓ 13 callers
Class
TrackedSet
keras/src/utils/tracking.py:293
↓ 11 callers
Class
DTypePolicyMap
Dict-like object mapping layer paths to `DTypePolicy` instances. `DTypePolicyMap` can be used in `get_config` in layers and subclasses to sup
keras/src/dtype_policies/dtype_policy_map.py:10
↓ 11 callers
Class
OneStateRNNCell
keras/src/layers/rnn/rnn_test.py:9
↓ 11 callers
Class
TwoStatesRNNCell
keras/src/layers/rnn/rnn_test.py:34
↓ 10 callers
Class
Feature
keras/src/layers/preprocessing/feature_space.py:46
↓ 10 callers
Class
Ftrl
r"""Optimizer that implements the FTRL algorithm. "Follow The Regularized Leader" (FTRL) is an optimization algorithm developed at Google for
keras/src/optimizers/ftrl.py:8
↓ 10 callers
Class
MockTokenizer
A mock tokenizer that mimics the real API for testing.
keras/src/quantizers/gptq_core_test.py:15
↓ 10 callers
Class
RematScope
A context manager for enabling rematerialization in Keras. Rematerialization (gradient checkpointing) trades memory for computation by recomp
keras/src/backend/common/remat.py:9
↓ 10 callers
Class
StatelessScope
Scope to prevent any update to Keras Variables. The values of variables to be used inside the scope should be passed via the `state_mapping`
keras/src/backend/common/stateless_scope.py:6
↓ 9 callers
Class
ExampleLoss
keras/src/losses/loss_test.py:15
↓ 9 callers
Class
ExampleMetric
keras/src/metrics/metric_test.py:14
↓ 8 callers
Class
Adam
Optimizer that implements the Adam algorithm. Adam optimization is a stochastic gradient descent method that is based on adaptive estimation
keras/src/optimizers/adam.py:7
↓ 8 callers
Class
CompileMetrics
keras/src/trainers/compile_utils.py:124
↓ 8 callers
Class
H5IOStore
Numerical variable store backed by HDF5. Args: path_or_io: `str`, `pathlib.Path` or `io.BytesIO` object. The path where to sa
keras/src/saving/saving_lib.py:1223
↓ 8 callers
Class
Lion
Optimizer that implements the Lion algorithm. The Lion optimizer is a stochastic-gradient-descent method that uses the sign operator to contr
keras/src/optimizers/lion.py:7
↓ 8 callers
Class
SGD
keras/src/backend/torch/optimizers/torch_sgd.py:7
↓ 8 callers
Class
SymbolicArguments
keras/src/ops/symbolic_arguments.py:5
↓ 7 callers
Class
Adafactor
Optimizer that implements the Adafactor algorithm. Adafactor is commonly used in NLP tasks, and has the advantage of taking less memory becau
keras/src/optimizers/adafactor.py:8
↓ 7 callers
Class
AdamW
Optimizer that implements the AdamW algorithm. AdamW optimization is a stochastic gradient descent method that is based on adaptive estimatio
keras/src/optimizers/adamw.py:7
↓ 7 callers
Class
LogitsDistillation
Distillation loss that transfers knowledge from final model outputs. This distillation loss applies temperature scaling to the teacher's logits
keras/src/distillation/distillation_loss.py:261
↓ 7 callers
Class
Muon
Optimizer that implements the Muon algorithm. Note that this optimizer should not be used in the following layers: 1. Embedding layer 2.
keras/src/optimizers/muon.py:9
↓ 7 callers
Class
Nadam
Optimizer that implements the Nadam algorithm. Much like Adam is essentially RMSprop with momentum, Nadam is Adam with Nesterov momentum.
keras/src/optimizers/nadam.py:8
↓ 7 callers
Class
Node
A `Node` describes an operation `__call__()` event. A Keras Function is a DAG with `Node` instances as nodes, and `KerasTensor` instances as
keras/src/ops/node.py:8
↓ 6 callers
Class
Adadelta
Optimizer that implements the Adadelta algorithm. Adadelta optimization is a stochastic gradient descent method that is based on adaptive lea
keras/src/optimizers/adadelta.py:7
↓ 6 callers
Class
Adagrad
Optimizer that implements the Adagrad algorithm. Adagrad is an optimizer with parameter-specific learning rates, which are adapted relative t
keras/src/optimizers/adagrad.py:8
↓ 6 callers
Class
Adamax
Optimizer that implements the Adamax algorithm. Adamax, a variant of Adam based on the infinity norm, is a first-order gradient-based optimiz
keras/src/optimizers/adamax.py:7
↓ 6 callers
Class
Lamb
Optimizer that implements the Lamb algorithm. Lamb is a stochastic gradient descent method that uses layer-wise adaptive moments to adjusts t
keras/src/optimizers/lamb.py:7
↓ 6 callers
Class
MockRemat
Mock remat by returning a wrapper Mock calling the original function
keras/src/layers/layer_test.py:22
↓ 6 callers
Class
MyDense
keras/src/saving/saving_lib_test.py:24
↓ 6 callers
Class
MyLayer
keras/src/layers/layer_test.py:1156
↓ 6 callers
Class
RMSprop
Optimizer that implements the RMSprop algorithm. The gist of RMSprop is to: - Maintain a moving (discounted) average of the square of gradie
keras/src/optimizers/rmsprop.py:7
↓ 5 callers
Class
BoundingBox
keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/bounding_box.py:18
↓ 5 callers
Class
ExamplePyDataset
keras/src/trainers/data_adapters/py_dataset_adapter_test.py:18
↓ 5 callers
Class
KerasFileEditor
Utility to inspect, edit, and resave Keras weights files. You will find this class useful when adapting an old saved weights file after havin
keras/src/saving/file_editor.py:38
↓ 5 callers
Class
SimpleTeacher
Simple teacher model for testing.
keras/src/distillation/distiller_test.py:13
↓ 5 callers
Class
SymbolicScope
Scope to indicate the symbolic stage.
keras/src/backend/common/symbolic_scope.py:6
↓ 5 callers
Class
TensorLayout
A layout to apply to a tensor. This API is aligned with `jax.sharding.NamedSharding` and `tf.dtensor.Layout`. See more details in [jax.s
keras/src/distribution/distribution_lib.py:217
↓ 5 callers
Class
TestLayer
keras/src/layers/layer_test.py:43
↓ 5 callers
Class
TorchDataLoaderAdapter
Adapter that handles `torch.utils.data.DataLoader`.
keras/src/trainers/data_adapters/torch_data_loader_adapter.py:10
↓ 5 callers
Class
TorchModuleWrapper
Torch module wrapper layer. `TorchModuleWrapper` is a wrapper class that can turn any `torch.nn.Module` into a Keras layer, in particular by
keras/src/utils/torch_utils.py:15
↓ 5 callers
Class
TrainingLayer
keras/src/layers/layer_test.py:573
↓ 5 callers
Class
Visitor
keras/src/tree/tree_test.py:60
↓ 4 callers
Class
Dense
Just your regular densely-connected NN layer. `Dense` implements the operation: `output = activation(dot(input, kernel) + bias)` where `a
keras/src/layers/core/dense.py:18
↓ 4 callers
Class
DiskIOStore
Asset store backed by disk storage. If `archive` is specified, then `root_path` refers to the filename inside the archive. If `archive`
keras/src/saving/saving_lib.py:1035
↓ 4 callers
Class
EpochAgnosticMeanSquaredError
keras/src/trainers/trainer_test.py:288
↓ 4 callers
Class
MyDense
keras/src/legacy/saving/legacy_h5_format_test.py:195
↓ 4 callers
Class
MyModel
keras/src/trainers/trainer_test.py:2481
↓ 4 callers
Class
NpzIOStore
keras/src/saving/saving_lib.py:1748
↓ 4 callers
Class
OpWithMultipleInputs
keras/src/ops/operation_test.py:11
↓ 4 callers
Class
SimpleStudent
Simple student model for testing.
keras/src/distillation/distiller_test.py:26
↓ 4 callers
Class
StepCount
keras/src/trainers/trainer_test.py:321
↓ 4 callers
Class
StepObserver
keras/src/trainers/trainer_test.py:298
↓ 4 callers
Class
name_scope
Creates a sub-namespace for variable paths. Args: name: Name of the current scope (string). caller: Optional ID of a caller objec
keras/src/backend/common/name_scope.py:4
↓ 3 callers
Class
Classifier
keras/src/utils/torch_utils_test.py:19
↓ 3 callers
Class
ClassifierWithNoSpecialCasing
keras/src/utils/torch_utils_test.py:47
↓ 3 callers
Class
Cross
keras/src/layers/preprocessing/feature_space.py:15
↓ 3 callers
Class
CustomModelX
keras/src/saving/saving_lib_test.py:90
↓ 3 callers
Class
CustomSignatureModel
keras/src/backend/tensorflow/saved_model_test.py:37
↓ 3 callers
Class
DeviceMesh
A cluster of computation devices for distributed computation. This API is aligned with `jax.sharding.Mesh` and `tf.dtensor.Mesh`, which repre
keras/src/distribution/distribution_lib.py:133
↓ 3 callers
Class
DummyLayer
keras/src/ops/node_test.py:9
↓ 3 callers
Class
EinsumDense
A layer that uses `einsum` as the backing computation. This layer can perform einsum calculations of arbitrary dimensionality. Args:
keras/src/layers/core/einsum_dense.py:22
↓ 3 callers
Class
EpochIterator
keras/src/trainers/epoch_iterator.py:49
↓ 3 callers
Class
ExampleTorchDataset
keras/src/trainers/epoch_iterator_test.py:82
↓ 3 callers
Class
ExportArchive
ExportArchive is used to write SavedModel artifacts (e.g. for inference). If you have a Keras model or layer that you want to export as SavedMode
keras/src/export/saved_model.py:42
↓ 3 callers
Class
FeatureDistillation
Feature distillation loss. Feature distillation transfers knowledge from intermediate layers of the teacher model to corresponding layers of
keras/src/distillation/distillation_loss.py:87
↓ 3 callers
Class
Inner
keras/src/layers/layer_test.py:1585
↓ 3 callers
Class
InterruptingCallback
A callback to intentionally interrupt training.
keras/src/callbacks/backup_and_restore_test.py:11
↓ 3 callers
Class
JAXEpochIterator
keras/src/backend/jax/trainer.py:987
↓ 3 callers
Class
Model
keras/src/backend/tensorflow/saved_model_test.py:127
↓ 3 callers
Class
MyModel
keras/src/models/model_test.py:125
↓ 3 callers
Class
NoopLoadingScope
The default shared object loading scope. It does nothing. Created to simplify serialization code that doesn't care about shared objects (e.g.
keras/src/legacy/saving/serialization.py:71
↓ 3 callers
Class
OpWithMultipleOutputs
keras/src/ops/operation_test.py:21
↓ 3 callers
Class
Outer
keras/src/layers/layer_test.py:1593
↓ 3 callers
Class
TFEpochIterator
keras/src/backend/tensorflow/trainer.py:746
↓ 3 callers
Class
TorchEpochIterator
keras/src/backend/torch/trainer.py:516
↓ 2 callers
Class
ActivityRegularizationLayer
guides/making_new_layers_and_models_via_subclassing.py:291
↓ 2 callers
Class
Adder
keras/src/backend/tensorflow/saved_model_test.py:329
next →
1–100 of 1,538, ranked by callers