MCPcopy Create free account

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

Functions12,633 in github.com/keras-team/keras

↓ 1,341 callersMethodassertAllClose
(self, x1, x2, atol=1e-6, rtol=1e-6, msg=None)
keras/src/testing/test_case.py:43
↓ 491 callersMethodsymbolic_call
(self, *args, **kwargs)
keras/src/ops/operation.py:79
↓ 448 callersFunctionstandardize_dtype
(dtype)
keras/src/backend/common/variables.py:569
↓ 417 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
↓ 407 callersMethodreshape
(self, newshape)
keras/src/backend/common/keras_tensor.py:139
↓ 288 callersFunctionany_symbolic_tensors
(args=None, kwargs=None)
keras/src/backend/common/keras_tensor.py:402
↓ 288 callersMethodappend
(self, value)
keras/src/utils/tracking.py:144
↓ 258 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/torch/core.py:189
↓ 210 callersMethodshape
(self)
keras/src/backend/tensorflow/core.py:79
↓ 204 callersMethodget_temp_dir
(self)
keras/src/testing/test_case.py:38
↓ 196 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/jax/core.py:238
↓ 194 callersMethodcompile
Configures the model for training. Example: ```python model.compile( optimizer=keras.optimizers.Adam(learning_ra
keras/src/trainers/trainer.py:41
↓ 193 callersMethodsum
(x, axis)
keras/src/backend/common/thread_safe_test.py:15
↓ 185 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:340
↓ 172 callersMethodmap_structure
(obj)
keras/src/utils/dataset_utils_test.py:27
↓ 168 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/tensorflow/core.py:139
↓ 167 callersMethodadd
(self, n, values=None)
keras/src/utils/progbar.py:203
↓ 160 callersMethodassertAlmostEqual
(self, x1, x2, decimal=3, msg=None)
keras/src/testing/test_case.py:60
↓ 159 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:512
↓ 158 callersFunctionget_ov_output
(x, ov_type=None)
keras/src/backend/openvino/core.py:99
↓ 156 callersMethodconvert_to_numpy
Convert a tensor to a NumPy array. Only called after slicing using `__getitem__`. Args: x: the tensor to convert.
keras/src/trainers/data_adapters/array_slicing.py:66
↓ 155 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:172
↓ 140 callersFunctionconvert_to_tensor
(x, dtype=None, sparse=None, ragged=None)
keras/src/backend/numpy/core.py:37
↓ 139 callersMethodsqueeze
(self, axis=None)
keras/src/backend/common/keras_tensor.py:144
↓ 134 callersMethodkeys
(self)
keras/src/utils/config.py:114
↓ 124 callersMethodassertLen
(self, iterable, expected_len, msg=None)
keras/src/testing/test_case.py:78
↓ 122 callersMethodconcatenate
(outputs)
keras/src/backend/jax/trainer.py:214
↓ 115 callersMethoditems
(self)
keras/src/utils/config.py:120
↓ 107 callersMethodnumpy
(self)
keras/src/backend/tensorflow/core.py:75
↓ 102 callersMethodassertDType
(self, x, dtype, msg=None)
keras/src/testing/test_case.py:120
↓ 96 callersMethodassign
(self, value)
keras/src/backend/common/variables.py:278
↓ 91 callersMethodmap
(self, x)
keras/src/trainers/data_adapters/grain_dataset_adapter.py:143
↓ 90 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:809
↓ 89 callersMethodupdate
(self, *args, **kwargs)
keras/src/utils/config.py:127
↓ 79 callersMethodpop
(self, *args)
keras/src/utils/config.py:123
↓ 73 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:514
↓ 73 callersMethodpad
(self, boxes, top, left)
keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/bounding_box.py:237
↓ 72 callersMethod__init__
(self, axis=None, keepdims=False, *, name=None)
keras/src/ops/numpy.py:241
↓ 71 callersFunctioncast
(x, dtype)
keras/src/backend/torch/core.py:277
↓ 71 callersMethodconvert
(self, conversion_fn)
keras/src/ops/symbolic_arguments.py:26
↓ 70 callersMethodbenchmark_predict
(self, num_samples, batch_size, data=None)
benchmarks/layer_benchmark/base_benchmark.py:179
↓ 70 callersMethodbenchmark_train
(self, num_samples, batch_size, data=None, label=None)
benchmarks/layer_benchmark/base_benchmark.py:223
↓ 68 callersMethodrun_class_serialization_test
(self, instance, custom_objects=None)
keras/src/testing/test_case.py:138
↓ 66 callersMethodget
(self, keyname, value=None)
keras/src/utils/config.py:131
↓ 61 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:145
↓ 61 callersMethodresult
Compute the current metric value. Returns: A scalar tensor, or a dictionary of scalar tensors.
keras/src/metrics/metric.py:146
↓ 59 callersMethodapply_gradients
(self, grads_and_vars)
keras/src/optimizers/base_optimizer.py:460
↓ 58 callersMethodall
(cls)
keras/src/legacy/losses.py:12
↓ 58 callersMethodget
(self, unused_object_id)
keras/src/legacy/saving/serialization.py:78
↓ 58 callersFunctionget_device
()
keras/src/backend/torch/core.py:70
↓ 57 callersMethodupdate_state
Accumulate statistics for the metric.
keras/src/metrics/metric.py:117
↓ 53 callersMethodconcat
(self, x)
keras/src/backend/tensorflow/saved_model_test.py:333
↓ 51 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:714
↓ 49 callersFunctioncast
(x, dtype)
keras/src/backend/jax/core.py:289
↓ 46 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:376
↓ 46 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:272
↓ 43 callersMethodassertAllEqual
(self, x1, x2, msg=None)
keras/src/testing/test_case.py:68
↓ 41 callersMethodbuild
(self, input_shape)
keras/src/layers/core/dense.py:111
↓ 37 callersMethodfrom_config
(cls, config)
keras/src/metrics/metric.py:234
↓ 36 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:11
↓ 36 callersFunctionto_torch_dtype
(dtype)
keras/src/backend/torch/core.py:94
↓ 35 callersMethodsymbolic_call
(self, *args, **kwargs)
keras/src/layers/layer.py:812
↓ 35 callersMethodvalues
(self)
keras/src/utils/config.py:117
↓ 34 callersMethod_clip_gradients
(self, grads)
keras/src/optimizers/base_optimizer.py:878
↓ 34 callersMethodadd
Adds a layer instance on top of the layer stack. Args: layer: layer instance.
keras/src/models/sequential.py:78
↓ 34 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:276
↓ 33 callersMethod__init__
(self)
keras/src/layers/layer_test.py:25
↓ 33 callersFunctiondraw_seed
(seed)
keras/src/random/seed_generator.py:147
↓ 32 callersMethod__init__
(self, alpha=1.0, *, name=None)
keras/src/ops/nn.py:540
↓ 32 callersMethodserialize
(self)
keras/src/saving/serialization_lib.py:70
↓ 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:268
↓ 31 callersMethodassertNotAllClose
(self, x1, x2, atol=1e-6, rtol=1e-6, msg=None)
keras/src/testing/test_case.py:50
↓ 30 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:4633
↓ 29 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
↓ 29 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:318
↓ 28 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:4826
↓ 27 callersMethod_get_seed_generator
(self, backend=None)
keras/src/layers/preprocessing/data_layer.py:137
↓ 27 callersMethodget_weights
Return the values of `layer.weights` as a list of NumPy arrays.
keras/src/layers/layer.py:723
↓ 27 callersFunctionmax
DEPRECATED.
keras/src/legacy/backend.py:995
↓ 27 callersMethodscope
Context manager to make the `Distribution` current.
keras/src/distribution/distribution_lib.py:352
↓ 26 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
↓ 25 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:367
↓ 25 callersMethodcumsum
(carry, xs)
keras/src/ops/core_test.py:1567
↓ 25 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:792
↓ 24 callersMethodextend
(self, values)
keras/src/utils/tracking.py:154
↓ 24 callersFunctionloss_fn
(y_true, y_pred)
examples/demo_custom_tf_workflow.py:58
↓ 24 callersMethodremove
(self, value)
keras/src/utils/tracking.py:310
↓ 23 callersMethod_get_variable_index
(self, variable)
keras/src/optimizers/base_optimizer.py:238
↓ 23 callersMethodcond
(execution_step, optional_outputs, next_optional_inputs)
keras/src/backend/tensorflow/trainer.py:160
↓ 23 callersMethodquantize
(self, mode, type_check=True, config=None)
keras/src/layers/core/dense.py:749
↓ 22 callersMethod__init__
(self, reduction="sum_over_batch_size", name="ctc", dtype=None)
keras/src/losses/losses.py:1270
↓ 22 callersMethod_build_at_init
Build the layer at `Layer.__init__`. We can only safely mark the layer as `built=True` in `Layer.__init__` if `build` is not overridd
keras/src/layers/layer.py:389
↓ 22 callersMethodapply
Update traininable variables according to provided gradient values. `grads` should be a list of gradient tensors with 1:1 mapping to
keras/src/optimizers/base_optimizer.py:466
↓ 22 callersMethodassertSparse
(self, x, sparse=True)
keras/src/testing/test_case.py:81
↓ 22 callersMethodbuild
(self, input_shape=None)
keras/src/models/sequential.py:164
↓ 22 callersMethodget_config
(self)
keras/src/losses/losses.py:1273
↓ 22 callersFunctionstandardize_shape
(shape)
keras/src/backend/common/variables.py:587
↓ 21 callersMethodclose
(self)
keras/src/saving/saving_lib.py:1358
↓ 21 callersFunctionfunc
(x)
keras/src/tree/torchtree_impl.py:26
↓ 21 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:415
next →1–100 of 12,633, ranked by callers