Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/keras-team/keras
/ types & classes
Types & classes
1,698 in github.com/keras-team/keras
⨍
Functions
14,520
◇
Types & classes
1,698
↳
Endpoints
165
↓ 1,060 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
↓ 356 callers
Class
OpenVINOKerasTensor
keras/src/backend/openvino/core.py:197
↓ 71 callers
Class
LayerBenchmark
benchmarks/layer_benchmark/base_benchmark.py:103
↓ 53 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
↓ 51 callers
Class
Int4QuantizationConfig
Int4 quantization config. Args: weight_quantizer: Quantizer for weights. activation_quantizer: Quantizer for activations. If "def
keras/src/quantizers/quantization_config.py:95
↓ 43 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
↓ 39 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
↓ 38 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:39
↓ 33 callers
Class
ExampleModel
keras/src/trainers/trainer_test.py:47
↓ 28 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:6
↓ 26 callers
Class
AWQConfig
Configuration class for AWQ (Activation-aware Weight Quantization). AWQ is a post-training quantization method that identifies and protects s
keras/src/quantizers/awq_config.py:6
↓ 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:15
↓ 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
AbsMaxQuantizer
keras/src/quantizers/quantizers.py:308
↓ 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:272
↓ 16 callers
Class
Int8QuantizationConfig
Int8 quantization config. Args: weight_quantizer: Quantizer for weights. activation_quantizer: Quantizer for activations. If "def
keras/src/quantizers/quantization_config.py:66
↓ 15 callers
Class
CompileLoss
keras/src/trainers/compile_utils.py:429
↓ 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:38
↓ 15 callers
Class
OrbaxCheckpoint
Callback to save and load model state using Orbax with a similar API to ModelCheckpoint. This callback saves the model's weights and optimize
keras/src/callbacks/orbax_checkpoint.py:58
↓ 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:221
↓ 13 callers
Class
TrackedList
keras/src/utils/tracking.py:139
↓ 13 callers
Class
TrackedSet
keras/src/utils/tracking.py:390
↓ 12 callers
Class
CompileMetrics
keras/src/trainers/compile_utils.py:130
↓ 12 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
↓ 12 callers
Class
OneStateRNNCell
keras/src/layers/rnn/rnn_test.py:8
↓ 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
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
↓ 11 callers
Class
TrackedOrderedDict
keras/src/utils/tracking.py:311
↓ 11 callers
Class
TwoStatesRNNCell
keras/src/layers/rnn/rnn_test.py:33
↓ 10 callers
Class
Feature
keras/src/layers/preprocessing/feature_space.py:48
↓ 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:16
↓ 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
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
↓ 9 callers
Class
ExampleLoss
keras/src/losses/loss_test.py:15
↓ 9 callers
Class
ExampleMetric
keras/src/metrics/metric_test.py:14
↓ 9 callers
Class
Model
keras/src/backend/tensorflow/saved_model_test.py:127
↓ 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:1289
↓ 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
ScheduleFreeAdamW
Optimizer that implements the Schedule-Free AdamW algorithm. Schedule-Free learning is a method that avoids the need for a learning rate sche
keras/src/optimizers/schedule_free_adamw.py:7
↓ 8 callers
Class
SymbolicArguments
keras/src/ops/symbolic_arguments.py:5
↓ 8 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
↓ 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
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:21
↓ 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
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
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:1101
↓ 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:21
↓ 6 callers
Class
MyDense
keras/src/saving/saving_lib_test.py:25
↓ 6 callers
Class
MyLayer
keras/src/layers/layer_test.py:1247
↓ 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
↓ 6 callers
Class
TensorLayout
A layout to apply to a tensor. This API is aligned with `jax.sharding.NamedSharding`. See more details in [jax.sharding.NamedSharding](
keras/src/distribution/distribution_lib.py:237
↓ 6 callers
Class
TerminateOnNaN
Callback that terminates training when a NaN loss is encountered. This callback monitors the loss value during training and terminates traini
keras/src/callbacks/terminate_on_nan.py:9
↓ 5 callers
Class
AutocastScope
Context manager that enables the autocasting of float variables. Under this context manager, float `Variables`s will be cast to `dtype` (note
keras/src/backend/common/variables.py:677
↓ 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:39
↓ 5 callers
Class
MyDense
keras/src/legacy/saving/legacy_h5_format_test.py:195
↓ 5 callers
Class
OpWithMultipleInputs
keras/src/ops/operation_test.py:12
↓ 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
TestLayer
keras/src/layers/layer_test.py:42
↓ 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:644
↓ 5 callers
Class
Visitor
keras/src/tree/tree_test.py:61
↓ 4 callers
Class
AWQ
AWQ quantizer for a single layer. This class accumulates activation statistics during calibration and performs AWQ quantization on layer weig
keras/src/quantizers/awq.py:229
↓ 4 callers
Class
AWQDTypePolicy
Quantized dtype policy for AWQ quantization. This policy helps propagate quantization settings for AWQ when loading an AWQ quantized model in
keras/src/dtype_policies/dtype_policy.py:453
↓ 4 callers
Class
DeviceMesh
A cluster of computation devices for distributed computation. This API is aligned with `jax.sharding.Mesh`, which represents the computation
keras/src/distribution/distribution_lib.py:155
↓ 4 callers
Class
EpochAgnosticMeanSquaredError
keras/src/trainers/trainer_test.py:289
↓ 4 callers
Class
EpochIterator
keras/src/trainers/epoch_iterator.py:49
↓ 4 callers
Class
MyModel
keras/src/trainers/trainer_test.py:2487
↓ 4 callers
Class
NpzIOStore
keras/src/saving/saving_lib.py:1814
↓ 4 callers
Class
OptionalInputLayer
keras/src/models/functional_test.py:589
↓ 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:322
↓ 4 callers
Class
StepObserver
keras/src/trainers/trainer_test.py:299
↓ 4 callers
Class
TorchDataLoaderAdapter
Adapter that handles `torch.utils.data.DataLoader`.
keras/src/trainers/data_adapters/torch_data_loader_adapter.py:10
↓ 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:17
↓ 3 callers
Class
CustomLayer
keras/src/layers/layer_test.py:816
↓ 3 callers
Class
CustomModel
keras/src/export/saved_model_test.py:22
↓ 3 callers
Class
CustomModelX
keras/src/saving/saving_lib_test.py:91
↓ 3 callers
Class
CustomSignatureModel
keras/src/backend/tensorflow/saved_model_test.py:37
↓ 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:27
next →
1–100 of 1,698, ranked by callers