MCPcopy Create free account

hub / github.com/keras-team/keras / functions

Functions14,520 in github.com/keras-team/keras

↓ 1,610 callersMethodassertAllClose
Assert that two arrays are equal up to given tolerances. Given two array-like objects, check that their shapes and all elements are e
keras/src/testing/test_case.py:48
↓ 570 callersMethodsymbolic_call
(self, *args, **kwargs)
keras/src/ops/operation.py:83
↓ 516 callersFunctionstandardize_dtype
(dtype)
keras/src/backend/common/variables.py:573
↓ 466 callersMethodcast
Cast a tensor to a different dtype. Only called on a full array as provided by the user. Args: x: the tensor to cast.
keras/src/trainers/data_adapters/array_slicing.py:54
↓ 432 callersMethodreshape
(self, newshape)
keras/src/backend/common/keras_tensor.py:139
↓ 415 callersMethodoutput
Retrieves the output tensor(s) of a layer. Only returns the tensor(s) corresponding to the *first time* the operation was called.
keras/src/ops/operation.py:380
↓ 340 callersFunctionany_symbolic_tensors
(args=None, kwargs=None)
keras/src/backend/common/keras_tensor.py:402
↓ 338 callersMethodappend
(self, value)
keras/src/utils/tracking.py:146
↓ 336 callersFunctionget_ov_output
(x, ov_type=None, context_dtype=None)
keras/src/backend/openvino/core.py:104
↓ 306 callersMethodget_temp_dir
(self)
keras/src/testing/test_case.py:36
↓ 305 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/torch/core.py:193
↓ 236 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/jax/core.py:371
↓ 235 callersMethodshape
(self)
keras/src/backend/tensorflow/core.py:80
↓ 232 callersMethodadd
(self, n, values=None)
keras/src/utils/progbar.py:239
↓ 220 callersMethodcompile
Configures the model for training. Example: ```python model.compile( optimizer=keras.optimizers.Adam(learning_ra
keras/src/trainers/trainer.py:40
↓ 211 callersMethodconvert_to_numpy
(self, x)
keras/src/testing/test_case.py:41
↓ 210 callersMethodsum
(x, axis)
keras/src/backend/common/thread_safe_test.py:15
↓ 205 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/tensorflow/core.py:140
↓ 183 callersMethodfit
Trains the model for a fixed number of epochs (dataset iterations). Args: x: Input data. It can be: - A NumPy arr
keras/src/trainers/trainer.py:548
↓ 182 callersMethodmap_structure
(obj)
keras/src/utils/dataset_utils_test.py:27
↓ 171 callersMethodconvert
(self, conversion_fn)
keras/src/ops/symbolic_arguments.py:26
↓ 165 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/numpy/core.py:38
↓ 163 callersMethodassertAlmostEqual
Assert that two arrays are equal up to given decimal places. Given two array-like objects, check that their shapes and all elements a
keras/src/testing/test_case.py:83
↓ 157 callersMethodrun_layer_test
Run basic checks on a layer. Args: layer_cls: The class of the layer to test. init_kwargs: Dict of arguments to be us
keras/src/testing/test_case.py:204
↓ 149 callersMethodkeys
(self)
keras/src/utils/config.py:114
↓ 147 callersMethodconcatenate
(outputs)
keras/src/backend/jax/trainer.py:214
↓ 139 callersMethodassertLen
(self, iterable, expected_len, msg=None)
keras/src/testing/test_case.py:110
↓ 138 callersMethodsqueeze
(self, axis=None)
keras/src/backend/common/keras_tensor.py:144
↓ 130 callersMethoditems
(self)
keras/src/utils/config.py:120
↓ 129 callersMethodnumpy
(self)
keras/src/backend/tensorflow/core.py:76
↓ 109 callersMethodassign
(self, value)
keras/src/backend/common/variables.py:282
↓ 109 callersMethodconcat
(self, x)
keras/src/backend/tensorflow/saved_model_test.py:333
↓ 107 callersMethodassertDType
(self, x, dtype, msg=None)
keras/src/testing/test_case.py:152
↓ 99 callersMethodupdate
(self, *args, **kwargs)
keras/src/utils/config.py:127
↓ 96 callersMethod__init__
(self, axis=None, keepdims=False, *, name=None)
keras/src/ops/numpy.py:291
↓ 94 callersMethodpredict
Generates output predictions for the input samples. Computation is done in batches. This method is designed for batch processing of l
keras/src/trainers/trainer.py:845
↓ 92 callersMethodmap
(self, x)
keras/src/trainers/data_adapters/grain_dataset_adapter.py:151
↓ 87 callersMethodpad
(self, boxes, top, left)
keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/bounding_box.py:241
↓ 86 callersMethodpop
(self, *args)
keras/src/utils/config.py:123
↓ 82 callersMethodadd_weight
Add a weight variable to the layer. Args: shape: Shape tuple for the variable. Must be fully-defined (no `None` e
keras/src/layers/layer.py:524
↓ 81 callersFunctioncast
(x, dtype)
keras/src/backend/torch/core.py:300
↓ 78 callersMethodget
(self, keyname, value=None)
keras/src/utils/config.py:131
↓ 73 callersMethodall
(cls)
keras/src/legacy/losses.py:12
↓ 71 callersMethodbenchmark_predict
(self, num_samples, batch_size, data=None)
benchmarks/layer_benchmark/base_benchmark.py:179
↓ 71 callersMethodbenchmark_train
(self, num_samples, batch_size, data=None, label=None)
benchmarks/layer_benchmark/base_benchmark.py:223
↓ 71 callersMethodrun_class_serialization_test
(self, instance, custom_objects=None)
keras/src/testing/test_case.py:170
↓ 70 callersFunctionInput
Used to instantiate a Keras tensor. A Keras tensor is a symbolic tensor-like object, which we augment with certain attributes that allow us t
keras/src/layers/core/input_layer.py:146
↓ 70 callersMethodreshape
(self, new_shape)
keras/src/backend/openvino/core.py:753
↓ 66 callersFunctionget_device
()
keras/src/backend/torch/core.py:74
↓ 65 callersMethodapply_gradients
(self, grads_and_vars)
keras/src/optimizers/base_optimizer.py:460
↓ 65 callersMethodbuild
(self, input_shape)
keras/src/layers/core/dense.py:124
↓ 65 callersMethodget
(self, unused_object_id)
keras/src/legacy/saving/serialization.py:78
↓ 64 callersMethodresult
Compute the current metric value. Returns: A scalar tensor, or a dictionary of scalar tensors.
keras/src/metrics/metric.py:146
↓ 63 callersMethodupdate_state
Accumulate statistics for the metric.
keras/src/metrics/metric.py:117
↓ 55 callersFunctioncanonicalize_axis
Canonicalize an axis in [-num_dims, num_dims) to [0, num_dims).
keras/src/backend/common/backend_utils.py:348
↓ 52 callersMethodevaluate
Returns the loss value & metrics values for the model in test mode. Computation is done in batches (see the `batch_size` arg.) Args:
keras/src/trainers/trainer.py:750
↓ 50 callersFunctioncast
(x, dtype)
keras/src/backend/jax/core.py:422
↓ 50 callersMethodsqueeze
(self, axis=None)
keras/src/backend/openvino/core.py:760
↓ 49 callersMethodload_weights
Load the weights from a single file or sharded files. Weights are loaded based on the network's topology. This means the architecture
keras/src/models/model.py:378
↓ 49 callersMethodsave
Saves a model as a `.keras` file. Note that `model.save()` is an alias for `keras.saving.save_model()`. The saved `.keras` file cont
keras/src/models/model.py:274
↓ 47 callersMethodvalues
(self)
keras/src/utils/config.py:117
↓ 45 callersMethodexport
Exports the Keras model to a TFLite file. Args: filepath: Output path for the exported model Returns: Path t
keras/src/export/litert.py:98
↓ 43 callersFunctionbroadcast_shapes
Broadcast input shapes to a unified shape. Convert to list for mutability. Args: shape1: A tuple or list of integers. shape2
keras/src/ops/operation_utils.py:13
↓ 43 callersMethodquantize
(self, mode=None, type_check=True, config=None)
keras/src/layers/core/dense.py:1031
↓ 41 callersFunctionstandardize_axis_for_numpy
Standardize an axis to a tuple if it is a list in the numpy backend.
keras/src/backend/common/backend_utils.py:368
↓ 40 callersMethod__init__
(self)
keras/src/layers/layer_test.py:24
↓ 40 callersFunctiondraw_seed
(seed)
keras/src/random/seed_generator.py:149
↓ 37 callersMethod__init__
(self, alpha=1.0, *, name=None)
keras/src/ops/nn.py:547
↓ 37 callersMethodbuild
(self, input_shape)
keras/src/layers/core/einsum_dense.py:180
↓ 37 callersMethodfrom_config
(cls, config)
keras/src/metrics/metric.py:234
↓ 36 callersMethod_clip_gradients
(self, grads)
keras/src/optimizers/base_optimizer.py:870
↓ 36 callersMethodassertNotAllClose
(self, x1, x2, atol=1e-6, rtol=1e-6, msg=None)
keras/src/testing/test_case.py:73
↓ 36 callersMethodserialize
(self)
keras/src/saving/serialization_lib.py:70
↓ 36 callersFunctionto_torch_dtype
(dtype)
keras/src/backend/torch/core.py:98
↓ 35 callersMethodadd
Adds a layer instance on top of the layer stack. Args: layer: layer instance.
keras/src/models/sequential.py:78
↓ 35 callersMethodsave
Save the `FeatureSpace` instance to a `.keras` file. You can reload it via `keras.models.load_model()`: ```python feature_sp
keras/src/layers/preprocessing/feature_space.py:802
↓ 35 callersMethodscope
Context manager to make the `Distribution` current.
keras/src/distribution/distribution_lib.py:400
↓ 35 callersMethodsymbolic_call
(self, *args, **kwargs)
keras/src/layers/layer.py:868
↓ 34 callersMethodcumsum
(carry, xs)
keras/src/ops/core_test.py:1853
↓ 34 callersMethodexport
Export the model as an artifact for inference. Args: filepath: `str` or `pathlib.Path` object. The path to save the
keras/src/models/model.py:654
↓ 34 callersFunctionreduce_shape
(shape, axis=None, keepdims=False)
keras/src/ops/operation_utils.py:444
↓ 31 callersFunctionall
Test whether all array elements along a given axis evaluate to `True`. Args: x: Input tensor. axis: An integer or tuple of intege
keras/src/ops/numpy.py:318
↓ 31 callersMethodassign
Assign a value to a variable. This should be used in optimizers instead of `variable.assign(value)` to support backend specific optim
keras/src/optimizers/base_optimizer.py:415
↓ 31 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/openvino/core.py:840
↓ 31 callersFunctionfloatx
Return the default float type, as a string. E.g. `'bfloat16'`, `'float16'`, `'float32'`, `'float64'`. Returns: String, the current d
keras/src/backend/config.py:27
↓ 31 callersFunctionmax
Return the maximum of a tensor or maximum along an axis. Args: x: Input tensor. axis: Axis or axes along which to operate. By def
keras/src/ops/numpy.py:5140
↓ 31 callersFunctionmin
Return the minimum of a tensor or minimum along an axis. Args: x: Input tensor. axis: Axis or axes along which to operate. By def
keras/src/ops/numpy.py:5379
↓ 31 callersMethodquantize
(self, mode=None, type_check=True, config=None)
keras/src/layers/core/einsum_dense.py:1267
↓ 30 callersFunctionalign_operand_types
(x1, x2, op_name, force_float=False)
keras/src/backend/openvino/core.py:80
↓ 30 callersFunctionany
Test whether any array element along a given axis evaluates to `True`. Args: x: Input tensor. axis: An integer or tuple of intege
keras/src/ops/numpy.py:467
↓ 30 callersMethodsave_weights
Saves all weights to a single file or sharded files. By default, the weights will be saved in a single `.weights.h5` file. If shardin
keras/src/models/model.py:320
↓ 28 callersMethodget_weights
Return the values of `layer.weights` as a list of NumPy arrays.
keras/src/layers/layer.py:770
↓ 27 callersMethod_get_seed_generator
(self, backend=None)
keras/src/layers/preprocessing/data_layer.py:137
↓ 27 callersMethodextend
(self, values)
keras/src/utils/tracking.py:156
↓ 26 callersMethod_get_variable_index
(self, variable)
keras/src/optimizers/base_optimizer.py:238
↓ 26 callersFunctionmax
DEPRECATED.
keras/src/legacy/backend.py:996
↓ 25 callersMethodbuild
(self, input_shape=None)
keras/src/models/sequential.py:164
↓ 25 callersMethodsave
Save the edited weights file. Args: filepath: Path to save the file to. Must be a `.weights.h5` file.
keras/src/saving/file_editor.py:416
↓ 24 callersMethodbuild
(self, input_shape=None)
keras/src/layers/core/embedding.py:146
↓ 24 callersMethodclose
(self)
keras/src/saving/saving_lib.py:1424
next →1–100 of 14,520, ranked by callers