SYMBOL INDEX (14089 symbols across 779 files) FILE: api_gen.py function ignore_files (line 19) | def ignore_files(_, filenames): function copy_source_to_build_directory (line 23) | def copy_source_to_build_directory(root_path): function create_legacy_directory (line 36) | def create_legacy_directory(package_dir): function export_version_string (line 140) | def export_version_string(api_init_fname): function build (line 148) | def build(): FILE: benchmarks/layer_benchmark/activation_benchmark.py function benchmark_elu (line 23) | def benchmark_elu( function benchmark_prelu (line 47) | def benchmark_prelu( function benchmark_relu (line 71) | def benchmark_relu( function benchmark_leaky_relu (line 95) | def benchmark_leaky_relu( function benchmark_softmax (line 119) | def benchmark_softmax( function main (line 152) | def main(_): FILE: benchmarks/layer_benchmark/attention_benchmark.py function benchmark_attention (line 23) | def benchmark_attention( function benchmark_multi_head_attention (line 49) | def benchmark_multi_head_attention( function benchmark_additive_attention (line 78) | def benchmark_additive_attention( function main (line 111) | def main(_): FILE: benchmarks/layer_benchmark/base_benchmark.py class BenchmarkMetricsCallback (line 37) | class BenchmarkMetricsCallback: method __init__ (line 38) | def __init__(self, start_batch=1, stop_batch=None): method on_train_batch_begin (line 44) | def on_train_batch_begin(self, batch, logs=None): method on_train_batch_end (line 48) | def on_train_batch_end(self, batch, logs=None): method on_predict_batch_begin (line 56) | def on_predict_batch_begin(self, batch, logs=None): method on_predict_batch_end (line 60) | def on_predict_batch_end(self, batch, logs=None): class KerasCoreBenchmarkMetricsCallback (line 69) | class KerasCoreBenchmarkMetricsCallback(keras.callbacks.Callback): method __init__ (line 70) | def __init__(self, start_batch=1, stop_batch=None): method on_train_batch_begin (line 73) | def on_train_batch_begin(self, batch, logs=None): method on_train_batch_end (line 76) | def on_train_batch_end(self, batch, logs=None): method on_predict_batch_begin (line 79) | def on_predict_batch_begin(self, batch, logs=None): method on_predict_batch_end (line 82) | def on_predict_batch_end(self, batch, logs=None): class TFKerasBenchmarkMetricsCallback (line 86) | class TFKerasBenchmarkMetricsCallback(tf.keras.callbacks.Callback): method __init__ (line 87) | def __init__(self, start_batch=1, stop_batch=None): method on_train_batch_begin (line 90) | def on_train_batch_begin(self, batch, logs=None): method on_train_batch_end (line 93) | def on_train_batch_end(self, batch, logs=None): method on_predict_batch_begin (line 96) | def on_predict_batch_begin(self, batch, logs=None): method on_predict_batch_end (line 99) | def on_predict_batch_end(self, batch, logs=None): class LayerBenchmark (line 103) | class LayerBenchmark: method __init__ (line 104) | def __init__( method _build_keras_model (line 151) | def _build_keras_model(self, input_shape, flat_call_inputs=True): method _build_tf_keras_model (line 165) | def _build_tf_keras_model(self, input_shape, flat_call_inputs=True): method benchmark_predict (line 179) | def benchmark_predict(self, num_samples, batch_size, data=None): method benchmark_train (line 223) | def benchmark_train(self, num_samples, batch_size, data=None, label=No... FILE: benchmarks/layer_benchmark/conv_benchmark.py function benchmark_conv1D (line 23) | def benchmark_conv1D( function benchmark_conv2D (line 51) | def benchmark_conv2D( function benchmark_conv3D (line 79) | def benchmark_conv3D( function benchmark_depthwise_conv1D (line 107) | def benchmark_depthwise_conv1D( function benchmark_depthwise_conv2D (line 135) | def benchmark_depthwise_conv2D( function benchmark_separable_conv1D (line 163) | def benchmark_separable_conv1D( function benchmark_separable_conv2D (line 192) | def benchmark_separable_conv2D( function benchmark_conv1D_transpose (line 221) | def benchmark_conv1D_transpose( function benchmark_conv2D_transpose (line 249) | def benchmark_conv2D_transpose( function benchmark_conv3D_transpose (line 277) | def benchmark_conv3D_transpose( function main (line 319) | def main(_): FILE: benchmarks/layer_benchmark/core_benchmark.py function benchmark_dense (line 24) | def benchmark_dense( function benchmark_einsum_dense (line 49) | def benchmark_einsum_dense( function benchmark_embedding (line 77) | def benchmark_embedding( function main (line 117) | def main(_): FILE: benchmarks/layer_benchmark/merge_benchmark.py function benchmark_add (line 23) | def benchmark_add( function benchmark_average (line 49) | def benchmark_average( function benchmark_concatenate (line 75) | def benchmark_concatenate( function benchmark_dot (line 101) | def benchmark_dot( function benchmark_maximum (line 127) | def benchmark_maximum( function benchmark_minimum (line 153) | def benchmark_minimum( function benchmark_multiply (line 179) | def benchmark_multiply( function benchmark_subtract (line 205) | def benchmark_subtract( function main (line 243) | def main(_): FILE: benchmarks/layer_benchmark/normalization_benchmark.py function benchmark_batch_normalization (line 23) | def benchmark_batch_normalization( function benchmark_group_normalization (line 48) | def benchmark_group_normalization( function benchmark_layer_normalization (line 75) | def benchmark_layer_normalization( function benchmark_unit_normalization (line 100) | def benchmark_unit_normalization( function main (line 133) | def main(_): FILE: benchmarks/layer_benchmark/pooling_benchmark.py function benchmark_average_pooling1d (line 23) | def benchmark_average_pooling1d( function benchmark_average_pooling2d (line 50) | def benchmark_average_pooling2d( function benchmark_average_pooling3d (line 77) | def benchmark_average_pooling3d( function benchmark_max_pooling1d (line 104) | def benchmark_max_pooling1d( function benchmark_max_pooling2d (line 131) | def benchmark_max_pooling2d( function benchmark_max_pooling3d (line 158) | def benchmark_max_pooling3d( function benchmark_global_average_pooling1d (line 185) | def benchmark_global_average_pooling1d( function benchmark_global_average_pooling2d (line 210) | def benchmark_global_average_pooling2d( function benchmark_global_average_pooling3d (line 235) | def benchmark_global_average_pooling3d( function benchmark_global_max_pooling1d (line 260) | def benchmark_global_max_pooling1d( function benchmark_global_max_pooling2d (line 285) | def benchmark_global_max_pooling2d( function benchmark_global_max_pooling3d (line 310) | def benchmark_global_max_pooling3d( function main (line 351) | def main(_): FILE: benchmarks/layer_benchmark/random_rotation_benchmark.py function benchmark_random_rotation (line 11) | def benchmark_random_rotation( function main (line 44) | def main(_): FILE: benchmarks/layer_benchmark/regularization_benchmark.py function benchmark_dropout (line 23) | def benchmark_dropout( function benchmark_gaussian_dropout (line 50) | def benchmark_gaussian_dropout( function benchmark_gaussian_noise (line 77) | def benchmark_gaussian_noise( function benchmark_spatial_dropout1D (line 104) | def benchmark_spatial_dropout1D( function benchmark_spatial_dropout2D (line 131) | def benchmark_spatial_dropout2D( function benchmark_spatial_dropout3D (line 158) | def benchmark_spatial_dropout3D( function main (line 195) | def main(_): FILE: benchmarks/layer_benchmark/reshaping_benchmark.py function benchmark_cropping1d (line 23) | def benchmark_cropping1d( function benchmark_cropping2d (line 48) | def benchmark_cropping2d( function benchmark_cropping3d (line 73) | def benchmark_cropping3d( function benchmark_flatten (line 98) | def benchmark_flatten( function benchmark_permute (line 123) | def benchmark_permute( function benchmark_up_sampling1d (line 150) | def benchmark_up_sampling1d( function benchmark_up_sampling2d (line 175) | def benchmark_up_sampling2d( function benchmark_up_sampling3d (line 200) | def benchmark_up_sampling3d( function benchmark_zero_padding1d (line 225) | def benchmark_zero_padding1d( function benchmark_zero_padding2d (line 250) | def benchmark_zero_padding2d( function benchmark_zero_padding3d (line 275) | def benchmark_zero_padding3d( function main (line 315) | def main(_): FILE: benchmarks/layer_benchmark/rnn_benchmark.py function benchmark_conv_lstm1d (line 25) | def benchmark_conv_lstm1d( function benchmark_conv_lstm2d (line 53) | def benchmark_conv_lstm2d( function benchmark_conv_lstm3d (line 81) | def benchmark_conv_lstm3d( function benchmark_gru (line 109) | def benchmark_gru( function benchmark_lstm (line 136) | def benchmark_lstm( function benchmark_simple_rnn (line 163) | def benchmark_simple_rnn( function benchmark_bidirectional (line 190) | def benchmark_bidirectional( function benchmark_time_distributed (line 219) | def benchmark_time_distributed( function main (line 262) | def main(_): FILE: benchmarks/model_benchmark/benchmark_utils.py class BenchmarkMetricsCallback (line 6) | class BenchmarkMetricsCallback(keras.callbacks.Callback): method __init__ (line 7) | def __init__(self, start_batch=1, stop_batch=None): method on_train_batch_begin (line 14) | def on_train_batch_begin(self, batch, logs=None): method on_train_batch_end (line 18) | def on_train_batch_end(self, batch, logs=None): FILE: benchmarks/model_benchmark/bert_benchmark.py function load_data (line 47) | def load_data(): function load_model (line 86) | def load_model(): function main (line 97) | def main(_): FILE: benchmarks/model_benchmark/image_classification_benchmark.py function load_data (line 54) | def load_data(): function load_model (line 84) | def load_model(): function main (line 99) | def main(_): FILE: benchmarks/torch_ctl_benchmark/benchmark_utils.py function train_loop (line 7) | def train_loop(model, train_loader, num_epochs, optimizer, loss_fn, fram... FILE: benchmarks/torch_ctl_benchmark/conv_model_benchmark.py class TorchModel (line 38) | class TorchModel(torch.nn.Module): method __init__ (line 39) | def __init__(self): method forward (line 49) | def forward(self, x): function run_keras_custom_training_loop (line 59) | def run_keras_custom_training_loop(): function run_torch_custom_training_loop (line 82) | def run_torch_custom_training_loop(): FILE: benchmarks/torch_ctl_benchmark/dense_model_benchmark.py class TorchModel (line 38) | class TorchModel(torch.nn.Module): method __init__ (line 39) | def __init__(self): method forward (line 49) | def forward(self, x): function run_keras_custom_training_loop (line 59) | def run_keras_custom_training_loop(): function run_torch_custom_training_loop (line 81) | def run_torch_custom_training_loop(): FILE: conftest.py function pytest_configure (line 14) | def pytest_configure(config): function pytest_collection_modifyitems (line 21) | def pytest_collection_modifyitems(config, items): function skip_if_backend (line 77) | def skip_if_backend(given_backend, reason): FILE: examples/demo_custom_jax_workflow.py class MyDense (line 18) | class MyDense(layers.Layer): method __init__ (line 19) | def __init__(self, units, name=None): method build (line 23) | def build(self, input_shape): method call (line 33) | def call(self, inputs): class MyModel (line 37) | class MyModel(Model): method __init__ (line 38) | def __init__(self, hidden_dim, output_dim): method call (line 44) | def call(self, x): function Dataset (line 50) | def Dataset(): function loss_fn (line 55) | def loss_fn(y_true, y_pred): function compute_loss_and_updates (line 74) | def compute_loss_and_updates( function train_step (line 88) | def train_step(state, data): FILE: examples/demo_custom_layer_backend_agnostic.py class MyDense (line 13) | class MyDense(layers.Layer): method __init__ (line 14) | def __init__(self, units, name=None): method build (line 18) | def build(self, input_shape): method call (line 34) | def call(self, inputs): class MyDropout (line 39) | class MyDropout(layers.Layer): method __init__ (line 40) | def __init__(self, rate, name=None): method call (line 48) | def call(self, inputs): class MyModel (line 53) | class MyModel(Model): method __init__ (line 54) | def __init__(self, hidden_dim, output_dim): method call (line 61) | def call(self, x): FILE: examples/demo_custom_tf_workflow.py class MyDense (line 18) | class MyDense(layers.Layer): method __init__ (line 19) | def __init__(self, units, name=None): method build (line 23) | def build(self, input_shape): method call (line 33) | def call(self, inputs): class MyModel (line 37) | class MyModel(Model): method __init__ (line 38) | def __init__(self, hidden_dim, output_dim): method call (line 44) | def call(self, x): function Dataset (line 50) | def Dataset(): function loss_fn (line 58) | def loss_fn(y_true, y_pred): function train_step (line 72) | def train_step(data): FILE: examples/demo_custom_torch_workflow.py function train (line 59) | def train(model, train_loader, num_epochs, optimizer, loss_fn): class MyModel (line 102) | class MyModel(nn.Module): method __init__ (line 103) | def __init__(self): method forward (line 118) | def forward(self, x): FILE: examples/demo_jax_distributed.py function make_backbone (line 57) | def make_backbone(): function make_model (line 92) | def make_model(): function compute_loss (line 254) | def compute_loss(trainable_variables, non_trainable_variables, x, y): function train_step (line 268) | def train_step(train_state, x, y): function predict (line 306) | def predict(data): FILE: examples/demo_subclass.py class MyModel (line 10) | class MyModel(Model): method __init__ (line 11) | def __init__(self, hidden_dim, output_dim): method call (line 17) | def call(self, x): FILE: examples/demo_torch_multi_gpu.py function get_data (line 28) | def get_data(): function get_model (line 49) | def get_model(): class MyModel (line 66) | class MyModel(nn.Module): method __init__ (line 67) | def __init__(self): method forward (line 82) | def forward(self, x): function train (line 86) | def train(model, train_loader, num_epochs, optimizer, loss_fn): function setup (line 114) | def setup(current_gpu_index, num_gpu): function prepare (line 128) | def prepare(dataset, current_gpu_index, num_gpu, batch_size): function cleanup (line 147) | def cleanup(): function main (line 152) | def main(current_gpu_index, num_gpu): FILE: guides/custom_train_step_in_jax.py class CustomModel (line 77) | class CustomModel(keras.Model): method compute_loss_and_updates (line 78) | def compute_loss_and_updates( method train_step (line 95) | def train_step(self, state, data): method __init__ (line 181) | def __init__(self, *args, **kwargs): method compute_loss_and_updates (line 187) | def compute_loss_and_updates( method train_step (line 204) | def train_step(self, state, data): method metrics (line 268) | def metrics(self): method test_step (line 298) | def test_step(self, state, data): class CustomModel (line 180) | class CustomModel(keras.Model): method compute_loss_and_updates (line 78) | def compute_loss_and_updates( method train_step (line 95) | def train_step(self, state, data): method __init__ (line 181) | def __init__(self, *args, **kwargs): method compute_loss_and_updates (line 187) | def compute_loss_and_updates( method train_step (line 204) | def train_step(self, state, data): method metrics (line 268) | def metrics(self): method test_step (line 298) | def test_step(self, state, data): class CustomModel (line 297) | class CustomModel(keras.Model): method compute_loss_and_updates (line 78) | def compute_loss_and_updates( method train_step (line 95) | def train_step(self, state, data): method __init__ (line 181) | def __init__(self, *args, **kwargs): method compute_loss_and_updates (line 187) | def compute_loss_and_updates( method train_step (line 204) | def train_step(self, state, data): method metrics (line 268) | def metrics(self): method test_step (line 298) | def test_step(self, state, data): FILE: guides/custom_train_step_in_tensorflow.py class CustomModel (line 83) | class CustomModel(keras.Model): method train_step (line 84) | def train_step(self, data): method __init__ (line 150) | def __init__(self, *args, **kwargs): method train_step (line 156) | def train_step(self, data): method metrics (line 180) | def metrics(self): method train_step (line 216) | def train_step(self, data): method test_step (line 276) | def test_step(self, data): class CustomModel (line 149) | class CustomModel(keras.Model): method train_step (line 84) | def train_step(self, data): method __init__ (line 150) | def __init__(self, *args, **kwargs): method train_step (line 156) | def train_step(self, data): method metrics (line 180) | def metrics(self): method train_step (line 216) | def train_step(self, data): method test_step (line 276) | def test_step(self, data): class CustomModel (line 215) | class CustomModel(keras.Model): method train_step (line 84) | def train_step(self, data): method __init__ (line 150) | def __init__(self, *args, **kwargs): method train_step (line 156) | def train_step(self, data): method metrics (line 180) | def metrics(self): method train_step (line 216) | def train_step(self, data): method test_step (line 276) | def test_step(self, data): class CustomModel (line 275) | class CustomModel(keras.Model): method train_step (line 84) | def train_step(self, data): method __init__ (line 150) | def __init__(self, *args, **kwargs): method train_step (line 156) | def train_step(self, data): method metrics (line 180) | def metrics(self): method train_step (line 216) | def train_step(self, data): method test_step (line 276) | def test_step(self, data): class GAN (line 357) | class GAN(keras.Model): method __init__ (line 358) | def __init__(self, discriminator, generator, latent_dim): method metrics (line 368) | def metrics(self): method compile (line 371) | def compile(self, d_optimizer, g_optimizer, loss_fn): method train_step (line 377) | def train_step(self, real_images): FILE: guides/custom_train_step_in_torch.py class CustomModel (line 84) | class CustomModel(keras.Model): method train_step (line 85) | def train_step(self, data): method __init__ (line 158) | def __init__(self, *args, **kwargs): method train_step (line 164) | def train_step(self, data): method metrics (line 195) | def metrics(self): method train_step (line 231) | def train_step(self, data): method test_step (line 296) | def test_step(self, data): class CustomModel (line 157) | class CustomModel(keras.Model): method train_step (line 85) | def train_step(self, data): method __init__ (line 158) | def __init__(self, *args, **kwargs): method train_step (line 164) | def train_step(self, data): method metrics (line 195) | def metrics(self): method train_step (line 231) | def train_step(self, data): method test_step (line 296) | def test_step(self, data): class CustomModel (line 230) | class CustomModel(keras.Model): method train_step (line 85) | def train_step(self, data): method __init__ (line 158) | def __init__(self, *args, **kwargs): method train_step (line 164) | def train_step(self, data): method metrics (line 195) | def metrics(self): method train_step (line 231) | def train_step(self, data): method test_step (line 296) | def test_step(self, data): class CustomModel (line 295) | class CustomModel(keras.Model): method train_step (line 85) | def train_step(self, data): method __init__ (line 158) | def __init__(self, *args, **kwargs): method train_step (line 164) | def train_step(self, data): method metrics (line 195) | def metrics(self): method train_step (line 231) | def train_step(self, data): method test_step (line 296) | def test_step(self, data): class GAN (line 377) | class GAN(keras.Model): method __init__ (line 378) | def __init__(self, discriminator, generator, latent_dim): method metrics (line 389) | def metrics(self): method compile (line 392) | def compile(self, d_optimizer, g_optimizer, loss_fn): method train_step (line 398) | def train_step(self, real_images): FILE: guides/distributed_training_with_jax.py function get_model (line 58) | def get_model(): function get_datasets (line 92) | def get_datasets(): function compute_loss (line 176) | def compute_loss(trainable_variables, non_trainable_variables, x, y): function train_step (line 190) | def train_step(train_state, x, y): function get_replicated_train_state (line 212) | def get_replicated_train_state(devices): FILE: guides/distributed_training_with_tensorflow.py function get_compiled_model (line 116) | def get_compiled_model(): function get_dataset (line 131) | def get_dataset(): function make_or_restore_model (line 193) | def make_or_restore_model(): function run_training (line 208) | def run_training(epochs=1): FILE: guides/distributed_training_with_torch.py function get_model (line 53) | def get_model(): function get_dataset (line 87) | def get_dataset(): function train_model (line 112) | def train_model(model, dataloader, num_epochs, optimizer, loss_fn): function setup_device (line 193) | def setup_device(current_gpu_index, num_gpus): function cleanup (line 207) | def cleanup(): function prepare_dataloader (line 211) | def prepare_dataloader(dataset, current_gpu_index, num_gpus, batch_size): function per_device_launch_fn (line 227) | def per_device_launch_fn(current_gpu_index, num_gpu): FILE: guides/functional_api.py function get_model (line 290) | def get_model(): class CustomDense (line 596) | class CustomDense(layers.Layer): method __init__ (line 597) | def __init__(self, units=32): method build (line 601) | def build(self, input_shape): method call (line 611) | def call(self, inputs): method __init__ (line 627) | def __init__(self, units=32): method build (line 631) | def build(self, input_shape): method call (line 641) | def call(self, inputs): method get_config (line 644) | def get_config(self): class CustomDense (line 626) | class CustomDense(layers.Layer): method __init__ (line 597) | def __init__(self, units=32): method build (line 601) | def build(self, input_shape): method call (line 611) | def call(self, inputs): method __init__ (line 627) | def __init__(self, units=32): method build (line 631) | def build(self, input_shape): method call (line 641) | def call(self, inputs): method get_config (line 644) | def get_config(self): class CustomRNN (line 796) | class CustomRNN(layers.Layer): method __init__ (line 797) | def __init__(self): method call (line 805) | def call(self, inputs): method __init__ (line 851) | def __init__(self): method call (line 858) | def call(self, inputs): class CustomRNN (line 850) | class CustomRNN(layers.Layer): method __init__ (line 797) | def __init__(self): method call (line 805) | def call(self, inputs): method __init__ (line 851) | def __init__(self): method call (line 858) | def call(self, inputs): FILE: guides/making_new_layers_and_models_via_subclassing.py class Linear (line 49) | class Linear(keras.layers.Layer): method __init__ (line 50) | def __init__(self, units=32, input_dim=32): method call (line 61) | def call(self, inputs): method __init__ (line 131) | def __init__(self, units=32, input_dim=32): method call (line 142) | def call(self, inputs): method __init__ (line 157) | def __init__(self, units=32): method build (line 161) | def build(self, input_shape): method call (line 171) | def call(self, inputs): method __init__ (line 385) | def __init__(self, units=32): method build (line 389) | def build(self, input_shape): method call (line 399) | def call(self, inputs): method get_config (line 402) | def get_config(self): method __init__ (line 421) | def __init__(self, units=32, **kwargs): method build (line 425) | def build(self, input_shape): method call (line 435) | def call(self, inputs): method get_config (line 438) | def get_config(self): class ComputeSum (line 93) | class ComputeSum(keras.layers.Layer): method __init__ (line 94) | def __init__(self, input_dim): method call (line 100) | def call(self, inputs): class Linear (line 130) | class Linear(keras.layers.Layer): method __init__ (line 50) | def __init__(self, units=32, input_dim=32): method call (line 61) | def call(self, inputs): method __init__ (line 131) | def __init__(self, units=32, input_dim=32): method call (line 142) | def call(self, inputs): method __init__ (line 157) | def __init__(self, units=32): method build (line 161) | def build(self, input_shape): method call (line 171) | def call(self, inputs): method __init__ (line 385) | def __init__(self, units=32): method build (line 389) | def build(self, input_shape): method call (line 399) | def call(self, inputs): method get_config (line 402) | def get_config(self): method __init__ (line 421) | def __init__(self, units=32, **kwargs): method build (line 425) | def build(self, input_shape): method call (line 435) | def call(self, inputs): method get_config (line 438) | def get_config(self): class Linear (line 156) | class Linear(keras.layers.Layer): method __init__ (line 50) | def __init__(self, units=32, input_dim=32): method call (line 61) | def call(self, inputs): method __init__ (line 131) | def __init__(self, units=32, input_dim=32): method call (line 142) | def call(self, inputs): method __init__ (line 157) | def __init__(self, units=32): method build (line 161) | def build(self, input_shape): method call (line 171) | def call(self, inputs): method __init__ (line 385) | def __init__(self, units=32): method build (line 389) | def build(self, input_shape): method call (line 399) | def call(self, inputs): method get_config (line 402) | def get_config(self): method __init__ (line 421) | def __init__(self, units=32, **kwargs): method build (line 425) | def build(self, input_shape): method call (line 435) | def call(self, inputs): method get_config (line 438) | def get_config(self): class MLPBlock (line 202) | class MLPBlock(keras.layers.Layer): method __init__ (line 203) | def __init__(self): method call (line 209) | def call(self, inputs): class ActivityRegularizationLayer (line 291) | class ActivityRegularizationLayer(keras.layers.Layer): method __init__ (line 292) | def __init__(self, rate=1e-2): method call (line 296) | def call(self, inputs): class OuterLayer (line 309) | class OuterLayer(keras.layers.Layer): method __init__ (line 310) | def __init__(self): method call (line 314) | def call(self, inputs): class OuterLayerWithKernelRegularizer (line 336) | class OuterLayerWithKernelRegularizer(keras.layers.Layer): method __init__ (line 337) | def __init__(self): method call (line 343) | def call(self, inputs): class Linear (line 384) | class Linear(keras.layers.Layer): method __init__ (line 50) | def __init__(self, units=32, input_dim=32): method call (line 61) | def call(self, inputs): method __init__ (line 131) | def __init__(self, units=32, input_dim=32): method call (line 142) | def call(self, inputs): method __init__ (line 157) | def __init__(self, units=32): method build (line 161) | def build(self, input_shape): method call (line 171) | def call(self, inputs): method __init__ (line 385) | def __init__(self, units=32): method build (line 389) | def build(self, input_shape): method call (line 399) | def call(self, inputs): method get_config (line 402) | def get_config(self): method __init__ (line 421) | def __init__(self, units=32, **kwargs): method build (line 425) | def build(self, input_shape): method call (line 435) | def call(self, inputs): method get_config (line 438) | def get_config(self): class Linear (line 420) | class Linear(keras.layers.Layer): method __init__ (line 50) | def __init__(self, units=32, input_dim=32): method call (line 61) | def call(self, inputs): method __init__ (line 131) | def __init__(self, units=32, input_dim=32): method call (line 142) | def call(self, inputs): method __init__ (line 157) | def __init__(self, units=32): method build (line 161) | def build(self, input_shape): method call (line 171) | def call(self, inputs): method __init__ (line 385) | def __init__(self, units=32): method build (line 389) | def build(self, input_shape): method call (line 399) | def call(self, inputs): method get_config (line 402) | def get_config(self): method __init__ (line 421) | def __init__(self, units=32, **kwargs): method build (line 425) | def build(self, input_shape): method call (line 435) | def call(self, inputs): method get_config (line 438) | def get_config(self): class CustomDropout (line 477) | class CustomDropout(keras.layers.Layer): method __init__ (line 478) | def __init__(self, rate, **kwargs): method call (line 482) | def call(self, inputs, training=None): class Sampling (line 591) | class Sampling(layers.Layer): method call (line 594) | def call(self, inputs): class Encoder (line 602) | class Encoder(layers.Layer): method __init__ (line 605) | def __init__( method call (line 614) | def call(self, inputs): class Decoder (line 622) | class Decoder(layers.Layer): method __init__ (line 625) | def __init__( method call (line 632) | def call(self, inputs): class VariationalAutoEncoder (line 637) | class VariationalAutoEncoder(keras.Model): method __init__ (line 640) | def __init__( method call (line 655) | def call(self, inputs): FILE: guides/training_with_built_in_methods.py function get_uncompiled_model (line 193) | def get_uncompiled_model(): function get_compiled_model (line 202) | def get_compiled_model(): function custom_mean_squared_error (line 251) | def custom_mean_squared_error(y_true, y_pred): class CustomMSE (line 280) | class CustomMSE(keras.losses.Loss): method __init__ (line 281) | def __init__(self, regularization_factor=0.1, name="custom_mse"): method call (line 285) | def call(self, y_true, y_pred): class CategoricalTruePositives (line 320) | class CategoricalTruePositives(keras.metrics.Metric): method __init__ (line 321) | def __init__(self, name="categorical_true_positives", **kwargs): method update_state (line 327) | def update_state(self, y_true, y_pred, sample_weight=None): method result (line 336) | def result(self): method reset_state (line 339) | def reset_state(self): class ActivityRegularizationLayer (line 368) | class ActivityRegularizationLayer(layers.Layer): method call (line 369) | def call(self, inputs): class LogisticEndpoint (line 402) | class LogisticEndpoint(keras.layers.Layer): method __init__ (line 403) | def __init__(self, name=None): method call (line 407) | def call(self, targets, logits, sample_weights=None): class ExamplePyDataset (line 601) | class ExamplePyDataset(keras.utils.PyDataset): method __init__ (line 602) | def __init__(self, x, y, batch_size, **kwargs): method __len__ (line 608) | def __len__(self): method __getitem__ (line 611) | def __getitem__(self, idx): class ExampleTorchDataset (line 686) | class ExampleTorchDataset(torch.utils.data.Dataset): method __init__ (line 687) | def __init__(self, x, y): method __len__ (line 691) | def __len__(self): method __getitem__ (line 694) | def __getitem__(self, idx): class LossHistory (line 1079) | class LossHistory(keras.callbacks.Callback): method on_train_begin (line 1080) | def on_train_begin(self, logs): method on_batch_end (line 1083) | def on_batch_end(self, batch, logs): function make_or_restore_model (line 1132) | def make_or_restore_model(): FILE: guides/transfer_learning.py function data_augmentation (line 425) | def data_augmentation(x): FILE: guides/understanding_masking_and_padding.py class MyLayer (line 173) | class MyLayer(layers.Layer): method __init__ (line 174) | def __init__(self, **kwargs): method call (line 181) | def call(self, inputs): class TemporalSplit (line 218) | class TemporalSplit(keras.layers.Layer): method call (line 221) | def call(self, inputs): method compute_mask (line 226) | def compute_mask(self, inputs, mask=None): class CustomEmbedding (line 243) | class CustomEmbedding(keras.layers.Layer): method __init__ (line 244) | def __init__(self, input_dim, output_dim, mask_zero=False, **kwargs): method build (line 250) | def build(self, input_shape): method call (line 257) | def call(self, inputs): method compute_mask (line 261) | def compute_mask(self, inputs, mask=None): class MyActivation (line 300) | class MyActivation(keras.layers.Layer): method __init__ (line 301) | def __init__(self, **kwargs): method call (line 306) | def call(self, inputs): class TemporalSoftmax (line 340) | class TemporalSoftmax(keras.layers.Layer): method __init__ (line 341) | def __init__(self, **kwargs): method call (line 345) | def call(self, inputs, mask=None): FILE: guides/writing_a_custom_training_loop_in_jax.py function get_model (line 61) | def get_model(): function compute_loss_and_updates (line 178) | def compute_loss_and_updates( function train_step (line 214) | def train_step(state, data): function train_step (line 248) | def train_step(state, data): function compute_loss_and_updates (line 349) | def compute_loss_and_updates( function train_step (line 366) | def train_step(state, data): function eval_step (line 395) | def eval_step(state, data): class ActivityRegularizationLayer (line 484) | class ActivityRegularizationLayer(keras.layers.Layer): method call (line 485) | def call(self, inputs): function compute_loss_and_updates (line 511) | def compute_loss_and_updates( FILE: guides/writing_a_custom_training_loop_in_tensorflow.py function get_model (line 48) | def get_model(): function train_step (line 235) | def train_step(x, y): function test_step (line 251) | def test_step(x, y): class ActivityRegularizationLayer (line 312) | class ActivityRegularizationLayer(keras.layers.Layer): method call (line 313) | def call(self, inputs): function train_step (line 337) | def train_step(x, y): function train_step (line 449) | def train_step(real_images): FILE: guides/writing_a_custom_training_loop_in_torch.py function get_model (line 61) | def get_model(): class ActivityRegularizationLayer (line 301) | class ActivityRegularizationLayer(keras.layers.Layer): method call (line 302) | def call(self, inputs): FILE: guides/writing_your_own_callbacks.py function get_model (line 90) | def get_model(): class CustomCallback (line 127) | class CustomCallback(keras.callbacks.Callback): method on_train_begin (line 128) | def on_train_begin(self, logs=None): method on_train_end (line 132) | def on_train_end(self, logs=None): method on_epoch_begin (line 136) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 142) | def on_epoch_end(self, epoch, logs=None): method on_test_begin (line 146) | def on_test_begin(self, logs=None): method on_test_end (line 150) | def on_test_end(self, logs=None): method on_predict_begin (line 154) | def on_predict_begin(self, logs=None): method on_predict_end (line 158) | def on_predict_end(self, logs=None): method on_train_batch_begin (line 162) | def on_train_batch_begin(self, batch, logs=None): method on_train_batch_end (line 170) | def on_train_batch_end(self, batch, logs=None): method on_test_batch_begin (line 176) | def on_test_batch_begin(self, batch, logs=None): method on_test_batch_end (line 184) | def on_test_batch_end(self, batch, logs=None): method on_predict_batch_begin (line 192) | def on_predict_batch_begin(self, batch, logs=None): method on_predict_batch_end (line 200) | def on_predict_batch_end(self, batch, logs=None): class LossAndErrorPrintingCallback (line 238) | class LossAndErrorPrintingCallback(keras.callbacks.Callback): method on_train_batch_end (line 239) | def on_train_batch_end(self, batch, logs=None): method on_test_batch_end (line 246) | def on_test_batch_end(self, batch, logs=None): method on_epoch_end (line 253) | def on_epoch_end(self, epoch, logs=None): class EarlyStoppingAtMinLoss (line 316) | class EarlyStoppingAtMinLoss(keras.callbacks.Callback): method __init__ (line 324) | def __init__(self, patience=0): method on_train_begin (line 330) | def on_train_begin(self, logs=None): method on_epoch_end (line 338) | def on_epoch_end(self, epoch, logs=None): method on_train_end (line 353) | def on_train_end(self, logs=None): class CustomLearningRateScheduler (line 378) | class CustomLearningRateScheduler(keras.callbacks.Callback): method __init__ (line 387) | def __init__(self, schedule): method on_epoch_begin (line 391) | def on_epoch_begin(self, epoch, logs=None): function lr_schedule (line 414) | def lr_schedule(epoch, lr): FILE: integration_tests/basic_full_flow.py class MyModel (line 12) | class MyModel(keras.Model): method __init__ (line 13) | def __init__(self, hidden_dim, output_dim, **kwargs): method call (line 21) | def call(self, x): class BasicFlowTest (line 27) | class BasicFlowTest(testing.TestCase): method test_basic_fit (line 29) | def test_basic_fit(self): method test_basic_fit_no_training (line 50) | def test_basic_fit_no_training(self): FILE: integration_tests/dataset_tests/boston_housing_test.py class BostonHousingTest (line 5) | class BostonHousingTest(testing.TestCase): method test_load_data (line 6) | def test_load_data(self): method test_seed_reproducibility (line 11) | def test_seed_reproducibility(self): method test_invalid_test_split (line 18) | def test_invalid_test_split(self): FILE: integration_tests/dataset_tests/california_housing_test.py class CaliforniaHousingTest (line 5) | class CaliforniaHousingTest(testing.TestCase): method test_load_data_large (line 6) | def test_load_data_large(self): method test_load_data_small (line 14) | def test_load_data_small(self): method test_invalid_version (line 22) | def test_invalid_version(self): method test_seed_reproducibility (line 26) | def test_seed_reproducibility(self): FILE: integration_tests/dataset_tests/cifar100_test.py class Cifar100LoadDataTest (line 7) | class Cifar100LoadDataTest(testing.TestCase): method test_shapes_fine_label_mode (line 8) | def test_shapes_fine_label_mode(self): method test_shapes_coarse_label_mode (line 17) | def test_shapes_coarse_label_mode(self): method test_dtypes (line 26) | def test_dtypes(self): method test_invalid_label_mode (line 33) | def test_invalid_label_mode(self): FILE: integration_tests/dataset_tests/cifar10_test.py class Cifar10LoadDataTest (line 7) | class Cifar10LoadDataTest(testing.TestCase): method test_x_train_shape (line 8) | def test_x_train_shape(self): method test_y_train_shape (line 12) | def test_y_train_shape(self): method test_x_test_shape (line 16) | def test_x_test_shape(self): method test_y_test_shape (line 20) | def test_y_test_shape(self): method test_x_train_dtype (line 24) | def test_x_train_dtype(self): method test_y_train_dtype (line 28) | def test_y_train_dtype(self): method test_x_test_dtype (line 32) | def test_x_test_dtype(self): method test_y_test_dtype (line 36) | def test_y_test_dtype(self): FILE: integration_tests/dataset_tests/fashion_mnist_test.py class FashionMnistLoadDataTest (line 7) | class FashionMnistLoadDataTest(testing.TestCase): method test_x_train_shape (line 8) | def test_x_train_shape(self): method test_y_train_shape (line 12) | def test_y_train_shape(self): method test_x_test_shape (line 16) | def test_x_test_shape(self): method test_y_test_shape (line 20) | def test_y_test_shape(self): method test_x_train_dtype (line 24) | def test_x_train_dtype(self): method test_y_train_dtype (line 28) | def test_y_train_dtype(self): method test_x_test_dtype (line 32) | def test_x_test_dtype(self): method test_y_test_dtype (line 36) | def test_y_test_dtype(self): FILE: integration_tests/dataset_tests/imdb_test.py class ImdbLoadDataTest (line 7) | class ImdbLoadDataTest(testing.TestCase): method test_load_data_default (line 8) | def test_load_data_default(self): method test_num_words (line 25) | def test_num_words(self): method test_skip_top (line 32) | def test_skip_top(self): method test_maxlen (line 38) | def test_maxlen(self): method test_get_word_index (line 43) | def test_get_word_index(self): FILE: integration_tests/dataset_tests/mnist_test.py class MnistLoadDataTest (line 7) | class MnistLoadDataTest(testing.TestCase): method test_x_train_shape (line 8) | def test_x_train_shape(self): method test_y_train_shape (line 12) | def test_y_train_shape(self): method test_x_test_shape (line 16) | def test_x_test_shape(self): method test_y_test_shape (line 20) | def test_y_test_shape(self): method test_x_train_dtype (line 24) | def test_x_train_dtype(self): method test_y_train_dtype (line 28) | def test_y_train_dtype(self): method test_x_test_dtype (line 32) | def test_x_test_dtype(self): method test_y_test_dtype (line 36) | def test_y_test_dtype(self): FILE: integration_tests/dataset_tests/reuters_test.py class ReutersLoadDataTest (line 7) | class ReutersLoadDataTest(testing.TestCase): method test_load_data_default (line 8) | def test_load_data_default(self): method test_num_words (line 22) | def test_num_words(self): method test_skip_top (line 29) | def test_skip_top(self): method test_maxlen (line 35) | def test_maxlen(self): method test_get_word_index (line 40) | def test_get_word_index(self): method test_get_label_names (line 46) | def test_get_label_names(self): FILE: integration_tests/import_test.py function setup_package (line 20) | def setup_package(): function create_virtualenv (line 40) | def create_virtualenv(): function manage_venv_installs (line 61) | def manage_venv_installs(whl_path): function run_keras_flow (line 84) | def run_keras_flow(): function cleanup (line 92) | def cleanup(): function run_commands_local (line 104) | def run_commands_local(commands): function run_commands_venv (line 110) | def run_commands_venv(commands): function test_keras_imports (line 123) | def test_keras_imports(): FILE: integration_tests/jax_custom_fit_test.py function test_custom_fit (line 7) | def test_custom_fit(): FILE: integration_tests/model_visualization_test.py class SubclassModel (line 9) | class SubclassModel(keras.models.Model): method __init__ (line 10) | def __init__(self, name): method call (line 13) | def call(self, x): function parse_text_from_html (line 17) | def parse_text_from_html(html): function get_node_text (line 27) | def get_node_text(node): function get_edge_dict (line 37) | def get_edge_dict(dot): class ModelVisualizationTest (line 85) | class ModelVisualizationTest(testing.TestCase): method multi_plot_model (line 86) | def multi_plot_model(self, model, name, expand_nested=False): method test_plot_sequential_model (line 139) | def test_plot_sequential_model(self): method test_plot_functional_model (line 157) | def test_plot_functional_model(self): method test_plot_subclassed_model (line 196) | def test_plot_subclassed_model(self): method test_plot_nested_functional_model (line 202) | def test_plot_nested_functional_model(self): method test_plot_functional_model_with_splits_and_merges (line 265) | def test_plot_functional_model_with_splits_and_merges(self): method test_plot_sequential_in_sequential (line 298) | def test_plot_sequential_in_sequential(self): method test_plot_functional_in_functional (line 362) | def test_plot_functional_in_functional(self): method test_plot_sequential_in_sequential_in_sequential (line 425) | def test_plot_sequential_in_sequential_in_sequential(self): method test_plot_functional_in_sequential_in_sequential (line 510) | def test_plot_functional_in_sequential_in_sequential(self): method test_plot_functional_in_functional_in_functional (line 592) | def test_plot_functional_in_functional_in_functional(self): method test_plot_complex (line 673) | def test_plot_complex(self): FILE: integration_tests/numerical_test.py function build_mnist_data (line 16) | def build_mnist_data(num_classes): function build_keras_model (line 33) | def build_keras_model(keras_module, num_classes): function compile_model (line 56) | def compile_model(model): function train_model (line 66) | def train_model(model, x, y): function eval_model (line 77) | def eval_model(model, x, y): function check_history (line 83) | def check_history(h1, h2): function predict_model (line 95) | def predict_model(model, x): function numerical_test (line 99) | def numerical_test(): FILE: integration_tests/pytorch_export_test.py class TestPyTorchExportWithDynamicShapes (line 31) | class TestPyTorchExportWithDynamicShapes(testing.TestCase): method test_issue_22102_model_inference (line 39) | def test_issue_22102_model_inference(self, input_shape, expected_shape): method test_issue_22102_export_methods (line 61) | def test_issue_22102_export_methods(self, export_method): method test_fixed_layers_export (line 187) | def test_fixed_layers_export(self, layer_type): FILE: integration_tests/tf_custom_fit_test.py function test_custom_fit (line 7) | def test_custom_fit(): FILE: integration_tests/tf_distribute_training_test.py function test_model_fit (line 13) | def test_model_fit(): FILE: integration_tests/torch_custom_fit_test.py function test_custom_fit (line 7) | def test_custom_fit(): FILE: integration_tests/torch_workflow_test.py class Net (line 8) | class Net(torch.nn.Module): method __init__ (line 9) | def __init__(self): method forward (line 13) | def forward(self, x): class TorchWorkflowTest (line 18) | class TorchWorkflowTest(testing.TestCase): method test_keras_layer_in_nn_module (line 19) | def test_keras_layer_in_nn_module(self): FILE: keras/src/activations/__init__.py function serialize (line 77) | def serialize(activation): function deserialize (line 106) | def deserialize(config, custom_objects=None): function get (line 116) | def get(identifier): FILE: keras/src/activations/activations.py function relu (line 7) | def relu(x, negative_slope=0.0, max_value=None, threshold=0.0): class ReLU (line 55) | class ReLU(ops.Operation): method __init__ (line 56) | def __init__( method call (line 64) | def call(self, x): method compute_output_spec (line 72) | def compute_output_spec(self, x): method static_call (line 76) | def static_call(x, negative_slope=0.0, max_value=None, threshold=0.0): function leaky_relu (line 114) | def leaky_relu(x, negative_slope=0.2): function relu6 (line 126) | def relu6(x): function softmax (line 138) | def softmax(x, axis=-1): function elu (line 171) | def elu(x, alpha=1.0): function selu (line 200) | def selu(x): function softplus (line 240) | def softplus(x): function softsign (line 252) | def softsign(x): function soft_shrink (line 264) | def soft_shrink(x, threshold=0.5): function sparse_plus (line 282) | def sparse_plus(x): function silu (line 299) | def silu(x): function squareplus (line 319) | def squareplus(x, b=4): function gelu (line 340) | def gelu(x, approximate=False): function celu (line 363) | def celu(x, alpha=1.0): function glu (line 384) | def glu(x, axis=-1): function tanh (line 405) | def tanh(x): function tanh_shrink (line 419) | def tanh_shrink(x): function hard_tanh (line 433) | def hard_tanh(x): function hard_shrink (line 448) | def hard_shrink(x, threshold=0.5): function threshold (line 465) | def threshold(x, threshold, default_value): function sigmoid (line 483) | def sigmoid(x): function exponential (line 510) | def exponential(x): function hard_sigmoid (line 520) | def hard_sigmoid(x): function log_sigmoid (line 543) | def log_sigmoid(x): function sparse_sigmoid (line 556) | def sparse_sigmoid(x): function hard_silu (line 577) | def hard_silu(x): function linear (line 600) | def linear(x): class Mish (line 612) | class Mish(ops.Operation): method call (line 613) | def call(self, x): method compute_output_spec (line 616) | def compute_output_spec(self, x): method static_call (line 620) | def static_call(x): function mish (line 625) | def mish(x): function log_softmax (line 648) | def log_softmax(x, axis=-1): function sparsemax (line 663) | def sparsemax(x, axis=-1): FILE: keras/src/activations/activations_test.py function _ref_softmax (line 8) | def _ref_softmax(values): function _ref_softplus (line 14) | def _ref_softplus(x): function _ref_log_softmax (line 18) | def _ref_log_softmax(values): function _ref_leaky_relu (line 25) | def _ref_leaky_relu(x, alpha=0.2): function _ref_relu6 (line 29) | def _ref_relu6(x): function _ref_silu (line 33) | def _ref_silu(x): function _ref_hard_sigmoid (line 37) | def _ref_hard_sigmoid(x): function _ref_sparse_sigmoid (line 43) | def _ref_sparse_sigmoid(x): function _ref_log_sigmoid (line 47) | def _ref_log_sigmoid(x): function _ref_hard_silu (line 51) | def _ref_hard_silu(x): function _ref_sigmoid (line 55) | def _ref_sigmoid(x): function _ref_softsign (line 63) | def _ref_softsign(x): class ActivationsTest (line 67) | class ActivationsTest(testing.TestCase): method test_softmax (line 68) | def test_softmax(self): method test_softmax_2d_axis_0 (line 75) | def test_softmax_2d_axis_0(self): method test_softmax_3d_axis_tuple (line 83) | def test_softmax_3d_axis_tuple(self): method test_softmax_1d (line 91) | def test_softmax_1d(self): method test_softmax_higher_dim (line 97) | def test_softmax_higher_dim(self): method test_softmax_higher_dim_multiple_axes (line 106) | def test_softmax_higher_dim_multiple_axes(self): method test_softmax_negative_axis (line 115) | def test_softmax_negative_axis(self): method test_temporal_softmax (line 123) | def test_temporal_softmax(self): method test_log_softmax_2d_axis_0 (line 129) | def test_log_softmax_2d_axis_0(self): method test_log_softmax_3d_axis_tuple (line 137) | def test_log_softmax_3d_axis_tuple(self): method test_log_softmax_1d (line 145) | def test_log_softmax_1d(self): method test_log_softmax_higher_dim (line 151) | def test_log_softmax_higher_dim(self): method test_log_softmax_higher_dim_multiple_axes (line 160) | def test_log_softmax_higher_dim_multiple_axes(self): method test_log_softmax_negative_axis (line 169) | def test_log_softmax_negative_axis(self): method test_temporal_log_softmax (line 177) | def test_temporal_log_softmax(self): method test_selu (line 183) | def test_selu(self): method test_softplus (line 196) | def test_softplus(self): method test_softsign (line 237) | def test_softsign(self): method test_sigmoid (line 278) | def test_sigmoid(self): method test_hard_sigmoid (line 319) | def test_hard_sigmoid(self): method test_sparse_sigmoid (line 348) | def test_sparse_sigmoid(self): method test_log_sigmoid (line 387) | def test_log_sigmoid(self): method test_hard_silu (line 426) | def test_hard_silu(self): method test_relu_negative_slope (line 459) | def test_relu_negative_slope(self): method test_relu_max_value (line 470) | def test_relu_max_value(self): method test_relu_threshold (line 479) | def test_relu_threshold(self): method test_relu_combined_threshold_and_max_value (line 488) | def test_relu_combined_threshold_and_max_value(self): method test_relu_combined_all_parameters (line 497) | def test_relu_combined_all_parameters(self): method test_relu_to_trigger_relu6 (line 508) | def test_relu_to_trigger_relu6(self): method test_relu_to_trigger_leaky (line 514) | def test_relu_to_trigger_leaky(self): method test_relu (line 520) | def test_relu(self): method test_leaky_relu (line 563) | def test_leaky_relu(self): method test_relu6 (line 600) | def test_relu6(self): method test_silu (line 621) | def test_silu(self): method test_gelu (line 642) | def test_gelu(self): method test_celu (line 671) | def test_celu(self): method test_glu (line 687) | def test_glu(self): method test_tanh_shrink (line 702) | def test_tanh_shrink(self): method test_hard_tanh (line 711) | def test_hard_tanh(self): method test_hard_shrink (line 720) | def test_hard_shrink(self): method test_threshold (line 729) | def test_threshold(self): method test_squareplus (line 740) | def test_squareplus(self): method test_soft_shrink (line 750) | def test_soft_shrink(self): method test_sparse_plus (line 763) | def test_sparse_plus(self): method test_elu (line 776) | def test_elu(self): method test_tanh (line 785) | def test_tanh(self): method test_exponential (line 834) | def test_exponential(self): method test_mish (line 882) | def test_mish(self): method test_linear (line 930) | def test_linear(self): method test_sparsemax (line 953) | def test_sparsemax(self): method test_get_method (line 1002) | def test_get_method(self): FILE: keras/src/api_export.py function register_internal_serializable (line 13) | def register_internal_serializable(path, symbol): function get_symbol_from_name (line 23) | def get_symbol_from_name(name): function get_name_from_symbol (line 27) | def get_name_from_symbol(symbol): class keras_export (line 33) | class keras_export(namex.export): method __init__ (line 34) | def __init__(self, path): method __call__ (line 37) | def __call__(self, symbol): method __init__ (line 44) | def __init__(self, path): method __call__ (line 47) | def __call__(self, symbol): class keras_export (line 43) | class keras_export: method __init__ (line 34) | def __init__(self, path): method __call__ (line 37) | def __call__(self, symbol): method __init__ (line 44) | def __init__(self, path): method __call__ (line 47) | def __call__(self, symbol): FILE: keras/src/applications/applications_test.py function _get_elephant (line 100) | def _get_elephant(target_size): class ApplicationsTest (line 123) | class ApplicationsTest(testing.TestCase): method setUpClass (line 125) | def setUpClass(cls): method tearDownClass (line 129) | def tearDownClass(cls): method skip_if_invalid_image_data_format_for_model (line 132) | def skip_if_invalid_image_data_format_for_model( method test_application_notop_variable_input_channels (line 150) | def test_application_notop_variable_input_channels( method test_application_base (line 183) | def test_application_base(self, app, _, app_module, image_data_format): method test_application_notop_custom_input_shape (line 224) | def test_application_notop_custom_input_shape( method test_application_notop_custom_input_tensor (line 245) | def test_application_notop_custom_input_tensor( method test_application_pooling (line 271) | def test_application_pooling(self, app, last_dim, _, image_data_format): method test_application_classifier_activation (line 284) | def test_application_classifier_activation(self, app, *_): FILE: keras/src/applications/convnext.py class StochasticDepth (line 141) | class StochasticDepth(Layer): method __init__ (line 159) | def __init__(self, drop_path_rate, **kwargs): method call (line 163) | def call(self, x, training=None): method get_config (line 172) | def get_config(self): class LayerScale (line 178) | class LayerScale(Layer): method __init__ (line 194) | def __init__(self, init_values, projection_dim, **kwargs): method build (line 199) | def build(self, _): method call (line 206) | def call(self, x): method get_config (line 209) | def get_config(self): function ConvNeXtBlock (line 220) | def ConvNeXtBlock( function PreStem (line 282) | def PreStem(name=None): function Head (line 302) | def Head(num_classes=1000, classifier_activation=None, name=None): function ConvNeXt (line 331) | def ConvNeXt( function ConvNeXtTiny (line 581) | def ConvNeXtTiny( function ConvNeXtSmall (line 617) | def ConvNeXtSmall( function ConvNeXtBase (line 653) | def ConvNeXtBase( function ConvNeXtLarge (line 689) | def ConvNeXtLarge( function ConvNeXtXLarge (line 725) | def ConvNeXtXLarge( function preprocess_input (line 763) | def preprocess_input(x, data_format=None): function decode_predictions (line 785) | def decode_predictions(preds, top=5): FILE: keras/src/applications/densenet.py function dense_block (line 35) | def dense_block(x, blocks, name): function transition_block (line 51) | def transition_block(x, reduction, name): function conv_block (line 77) | def conv_block(x, growth_rate, name): function DenseNet (line 107) | def DenseNet( function DenseNet121 (line 331) | def DenseNet121( function DenseNet169 (line 361) | def DenseNet169( function DenseNet201 (line 391) | def DenseNet201( function preprocess_input (line 416) | def preprocess_input(x, data_format=None): function decode_predictions (line 423) | def decode_predictions(preds, top=5): FILE: keras/src/applications/efficientnet.py function EfficientNet (line 208) | def EfficientNet( function block (line 444) | def block( function EfficientNetB0 (line 565) | def EfficientNetB0( function EfficientNetB1 (line 598) | def EfficientNetB1( function EfficientNetB2 (line 631) | def EfficientNetB2( function EfficientNetB3 (line 664) | def EfficientNetB3( function EfficientNetB4 (line 697) | def EfficientNetB4( function EfficientNetB5 (line 730) | def EfficientNetB5( function EfficientNetB6 (line 763) | def EfficientNetB6( function EfficientNetB7 (line 796) | def EfficientNetB7( function preprocess_input (line 834) | def preprocess_input(x, data_format=None): function decode_predictions (line 856) | def decode_predictions(preds, top=5): FILE: keras/src/applications/efficientnet_v2.py function round_filters (line 589) | def round_filters(filters, width_coefficient, min_depth, depth_divisor): function round_repeats (line 600) | def round_repeats(repeats, depth_coefficient): function MBConvBlock (line 605) | def MBConvBlock( function FusedMBConvBlock (line 721) | def FusedMBConvBlock( function EfficientNetV2 (line 823) | def EfficientNetV2( function EfficientNetV2B0 (line 1098) | def EfficientNetV2B0( function EfficientNetV2B1 (line 1132) | def EfficientNetV2B1( function EfficientNetV2B2 (line 1166) | def EfficientNetV2B2( function EfficientNetV2B3 (line 1200) | def EfficientNetV2B3( function EfficientNetV2S (line 1234) | def EfficientNetV2S( function EfficientNetV2M (line 1268) | def EfficientNetV2M( function EfficientNetV2L (line 1302) | def EfficientNetV2L( function preprocess_input (line 1340) | def preprocess_input(x, data_format=None): function decode_predictions (line 1362) | def decode_predictions(preds, top=5): FILE: keras/src/applications/imagenet_utils.py function preprocess_input (line 87) | def preprocess_input(x, data_format=None, mode="caffe"): function decode_predictions (line 117) | def decode_predictions(preds, top=5): function _preprocess_numpy_input (line 161) | def _preprocess_numpy_input(x, data_format, mode): function _preprocess_tensor_input (line 234) | def _preprocess_tensor_input(x, data_format, mode): function obtain_input_shape (line 296) | def obtain_input_shape( function correct_pad (line 416) | def correct_pad(inputs, kernel_size): function validate_activation (line 441) | def validate_activation(classifier_activation, weights): FILE: keras/src/applications/imagenet_utils_test.py class TestImageNetUtils (line 12) | class TestImageNetUtils(testing.TestCase): method test_preprocess_input (line 13) | def test_preprocess_input(self): method test_preprocess_input_symbolic (line 80) | def test_preprocess_input_symbolic(self, mode): method test_preprocess_input_symbolic_mixed_precision (line 150) | def test_preprocess_input_symbolic_mixed_precision(self, mode): method test_obtain_input_shape (line 174) | def test_obtain_input_shape(self, data_format): FILE: keras/src/applications/inception_resnet_v2.py function InceptionResNetV2 (line 22) | def InceptionResNetV2( function conv2d_bn (line 248) | def conv2d_bn( class CustomScaleLayer (line 294) | class CustomScaleLayer(Layer): method __init__ (line 295) | def __init__(self, scale, **kwargs): method get_config (line 299) | def get_config(self): method call (line 304) | def call(self, inputs): function inception_resnet_block (line 308) | def inception_resnet_block(x, scale, block_type, block_idx, activation="... function preprocess_input (line 380) | def preprocess_input(x, data_format=None): function decode_predictions (line 387) | def decode_predictions(preds, top=5): FILE: keras/src/applications/inception_v3.py function InceptionV3 (line 25) | def InceptionV3( function conv2d_bn (line 383) | def conv2d_bn( function preprocess_input (line 426) | def preprocess_input(x, data_format=None): function decode_predictions (line 433) | def decode_predictions(preds, top=5): FILE: keras/src/applications/mobilenet.py function MobileNet (line 22) | def MobileNet( function _conv_block (line 276) | def _conv_block(inputs, filters, alpha, kernel=(3, 3), strides=(1, 1)): function _depthwise_conv_block (line 332) | def _depthwise_conv_block( function preprocess_input (line 419) | def preprocess_input(x, data_format=None): function decode_predictions (line 426) | def decode_predictions(preds, top=5): FILE: keras/src/applications/mobilenet_v2.py function MobileNetV2 (line 22) | def MobileNetV2( function _inverted_res_block (line 395) | def _inverted_res_block(inputs, expansion, stride, alpha, filters, block... function _make_divisible (line 470) | def _make_divisible(v, divisor, min_value=None): function preprocess_input (line 481) | def preprocess_input(x, data_format=None): function decode_predictions (line 488) | def decode_predictions(preds, top=5): FILE: keras/src/applications/mobilenet_v3.py function MobileNetV3 (line 153) | def MobileNetV3( function MobileNetV3Small (line 407) | def MobileNetV3Small( function MobileNetV3Large (line 474) | def MobileNetV3Large( function relu (line 542) | def relu(x): function hard_sigmoid (line 546) | def hard_sigmoid(x): function hard_swish (line 550) | def hard_swish(x): function _depth (line 561) | def _depth(v, divisor=8, min_value=None): function _se_block (line 571) | def _se_block(inputs, filters, se_ratio, prefix): function _inverted_res_block (line 593) | def _inverted_res_block( function preprocess_input (line 661) | def preprocess_input(x, data_format=None): function decode_predictions (line 684) | def decode_predictions(preds, top=5): FILE: keras/src/applications/nasnet.py function NASNet (line 20) | def NASNet( function NASNetMobile (line 320) | def NASNetMobile( function NASNetLarge (line 416) | def NASNetLarge( function _separable_conv_block (line 498) | def _separable_conv_block( function _adjust_block (line 556) | def _adjust_block(p, ip, filters, block_id=None): function _normal_a_cell (line 643) | def _normal_a_cell(ip, p, filters, block_id=None): function _reduction_a_cell (line 736) | def _reduction_a_cell(ip, p, filters, block_id=None): function preprocess_input (line 853) | def preprocess_input(x, data_format=None): function decode_predictions (line 860) | def decode_predictions(preds, top=5): FILE: keras/src/applications/resnet.py function ResNet (line 48) | def ResNet( function residual_block_v1 (line 219) | def residual_block_v1( function stack_residual_blocks_v1 (line 276) | def stack_residual_blocks_v1(x, filters, blocks, stride1=2, name=None): function residual_block_v2 (line 298) | def residual_block_v2( function stack_residual_blocks_v2 (line 361) | def stack_residual_blocks_v2(x, filters, blocks, stride1=2, name=None): function ResNet50 (line 391) | def ResNet50( function ResNet101 (line 431) | def ResNet101( function ResNet152 (line 471) | def ResNet152( function preprocess_input (line 511) | def preprocess_input(x, data_format=None): function decode_predictions (line 523) | def decode_predictions(preds, top=5): FILE: keras/src/applications/resnet_v2.py function ResNet50V2 (line 12) | def ResNet50V2( function ResNet101V2 (line 54) | def ResNet101V2( function ResNet152V2 (line 96) | def ResNet152V2( function preprocess_input (line 133) | def preprocess_input(x, data_format=None): function decode_predictions (line 140) | def decode_predictions(preds, top=5): FILE: keras/src/applications/vgg16.py function VGG16 (line 21) | def VGG16( function preprocess_input (line 232) | def preprocess_input(x, data_format=None): function decode_predictions (line 239) | def decode_predictions(preds, top=5): FILE: keras/src/applications/vgg19.py function VGG19 (line 21) | def VGG19( function preprocess_input (line 240) | def preprocess_input(x, data_format=None): function decode_predictions (line 247) | def decode_predictions(preds, top=5): FILE: keras/src/applications/xception.py function Xception (line 25) | def Xception( function preprocess_input (line 339) | def preprocess_input(x, data_format=None): function decode_predictions (line 346) | def decode_predictions(preds, top=5): FILE: keras/src/backend/__init__.py class Variable (line 63) | class Variable(BackendVariable): # noqa: F811 class name_scope (line 71) | class name_scope(backend_name_scope): function device (line 76) | def device(device_name): FILE: keras/src/backend/common/backend_utils.py function _convert_conv_transpose_padding_args_from_keras_to_jax (line 8) | def _convert_conv_transpose_padding_args_from_keras_to_jax( function _convert_conv_transpose_padding_args_from_keras_to_torch (line 53) | def _convert_conv_transpose_padding_args_from_keras_to_torch( function compute_conv_transpose_padding_args_for_jax (line 119) | def compute_conv_transpose_padding_args_for_jax( function compute_conv_transpose_padding_args_for_torch (line 158) | def compute_conv_transpose_padding_args_for_torch( function _get_output_shape_given_tf_padding (line 215) | def _get_output_shape_given_tf_padding( function compute_conv_transpose_output_shape (line 244) | def compute_conv_transpose_output_shape( function canonicalize_axis (line 292) | def canonicalize_axis(axis, num_dims): function standardize_axis_for_numpy (line 305) | def standardize_axis_for_numpy(axis): function to_tuple_or_list (line 310) | def to_tuple_or_list(value): function _vectorize_parse_gufunc_signature (line 334) | def _vectorize_parse_gufunc_signature( function _vectorize_update_dim_sizes (line 349) | def _vectorize_update_dim_sizes(dim_sizes, shape, core_dims, is_input=Tr... function _vectorize_parse_input_dimensions (line 376) | def _vectorize_parse_input_dimensions( function _vectorize_check_output_dims (line 401) | def _vectorize_check_output_dims( function _vectorize_apply_excluded (line 439) | def _vectorize_apply_excluded(func, excluded, args, kwargs): function vectorize_impl (line 463) | def vectorize_impl(pyfunc, vmap_fn, *, excluded=None, signature=None): function slice_along_axis (line 545) | def slice_along_axis(x, start=0, stop=None, step=1, axis=0): function compute_adaptive_pooling_window_sizes (line 557) | def compute_adaptive_pooling_window_sizes(input_dim, output_dim): FILE: keras/src/backend/common/backend_utils_test.py class ConvertConvTransposePaddingArgsJAXTest (line 19) | class ConvertConvTransposePaddingArgsJAXTest(test_case.TestCase): method test_valid_padding_without_output_padding (line 20) | def test_valid_padding_without_output_padding(self): method test_same_padding_without_output_padding (line 35) | def test_same_padding_without_output_padding(self): class ConvertConvTransposePaddingArgsTorchTest (line 51) | class ConvertConvTransposePaddingArgsTorchTest(test_case.TestCase): method test_valid_padding_without_output_padding (line 52) | def test_valid_padding_without_output_padding(self): method test_same_padding_without_output_padding (line 67) | def test_same_padding_without_output_padding(self): class ComputeConvTransposePaddingArgsForJAXTest (line 83) | class ComputeConvTransposePaddingArgsForJAXTest(test_case.TestCase): method test_valid_padding_without_output_padding (line 84) | def test_valid_padding_without_output_padding(self): method test_same_padding_without_output_padding (line 96) | def test_same_padding_without_output_padding(self): class ComputeConvTransposePaddingArgsForTorchTest (line 110) | class ComputeConvTransposePaddingArgsForTorchTest(test_case.TestCase): method test_valid_padding_without_output_padding (line 111) | def test_valid_padding_without_output_padding(self): method test_same_padding_without_output_padding (line 127) | def test_same_padding_without_output_padding(self): method test_valid_padding_with_none_output_padding (line 143) | def test_valid_padding_with_none_output_padding(self): method test_valid_padding_with_output_padding (line 158) | def test_valid_padding_with_output_padding(self): method test_output_padding_clamped_for_torch_constraint (line 173) | def test_output_padding_clamped_for_torch_constraint(self): class GetOutputShapeGivenTFPaddingTest (line 193) | class GetOutputShapeGivenTFPaddingTest(test_case.TestCase): method test_valid_padding_without_output_padding (line 194) | def test_valid_padding_without_output_padding(self): method test_same_padding_without_output_padding (line 206) | def test_same_padding_without_output_padding(self): method test_valid_padding_with_output_padding (line 218) | def test_valid_padding_with_output_padding(self): method test_warning_for_inconsistencies (line 230) | def test_warning_for_inconsistencies(self): method test_same_padding_without_output_padding_for_torch_ (line 241) | def test_same_padding_without_output_padding_for_torch_(self): FILE: keras/src/backend/common/compute_output_spec_test.py function example_fn (line 7) | def example_fn(x): class ComputeOutputSpecTest (line 13) | class ComputeOutputSpecTest(testing.TestCase): method test_basics (line 14) | def test_basics(self): method test_torch_meta_device_incompatible_ops (line 36) | def test_torch_meta_device_incompatible_ops(self): FILE: keras/src/backend/common/dtypes.py function _type_promotion_lattice (line 61) | def _type_promotion_lattice(): function _make_lattice_upper_bounds (line 93) | def _make_lattice_upper_bounds(): function _least_upper_bound (line 115) | def _least_upper_bound(*nodes): function _dtype_and_weaktype (line 175) | def _dtype_and_weaktype(value): function _respect_weak_type (line 187) | def _respect_weak_type(dtype, weak_type): function _resolve_weak_type (line 207) | def _resolve_weak_type(dtype, precision="32"): function _lattice_result_type (line 245) | def _lattice_result_type(*args): function result_type (line 281) | def result_type(*dtypes): FILE: keras/src/backend/common/dtypes_test.py class DtypesTest (line 13) | class DtypesTest(test_case.TestCase): method test_result_type_with_python_scalar_types (line 44) | def test_result_type_with_python_scalar_types(self, dtype1, dtype2): method test_result_type_with_tensor (line 54) | def test_result_type_with_tensor(self, dtype1, dtype2): method test_result_type_with_int64 (line 82) | def test_result_type_with_int64(self, dtype): method test_result_type_with_float64 (line 108) | def test_result_type_with_float64(self, dtype): method test_result_type_with_none (line 116) | def test_result_type_with_none(self): method test_result_type_empty_list (line 121) | def test_result_type_empty_list(self): method test_respect_weak_type_for_bool (line 124) | def test_respect_weak_type_for_bool(self): method test_respect_weak_type_for_int (line 127) | def test_respect_weak_type_for_int(self): method test_respect_weak_type_for_float (line 130) | def test_respect_weak_type_for_float(self): method test_resolve_weak_type_for_bfloat16 (line 133) | def test_resolve_weak_type_for_bfloat16(self): method test_resolve_weak_type_for_bfloat16_with_precision (line 136) | def test_resolve_weak_type_for_bfloat16_with_precision(self): method test_respect_weak_type_for_complex64 (line 141) | def test_respect_weak_type_for_complex64(self): method test_respect_weak_type_for_complex128 (line 146) | def test_respect_weak_type_for_complex128(self): method test_invalid_dtype_for_keras_promotion (line 151) | def test_invalid_dtype_for_keras_promotion(self): method test_resolve_weak_type_for_invalid_dtype (line 157) | def test_resolve_weak_type_for_invalid_dtype(self): method test_resolve_weak_type_for_invalid_precision (line 163) | def test_resolve_weak_type_for_invalid_precision(self): method test_cycle_detection_in_make_lattice_upper_bounds (line 170) | def test_cycle_detection_in_make_lattice_upper_bounds(self): method test_respect_weak_type_for_invalid_dtype (line 188) | def test_respect_weak_type_for_invalid_dtype(self): method test_invalid_dtype_in_least_upper_bound (line 194) | def test_invalid_dtype_in_least_upper_bound(self): method test_empty_lub_in_least_upper_bound (line 201) | def test_empty_lub_in_least_upper_bound(self): method test_valid_dtype_leading_to_single_lub_element (line 214) | def test_valid_dtype_leading_to_single_lub_element(self): method test_valid_dtype_leading_to_keyerror_and_valueerror (line 219) | def test_valid_dtype_leading_to_keyerror_and_valueerror(self): method test_resolve_weak_type_bool (line 226) | def test_resolve_weak_type_bool(self): method test_resolve_weak_type_int (line 229) | def test_resolve_weak_type_int(self): method test_resolve_weak_type_uint (line 237) | def test_resolve_weak_type_uint(self): method test_resolve_weak_type_float (line 245) | def test_resolve_weak_type_float(self): method test_least_upper_bound_ensure_order_independence (line 253) | def test_least_upper_bound_ensure_order_independence(self): method test_least_upper_bound_single_element (line 259) | def test_least_upper_bound_single_element(self): method test_least_upper_bound_no_element (line 263) | def test_least_upper_bound_no_element(self): method test_least_upper_bound_with_no_common_upper_bound (line 270) | def test_least_upper_bound_with_no_common_upper_bound(self): method test_invalid_float8_dtype (line 281) | def test_invalid_float8_dtype(self): FILE: keras/src/backend/common/global_state.py function set_global_attribute (line 11) | def set_global_attribute(name, value): function get_global_attribute (line 15) | def get_global_attribute(name, default=None, set_to_default=False): function clear_session (line 25) | def clear_session(free_memory=True): FILE: keras/src/backend/common/global_state_test.py class GlobalStateTest (line 6) | class GlobalStateTest(test_case.TestCase): method test_clear_session (line 7) | def test_clear_session(self): FILE: keras/src/backend/common/keras_tensor.py class KerasTensor (line 7) | class KerasTensor: method __init__ (line 30) | def __init__( method shape (line 70) | def shape(self): method shape (line 74) | def shape(self, value): method dtype (line 81) | def dtype(self): method dtype (line 85) | def dtype(self, value): method sparse (line 92) | def sparse(self): method sparse (line 96) | def sparse(self, value): method ragged_rank (line 103) | def ragged_rank(self): method ragged_rank (line 107) | def ragged_rank(self, value): method row_splits_dtype (line 114) | def row_splits_dtype(self): method row_splits_dtype (line 118) | def row_splits_dtype(self, value): method ragged (line 125) | def ragged(self): method ragged (line 129) | def ragged(self, value): method ndim (line 136) | def ndim(self): method reshape (line 139) | def reshape(self, newshape): method squeeze (line 144) | def squeeze(self, axis=None): method __int__ (line 149) | def __int__(self): method __float__ (line 156) | def __float__(self): method __array__ (line 163) | def __array__(self): method __jax_array__ (line 170) | def __jax_array__(self): method __tf_tensor__ (line 193) | def __tf_tensor__(self, dtype=None, name=None): method __repr__ (line 216) | def __repr__(self): method __iter__ (line 222) | def __iter__(self): method __bool__ (line 227) | def __bool__(self): method __add__ (line 230) | def __add__(self, other): method __radd__ (line 235) | def __radd__(self, other): method __sub__ (line 240) | def __sub__(self, other): method __rsub__ (line 245) | def __rsub__(self, other): method __mul__ (line 250) | def __mul__(self, other): method __rmul__ (line 255) | def __rmul__(self, other): method __matmul__ (line 260) | def __matmul__(self, other): method __rmatmul__ (line 265) | def __rmatmul__(self, other): method __div__ (line 270) | def __div__(self, other): method __rdiv__ (line 275) | def __rdiv__(self, other): method __truediv__ (line 280) | def __truediv__(self, other): method __rtruediv__ (line 285) | def __rtruediv__(self, other): method __neg__ (line 290) | def __neg__(self): method __abs__ (line 295) | def __abs__(self): method __pow__ (line 300) | def __pow__(self, other): method __rpow__ (line 305) | def __rpow__(self, other): method __floordiv__ (line 310) | def __floordiv__(self, other): method __rfloordiv__ (line 315) | def __rfloordiv__(self, other): method __mod__ (line 320) | def __mod__(self, other): method __rmod__ (line 325) | def __rmod__(self, other): method __lt__ (line 330) | def __lt__(self, other): method __le__ (line 335) | def __le__(self, other): method __gt__ (line 340) | def __gt__(self, other): method __ge__ (line 345) | def __ge__(self, other): method __ne__ (line 350) | def __ne__(self, other): method __and__ (line 355) | def __and__(self, other): method __rand__ (line 360) | def __rand__(self, other): method __or__ (line 365) | def __or__(self, other): method __ror__ (line 370) | def __ror__(self, other): method __invert__ (line 375) | def __invert__(self): method __xor__ (line 380) | def __xor__(self, other): method __rxor__ (line 385) | def __rxor__(self, other): method __getitem__ (line 390) | def __getitem__(self, key): method __round__ (line 395) | def __round__(self, ndigits=None): function any_symbolic_tensors (line 402) | def any_symbolic_tensors(args=None, kwargs=None): function is_keras_tensor (line 412) | def is_keras_tensor(x): FILE: keras/src/backend/common/keras_tensor_test.py class KerasTensorTest (line 13) | class KerasTensorTest(testing.TestCase): method test_attributes (line 14) | def test_attributes(self): method test_attributes_sparse (line 30) | def test_attributes_sparse(self): method test_attributes_ragged (line 41) | def test_attributes_ragged(self): method test_init_sparse_ragged_raises (line 52) | def test_init_sparse_ragged_raises(self): method test_numpy_methods (line 58) | def test_numpy_methods(self): method test_invalid_usage (line 75) | def test_invalid_usage(self): method test_bool (line 95) | def test_bool(self): method test_representation (line 100) | def test_representation(self): method test_iterating (line 104) | def test_iterating(self): method test_any_symbolic_tensors (line 109) | def test_any_symbolic_tensors(self): method test_is_keras_tensor (line 115) | def test_is_keras_tensor(self): method test_abs_method (line 122) | def test_abs_method(self, mock_symbolic_call): method test_neg_method (line 131) | def test_neg_method(self, mock_method): method test_sub_method (line 135) | def test_sub_method(self, mock_method): method test_mul_method (line 140) | def test_mul_method(self, mock_method): method test_matmul_method (line 145) | def test_matmul_method(self, mock_method): method test_pow_method (line 150) | def test_pow_method(self, mock_method): method test_mod_method (line 155) | def test_mod_method(self, mock_method): method test_lt_method (line 160) | def test_lt_method(self, mock_method): method test_and_method (line 165) | def test_and_method(self, mock_method): method test_or_method (line 170) | def test_or_method(self, mock_method): method test_getitem_method (line 175) | def test_getitem_method(self, mock_method): method _test_unary_op_method (line 179) | def _test_unary_op_method(self, mock_method, operator): method _test_binary_op_method (line 187) | def _test_binary_op_method(self, mock_method, other, operator): method test_radd_method (line 196) | def test_radd_method(self, mock_symbolic_call): method test_rsub_method (line 207) | def test_rsub_method(self, mock_symbolic_call): method test_rmul_method (line 218) | def test_rmul_method(self, mock_symbolic_call): method test_rmatmul_method (line 229) | def test_rmatmul_method(self, mock_symbolic_call): method test_rpow_method (line 240) | def test_rpow_method(self, mock_symbolic_call): method test_floordiv_method (line 251) | def test_floordiv_method(self, mock_symbolic_call): method test_rfloordiv_method (line 262) | def test_rfloordiv_method(self, mock_symbolic_call): method test_rmod_method (line 273) | def test_rmod_method(self, mock_symbolic_call): method test_le_method (line 284) | def test_le_method(self, mock_symbolic_call): method test_gt_method (line 295) | def test_gt_method(self, mock_symbolic_call): method test_ge_method (line 306) | def test_ge_method(self, mock_symbolic_call): method test_ne_method (line 317) | def test_ne_method(self, mock_symbolic_call): method test_rand_method (line 328) | def test_rand_method(self, mock_symbolic_call): method test_ror_method (line 339) | def test_ror_method(self, mock_symbolic_call): method test_invert_method (line 350) | def test_invert_method(self, mock_symbolic_call): method test_xor_method (line 360) | def test_xor_method(self, mock_symbolic_call): method test_rxor_method (line 371) | def test_rxor_method(self, mock_symbolic_call): method test_truediv_method (line 382) | def test_truediv_method(self, mock_symbolic_call): method test_rtruediv_method (line 393) | def test_rtruediv_method(self, mock_symbolic_call): method test_div_method (line 404) | def test_div_method(self, mock_symbolic_call): method test_rdiv_method (line 416) | def test_rdiv_method(self, mock_symbolic_call): FILE: keras/src/backend/common/masking.py function set_keras_mask (line 5) | def set_keras_mask(x, mask): function get_keras_mask (line 16) | def get_keras_mask(x): FILE: keras/src/backend/common/masking_test.py class MaskingTest (line 8) | class MaskingTest(testing.TestCase): method test_mask_on_eager_tensor (line 9) | def test_mask_on_eager_tensor(self): method test_mask_on_tracer_tensor (line 26) | def test_mask_on_tracer_tensor(self): FILE: keras/src/backend/common/name_scope.py class name_scope (line 4) | class name_scope: method __init__ (line 18) | def __init__( method __enter__ (line 39) | def __enter__(self): method __exit__ (line 56) | def __exit__(self, *args, **kwargs): function current_path (line 65) | def current_path(): FILE: keras/src/backend/common/name_scope_test.py class NameScopeTest (line 9) | class NameScopeTest(testing.TestCase): method test_stacking (line 10) | def test_stacking(self): method test_deduplication (line 25) | def test_deduplication(self): method test_errors (line 35) | def test_errors(self): method test_override_parent (line 41) | def test_override_parent(self): method test_exit_with_none_stack (line 53) | def test_exit_with_none_stack(self): method test_exit_with_empty_stack (line 70) | def test_exit_with_empty_stack(self): method test_multithreaded_name_scope (line 90) | def test_multithreaded_name_scope(self): method test_exit_without_pop_on_exit (line 116) | def test_exit_without_pop_on_exit(self): FILE: keras/src/backend/common/remat.py class RematScope (line 9) | class RematScope: method __init__ (line 78) | def __init__( method __enter__ (line 98) | def __enter__(self): method __exit__ (line 106) | def __exit__(self, *args, **kwargs): function get_current_remat_mode (line 119) | def get_current_remat_mode(): function remat (line 138) | def remat(f): FILE: keras/src/backend/common/remat_test.py class TestRematScope (line 14) | class TestRematScope(testing.TestCase): method test_remat_scope_activation (line 15) | def test_remat_scope_activation(self): method test_remat_scope_nested (line 29) | def test_remat_scope_nested(self): method test_remat_scope_stack_management (line 49) | def test_remat_scope_stack_management(self): method test_invalid_mode (line 75) | def test_invalid_mode(self): class RematTest (line 85) | class RematTest(testing.TestCase): method test_remat_basic_call (line 86) | def test_remat_basic_call(self): method test_remat_with_kwargs (line 117) | def test_remat_with_kwargs(self): FILE: keras/src/backend/common/stateless_scope.py class StatelessScope (line 6) | class StatelessScope: method __init__ (line 35) | def __init__( method __enter__ (line 70) | def __enter__(self): method add_loss (line 75) | def add_loss(self, loss): method add_update (line 78) | def add_update(self, update): method get_current_value (line 82) | def get_current_value(self, variable): method __exit__ (line 85) | def __exit__(self, *args, **kwargs): function in_stateless_scope (line 100) | def in_stateless_scope(): function get_stateless_scope (line 104) | def get_stateless_scope(): FILE: keras/src/backend/common/stateless_scope_test.py class TestStatelessScope (line 9) | class TestStatelessScope(testing.TestCase): method test_basic_flow (line 10) | def test_basic_flow(self): method test_invalid_key_in_state_mapping (line 38) | def test_invalid_key_in_state_mapping(self): method test_invalid_value_shape_in_state_mapping (line 48) | def test_invalid_value_shape_in_state_mapping(self): FILE: keras/src/backend/common/symbolic_scope.py class SymbolicScope (line 6) | class SymbolicScope: method __enter__ (line 9) | def __enter__(self): method __exit__ (line 14) | def __exit__(self, *args, **kwargs): function in_symbolic_scope (line 18) | def in_symbolic_scope(): function get_symbolic_scope (line 22) | def get_symbolic_scope(): FILE: keras/src/backend/common/symbolic_scope_test.py class TestSymbolicScope (line 9) | class TestSymbolicScope(testing.TestCase): method test_basic_flow (line 10) | def test_basic_flow(self): FILE: keras/src/backend/common/tensor_attributes.py function _clear_tensor_attr (line 6) | def _clear_tensor_attr(tensor_id, attr): function set_tensor_attr (line 12) | def set_tensor_attr(tensor, attr, value): function get_tensor_attr (line 29) | def get_tensor_attr(tensor, attr): FILE: keras/src/backend/common/thread_safe_test.py class TestThreadSafe (line 10) | class TestThreadSafe(testing.TestCase): method test_is_thread_safe (line 11) | def test_is_thread_safe(self): FILE: keras/src/backend/common/variables.py class Variable (line 15) | class Variable: method __init__ (line 92) | def __init__( method _deferred_initialize (line 212) | def _deferred_initialize(self): method _validate_shape (line 231) | def _validate_shape(self, shape): method _maybe_autocast (line 241) | def _maybe_autocast(self, value): method numpy (line 247) | def numpy(self): method aggregation (line 251) | def aggregation(self): method synchronization (line 256) | def synchronization(self): method value (line 261) | def value(self): method assign (line 278) | def assign(self, value): method assign_add (line 296) | def assign_add(self, value): method assign_sub (line 299) | def assign_sub(self, value): method dtype (line 303) | def dtype(self): method shape (line 317) | def shape(self): method ndim (line 322) | def ndim(self): method trainable (line 327) | def trainable(self): method trainable (line 332) | def trainable(self, value): method name (line 336) | def name(self): method path (line 341) | def path(self): method overwrite_with_gradient (line 346) | def overwrite_with_gradient(self): method overwrite_with_gradient (line 359) | def overwrite_with_gradient(self, value): method regularizer (line 368) | def regularizer(self): method regularizer (line 372) | def regularizer(self, value): method constraint (line 384) | def constraint(self): method constraint (line 388) | def constraint(self, value): method __repr__ (line 399) | def __repr__(self): method _initialize (line 413) | def _initialize(self, value): method _initialize_with_initializer (line 416) | def _initialize_with_initializer(self, initializer): method _convert_to_tensor (line 422) | def _convert_to_tensor(self, value, dtype=None): method __getitem__ (line 425) | def __getitem__(self, idx): method __int__ (line 428) | def __int__(self): method __float__ (line 436) | def __float__(self): method __array__ (line 444) | def __array__(self, dtype=None): method __bool__ (line 451) | def __bool__(self): method __neg__ (line 454) | def __neg__(self): method __pos__ (line 457) | def __pos__(self): method __abs__ (line 460) | def __abs__(self): method __invert__ (line 463) | def __invert__(self): method __eq__ (line 466) | def __eq__(self, other): method __ne__ (line 469) | def __ne__(self, other): method __lt__ (line 472) | def __lt__(self, other): method __le__ (line 475) | def __le__(self, other): method __gt__ (line 478) | def __gt__(self, other): method __ge__ (line 481) | def __ge__(self, other): method __add__ (line 484) | def __add__(self, other): method __radd__ (line 487) | def __radd__(self, other): method __sub__ (line 490) | def __sub__(self, other): method __rsub__ (line 493) | def __rsub__(self, other): method __mul__ (line 496) | def __mul__(self, other): method __rmul__ (line 499) | def __rmul__(self, other): method __truediv__ (line 502) | def __truediv__(self, other): method __rtruediv__ (line 505) | def __rtruediv__(self, other): method __floordiv__ (line 508) | def __floordiv__(self, other): method __rfloordiv__ (line 511) | def __rfloordiv__(self, other): method __mod__ (line 514) | def __mod__(self, other): method __rmod__ (line 517) | def __rmod__(self, other): method __pow__ (line 520) | def __pow__(self, other): method __rpow__ (line 523) | def __rpow__(self, other): method __matmul__ (line 526) | def __matmul__(self, other): method __rmatmul__ (line 529) | def __rmatmul__(self, other): method __and__ (line 532) | def __and__(self, other): method __rand__ (line 535) | def __rand__(self, other): method __or__ (line 538) | def __or__(self, other): method __ror__ (line 541) | def __ror__(self, other): method __xor__ (line 544) | def __xor__(self, other): method __rxor__ (line 547) | def __rxor__(self, other): method __round__ (line 550) | def __round__(self, ndigits=None): function register_uninitialized_variable (line 555) | def register_uninitialized_variable(variable): function initialize_all_variables (line 562) | def initialize_all_variables(): function standardize_dtype (line 573) | def standardize_dtype(dtype): function standardize_shape (line 591) | def standardize_shape(shape): function shape_equal (line 651) | def shape_equal(a_shape, b_shape): function is_float_dtype (line 662) | def is_float_dtype(dtype): function is_int_dtype (line 668) | def is_int_dtype(dtype): function get_autocast_scope (line 673) | def get_autocast_scope(): class AutocastScope (line 677) | class AutocastScope: method __init__ (line 684) | def __init__(self, dtype): method maybe_cast (line 696) | def maybe_cast(self, value): method __enter__ (line 703) | def __enter__(self): method __exit__ (line 707) | def __exit__(self, *args, **kwargs): FILE: keras/src/backend/common/variables_test.py class VariableInitializationTest (line 21) | class VariableInitializationTest(test_case.TestCase): method test_deferred_initialization (line 24) | def test_deferred_initialization(self): method test_variable_initialization_with_numpy_array (line 39) | def test_variable_initialization_with_numpy_array(self): method test_variable_initialization_with_native_array (line 47) | def test_variable_initialization_with_native_array(self): method test_variable_initialization_with_python_array (line 55) | def test_variable_initialization_with_python_array(self): method test_variable_initialization_with_lambda_expression (line 66) | def test_variable_initialization_with_lambda_expression(self): method test_variable_initialization_with_strings (line 103) | def test_variable_initialization_with_strings(self): method test_variable_initialization_with_non_trainable (line 108) | def test_variable_initialization_with_non_trainable(self): method test_variable_initialization_without_shape (line 113) | def test_variable_initialization_without_shape(self): method test_deferred_initialize_already_initialized (line 121) | def test_deferred_initialize_already_initialized(self): method test_variable_initialize (line 129) | def test_variable_initialize(self): method test_variable_without_shape_from_callable_initializer (line 136) | def test_variable_without_shape_from_callable_initializer(self): class VariablePropertiesTest (line 145) | class VariablePropertiesTest(test_case.TestCase): method test_deferred_assignment (line 151) | def test_deferred_assignment(self): method test_trainable_setter (line 164) | def test_trainable_setter(self): method test_autocasting_float (line 180) | def test_autocasting_float(self): method test_autocasting_float_assign (line 195) | def test_autocasting_float_assign(self): method test_autocasting_int (line 221) | def test_autocasting_int(self): method test_autocasting_float_with_autocast_off (line 235) | def test_autocasting_float_with_autocast_off(self): method test_standardize_dtype (line 259) | def test_standardize_dtype(self, dtype): method test_standardize_dtype_with_torch_dtype (line 290) | def test_standardize_dtype_with_torch_dtype(self): method test_name_validation (line 297) | def test_name_validation(self): method test_standardize_shape_with_none (line 311) | def test_standardize_shape_with_none(self): method test_standardize_shape_with_non_iterable (line 317) | def test_standardize_shape_with_non_iterable(self): method test_standardize_shape_with_valid_input (line 323) | def test_standardize_shape_with_valid_input(self): method test_standardize_shape_with_valid_input_with_none (line 328) | def test_standardize_shape_with_valid_input_with_none(self): method test_standardize_shape_with_valid_not_tuple_input (line 333) | def test_standardize_shape_with_valid_not_tuple_input(self): method test_standardize_shape_with_numpy (line 338) | def test_standardize_shape_with_numpy(self): method test_standardize_shape_with_string (line 345) | def test_standardize_shape_with_string(self): method test_standardize_shape_with_float (line 353) | def test_standardize_shape_with_float(self): method test_standardize_shape_with_object (line 361) | def test_standardize_shape_with_object(self): method test_standardize_shape_with_negative_dimension (line 369) | def test_standardize_shape_with_negative_dimension(self): method test_standardize_shape_preserves_none (line 381) | def test_standardize_shape_preserves_none(self, input_shape, expected): method test_shape_equal_length_mismatch (line 386) | def test_shape_equal_length_mismatch(self): method test_autocast_scope_with_non_float_dtype (line 392) | def test_autocast_scope_with_non_float_dtype(self): method test_variable_path_creation (line 400) | def test_variable_path_creation(self): method test_overwrite_with_gradient_setter (line 409) | def test_overwrite_with_gradient_setter(self): class VariableNumpyValueAndAssignmentTest (line 422) | class VariableNumpyValueAndAssignmentTest(test_case.TestCase): method test_variable_numpy (line 425) | def test_variable_numpy(self): method test_variable_numpy_scalar (line 435) | def test_variable_numpy_scalar(self): method test_variable_value (line 446) | def test_variable_value(self): method test_variable_assign (line 451) | def test_variable_assign(self): method test_variable_assign_return (line 457) | def test_variable_assign_return(self): method test_variable_assign_add (line 463) | def test_variable_assign_add(self): method test_variable_assign_add_return (line 469) | def test_variable_assign_add_return(self): method test_variable_assign_sub (line 475) | def test_variable_assign_sub(self): method test_variable_assign_sub_return (line 481) | def test_variable_assign_sub_return(self): method test_deferred_initialize_within_stateless_scope (line 487) | def test_deferred_initialize_within_stateless_scope(self): class VariableDtypeShapeNdimRepr (line 501) | class VariableDtypeShapeNdimRepr(test_case.TestCase): method test_variable_dtype (line 504) | def test_variable_dtype(self): method test_variable_shape (line 511) | def test_variable_shape(self): method test_variable_ndim (line 516) | def test_variable_ndim(self): method test_variable_repr (line 521) | def test_variable_repr(self): method test_variable_getitem (line 543) | def test_variable_getitem(self): method test_variable_initialize (line 548) | def test_variable_initialize(self): method test_variable_convert_to_tensor (line 555) | def test_variable_convert_to_tensor(self): method test_variable_convert_to_tensor_with_dtype (line 562) | def test_variable_convert_to_tensor_with_dtype(self): method test_variable_array (line 570) | def test_variable_array(self): class VariableOpsCorrectnessTest (line 576) | class VariableOpsCorrectnessTest(test_case.TestCase): method test_int (line 579) | def test_int(self): method test_float (line 583) | def test_float(self): method test__neg__ (line 587) | def test__neg__(self): method test__abs__ (line 592) | def test__abs__(self): method test__invert__ (line 597) | def test__invert__(self): method test__eq__ (line 604) | def test__eq__(self): method test__ne__ (line 611) | def test__ne__(self): method test__lt__ (line 618) | def test__lt__(self): method test__le__ (line 625) | def test__le__(self): method test__gt__ (line 632) | def test__gt__(self): method test__ge__ (line 639) | def test__ge__(self): method test__add__ (line 646) | def test__add__(self): method test__radd__ (line 652) | def test__radd__(self): method test__sub__ (line 658) | def test__sub__(self): method test__rsub__ (line 664) | def test__rsub__(self): method test__mul__ (line 670) | def test__mul__(self): method test__rmul__ (line 676) | def test__rmul__(self): method test__truediv__ (line 682) | def test__truediv__(self): method test__rtruediv__ (line 688) | def test__rtruediv__(self): method test__floordiv__ (line 697) | def test__floordiv__(self): method test__rfloordiv__ (line 706) | def test__rfloordiv__(self): method test__mod__ (line 712) | def test__mod__(self): method test__rmod__ (line 718) | def test__rmod__(self): method test__pow__ (line 724) | def test__pow__(self): method test__rpow__ (line 730) | def test__rpow__(self): method test__matmul__ (line 736) | def test__matmul__(self): method test__rmatmul__ (line 744) | def test__rmatmul__(self): method test__and__ (line 752) | def test__and__(self): method test__rand__ (line 762) | def test__rand__(self): method test__or__ (line 772) | def test__or__(self): method test__ror__ (line 782) | def test__ror__(self): method test__xor__ (line 792) | def test__xor__(self): method test__rxor__ (line 802) | def test__rxor__(self): method test__pos__ (line 812) | def test__pos__(self): method test_variable_pow (line 817) | def test_variable_pow(self): method test_variable_rpow (line 824) | def test_variable_rpow(self): method test_round (line 831) | def test_round(self): class VariableOpsBehaviorTest (line 836) | class VariableOpsBehaviorTest(test_case.TestCase): method test_invalid_bool (line 837) | def test_invalid_bool(self): method test_invalid_int (line 845) | def test_invalid_int(self): method test_invalid_float (line 852) | def test_invalid_float(self): class VariableOpsDTypeTest (line 860) | class VariableOpsDTypeTest(test_case.TestCase): method test_eq (line 902) | def test_eq(self, dtypes): method test_ne (line 917) | def test_ne(self, dtypes): method test_lt (line 932) | def test_lt(self, dtypes): method test_le (line 947) | def test_le(self, dtypes): method test_gt (line 962) | def test_gt(self, dtypes): method test_ge (line 977) | def test_ge(self, dtypes): method test_add (line 994) | def test_add(self, dtypes): method test_sub (line 1010) | def test_sub(self, dtypes): method test_mul (line 1026) | def test_mul(self, dtypes): method test_truediv (line 1042) | def test_truediv(self, dtypes): method test_floordiv (line 1063) | def test_floordiv(self, dtypes): method test_mod (line 1081) | def test_mod(self, dtypes): method test_pow (line 1097) | def test_pow(self, dtypes): method test_matmul (line 1113) | def test_matmul(self, dtypes): method test_and (line 1129) | def test_and(self, dtypes): method test_or (line 1147) | def test_or(self, dtypes): method test_xor (line 1163) | def test_xor(self, dtypes): class TestStandardizeShapeWithTorch (line 1183) | class TestStandardizeShapeWithTorch(test_case.TestCase): method test_standardize_shape_with_torch_size (line 1184) | def test_standardize_shape_with_torch_size(self): method test_standardize_shape_with_torch_symint (line 1195) | def test_standardize_shape_with_torch_symint(self): class TestStandardizeShapeWithTensorflow (line 1222) | class TestStandardizeShapeWithTensorflow(test_case.TestCase): method test_standardize_shape_with_tensor_size (line 1223) | def test_standardize_shape_with_tensor_size(self): FILE: keras/src/backend/config.py function floatx (line 27) | def floatx(): function set_floatx (line 45) | def set_floatx(value): function epsilon (line 82) | def epsilon(): function set_epsilon (line 98) | def set_epsilon(value): function image_data_format (line 126) | def image_data_format(): function set_image_data_format (line 147) | def set_image_data_format(data_format): function enable_flash_attention (line 178) | def enable_flash_attention(): function disable_flash_attention (line 199) | def disable_flash_attention(): function is_flash_attention_enabled (line 215) | def is_flash_attention_enabled(): function is_nnx_enabled (line 237) | def is_nnx_enabled(): function set_nnx_enabled (line 247) | def set_nnx_enabled(value): function standardize_data_format (line 262) | def standardize_data_format(data_format): function keras_home (line 286) | def keras_home(): function backend (line 377) | def backend(): function set_max_epochs (line 394) | def set_max_epochs(max_epochs): function set_max_steps_per_epoch (line 410) | def set_max_steps_per_epoch(max_steps_per_epoch): function max_epochs (line 427) | def max_epochs(): function max_steps_per_epoch (line 442) | def max_steps_per_epoch(): FILE: keras/src/backend/jax/core.py class JaxVariable (line 28) | class JaxVariable(KerasVariable): method __init__ (line 29) | def __init__(self, *args, layout=None, **kwargs): method _initialize_layout (line 35) | def _initialize_layout(self): method _initialize (line 48) | def _initialize(self, value): method _initialize_with_initializer (line 54) | def _initialize_with_initializer(self, initializer): method _direct_assign (line 69) | def _direct_assign(self, value): method _convert_to_tensor (line 74) | def _convert_to_tensor(self, value, dtype=None): method __jax_array__ (line 78) | def __jax_array__(self): class NnxVariable (line 86) | class NnxVariable(JaxVariable, nnx.Variable): method __init__ (line 87) | def __init__( method _initialize_with_initializer (line 135) | def _initialize_with_initializer(self, initializer): method _value (line 142) | def _value(self): method _value (line 148) | def _value(self, new_keras_value): method __getstate__ (line 151) | def __getstate__(self): method __setstate__ (line 182) | def __setstate__(self, state): method _direct_assign (line 216) | def _direct_assign(self, value): method value (line 233) | def value(self): function _flatten_nnx_variable (line 261) | def _flatten_nnx_variable(variable): function _unflatten_nnx_variable (line 275) | def _unflatten_nnx_variable(aux_data, children): function __setattr__ (line 300) | def __setattr__(self, name, value): function should_shard_at_init (line 315) | def should_shard_at_init(init_layout, shape): function convert_to_tensor (line 327) | def convert_to_tensor(x, dtype=None, sparse=None, ragged=None): function convert_to_numpy (line 360) | def convert_to_numpy(x): function is_tensor (line 368) | def is_tensor(x): function shape (line 374) | def shape(x): function cast (line 378) | def cast(x, dtype): function compute_output_spec (line 383) | def compute_output_spec(fn, *args, **kwargs): function cond (line 487) | def cond(pred, true_fn, false_fn): function vectorized_map (line 491) | def vectorized_map(function, elements): function map (line 495) | def map(f, xs): function scan (line 499) | def scan(f, init, xs=None, length=None, reverse=False, unroll=1): function associative_scan (line 511) | def associative_scan(f, elems, reverse=False, axis=0): function scatter (line 515) | def scatter(indices, values, shape): function scatter_update (line 521) | def scatter_update(inputs, indices, updates, reduction=None): function slice (line 540) | def slice(inputs, start_indices, shape): function slice_update (line 550) | def slice_update(inputs, start_indices, updates): function switch (line 554) | def switch(index, branches, *operands): function while_loop (line 558) | def while_loop( function fori_loop (line 594) | def fori_loop(lower, upper, body_fun, init_val): function stop_gradient (line 598) | def stop_gradient(variable): function unstack (line 604) | def unstack(x, num=None, axis=0): function random_seed_dtype (line 611) | def random_seed_dtype(): function custom_gradient (line 616) | def custom_gradient(fun): function remat (line 630) | def remat(f): class name_scope (line 642) | class name_scope(base_name_scope): method __init__ (line 643) | def __init__(self, name, **kwargs): method __enter__ (line 647) | def __enter__(self): method __exit__ (line 665) | def __exit__(self, *args, **kwargs): function device_scope (line 671) | def device_scope(device_name): FILE: keras/src/backend/jax/core_test.py class NnxVariableTest (line 27) | class NnxVariableTest(testing.TestCase): method setup (line 28) | def setup(self): method test_variable_in_nnx_module (line 47) | def test_variable_in_nnx_module(self): method test_model_saving (line 55) | def test_model_saving(self): method test_keras_variable_nnx_split_merge_sync (line 63) | def test_keras_variable_nnx_split_merge_sync(self): FILE: keras/src/backend/jax/distribution_lib.py function list_devices (line 11) | def list_devices(device_type=None): function get_device_count (line 29) | def get_device_count(device_type=None): function distribute_tensor (line 43) | def distribute_tensor(tensor, layout): function distribute_data_input (line 86) | def distribute_data_input(per_process_batch, layout, batch_dim_name): function initialize_rng (line 109) | def initialize_rng(): function initialize (line 138) | def initialize(job_addresses, num_processes, process_id): function num_processes (line 165) | def num_processes(): function process_id (line 170) | def process_id(): function _to_backend_device (line 175) | def _to_backend_device(device_name): function _to_backend_mesh (line 191) | def _to_backend_mesh(device_mesh): function _to_backend_layout (line 206) | def _to_backend_layout(tensor_layout): FILE: keras/src/backend/jax/distribution_lib_test.py class JaxDistributionLibTest (line 35) | class JaxDistributionLibTest(testing.TestCase): method _create_jax_layout (line 36) | def _create_jax_layout(self, sharding): method test_get_device_count (line 45) | def test_get_device_count(self): method test_list_devices (line 49) | def test_list_devices(self): method test_device_conversion (line 54) | def test_device_conversion(self): method test_initialize_with_all_job_addresses (line 64) | def test_initialize_with_all_job_addresses(self, mock_jax_initialize): method test_initialize_validate_job_and_process (line 70) | def test_initialize_validate_job_and_process(self): method test_initialize_with_coordinator_address (line 77) | def test_initialize_with_coordinator_address(self, mock_jax_initialize): method test_distribute_tensor (line 83) | def test_distribute_tensor(self): method test_distribute_tensor_with_jax_layout (line 107) | def test_distribute_tensor_with_jax_layout(self): method test_processes (line 137) | def test_processes(self): method test_to_backend_mesh (line 141) | def test_to_backend_mesh(self): method test_to_backend_layout (line 153) | def test_to_backend_layout(self): method test_validation_for_device_mesh (line 168) | def test_validation_for_device_mesh(self): method test_variable_assignment_reuse_layout (line 177) | def test_variable_assignment_reuse_layout(self): method test_e2e_data_parallel_model (line 215) | def test_e2e_data_parallel_model(self): method test_e2e_model_parallel_model (line 239) | def test_e2e_model_parallel_model(self): method test_e2e_model_parallel_with_output_sharding (line 278) | def test_e2e_model_parallel_with_output_sharding(self): method test_distribute_data_input (line 334) | def test_distribute_data_input(self): class ShardingCaptureLayer (line 368) | class ShardingCaptureLayer(layers.Layer): method __init__ (line 369) | def __init__(self, **kwargs): method call (line 374) | def call(self, inputs): method capture_input_sharding (line 380) | def capture_input_sharding(self, sharding): FILE: keras/src/backend/jax/export.py class JaxExportArchive (line 13) | class JaxExportArchive(SavedModelExportArchive): method _backend_init (line 16) | def _backend_init(self): method _backend_track_layer (line 22) | def _backend_track_layer(self, layer): method _backend_add_endpoint (line 46) | def _backend_add_endpoint(self, name, fn, input_signature, **kwargs): method _convert_jax2tf_function (line 131) | def _convert_jax2tf_function(self, fn, input_signature, jax2tf_kwargs=... method _to_polymorphic_shape (line 141) | def _to_polymorphic_shape(self, struct, allow_none=True): method _check_device_compatible (line 170) | def _check_device_compatible(self): FILE: keras/src/backend/jax/image.py function rgb_to_grayscale (line 47) | def rgb_to_grayscale(images, data_format=None): function rgb_to_hsv (line 71) | def rgb_to_hsv(images, data_format=None): function hsv_to_rgb (line 121) | def hsv_to_rgb(images, data_format=None): function resize (line 161) | def resize( function affine_transform (line 403) | def affine_transform( function perspective_transform (line 501) | def perspective_transform( function compute_homography_matrix (line 602) | def compute_homography_matrix(start_points, end_points): function map_coordinates (line 647) | def map_coordinates( function gaussian_blur (line 680) | def gaussian_blur( function elastic_transform (line 743) | def elastic_transform( function scale_and_translate (line 872) | def scale_and_translate( FILE: keras/src/backend/jax/layer.py class BaseLayer (line 6) | class BaseLayer(nnx.Module): method __init_subclass__ (line 7) | def __init_subclass__(cls, **kwargs): class JaxLayer (line 13) | class JaxLayer(BaseLayer): FILE: keras/src/backend/jax/linalg.py function cholesky (line 12) | def cholesky(a, upper=False): function cholesky_inverse (line 29) | def cholesky_inverse(a, upper=False): function det (line 39) | def det(a): function eig (line 43) | def eig(x): function eigh (line 47) | def eigh(x): function inv (line 51) | def inv(a): function lu_factor (line 55) | def lu_factor(x): function norm (line 64) | def norm(x, ord=None, axis=None, keepdims=False): function qr (line 74) | def qr(x, mode="reduced"): function solve (line 84) | def solve(a, b): function solve_triangular (line 88) | def solve_triangular(a, b, lower=False): function svd (line 92) | def svd(x, full_matrices=True, compute_uv=True): function lstsq (line 96) | def lstsq(a, b, rcond=None): function jvp (line 102) | def jvp(fun, primals, tangents, has_aux=False): FILE: keras/src/backend/jax/math.py function segment_sum (line 11) | def segment_sum(data, segment_ids, num_segments=None, sorted=False): function segment_max (line 22) | def segment_max(data, segment_ids, num_segments=None, sorted=False): function top_k (line 33) | def top_k(x, k, sorted=True): function in_top_k (line 39) | def in_top_k(targets, predictions, k): function logsumexp (line 51) | def logsumexp(x, axis=None, keepdims=False): function qr (line 55) | def qr(x, mode="reduced"): function extract_sequences (line 65) | def extract_sequences(x, sequence_length, sequence_stride): function _get_complex_tensor_from_tuple (line 79) | def _get_complex_tensor_from_tuple(x): function fft (line 107) | def fft(x): function fft2 (line 113) | def fft2(x): function ifft2 (line 119) | def ifft2(x): function rfft (line 125) | def rfft(x, fft_length=None): function irfft (line 130) | def irfft(x, fft_length=None): function stft (line 135) | def stft( function istft (line 198) | def istft( function rsqrt (line 261) | def rsqrt(x): function erf (line 265) | def erf(x): function erfinv (line 269) | def erfinv(x): function logdet (line 273) | def logdet(x): FILE: keras/src/backend/jax/nn.py function relu (line 29) | def relu(x): function relu6 (line 34) | def relu6(x): function sigmoid (line 39) | def sigmoid(x): function sparse_sigmoid (line 44) | def sparse_sigmoid(x): function tanh (line 49) | def tanh(x): function tanh_shrink (line 54) | def tanh_shrink(x): function softplus (line 59) | def softplus(x): function softsign (line 64) | def softsign(x): function soft_shrink (line 69) | def soft_shrink(x, threshold=0.5): function sparse_plus (line 78) | def sparse_plus(x): function silu (line 83) | def silu(x): function squareplus (line 88) | def squareplus(x, b=4): function log_sigmoid (line 93) | def log_sigmoid(x): function leaky_relu (line 98) | def leaky_relu(x, negative_slope=0.2): function hard_sigmoid (line 103) | def hard_sigmoid(x): function hard_silu (line 108) | def hard_silu(x): function elu (line 113) | def elu(x, alpha=1.0): function selu (line 118) | def selu(x): function gelu (line 123) | def gelu(x, approximate=True): function celu (line 128) | def celu(x, alpha=1.0): function glu (line 133) | def glu(x, axis=-1): function hard_tanh (line 138) | def hard_tanh(x): function hard_shrink (line 143) | def hard_shrink(x, threshold=0.5): function threshold (line 148) | def threshold(x, threshold, default_value): function softmax (line 153) | def softmax(x, axis=-1): function log_softmax (line 158) | def log_softmax(x, axis=-1): function sparsemax (line 163) | def sparsemax(x, axis=-1): function _convert_to_spatial_operand (line 181) | def _convert_to_spatial_operand( function _pool (line 198) | def _pool( function max_pool (line 236) | def max_pool( function average_pool (line 255) | def average_pool( function _compute_adaptive_pooling_gather_indices (line 295) | def _compute_adaptive_pooling_gather_indices( function _adaptive_average_pool1d (line 320) | def _adaptive_average_pool1d(inputs, output_size, data_format="channels_... function _adaptive_max_pool1d (line 354) | def _adaptive_max_pool1d(inputs, output_size, data_format="channels_firs... function _adaptive_average_pool2d (line 384) | def _adaptive_average_pool2d(inputs, output_size, data_format="channels_... function _adaptive_max_pool2d (line 440) | def _adaptive_max_pool2d(inputs, output_size, data_format="channels_firs... function _adaptive_average_pool3d (line 484) | def _adaptive_average_pool3d(inputs, output_size, data_format="channels_... function _adaptive_max_pool3d (line 585) | def _adaptive_max_pool3d(inputs, output_size, data_format="channels_firs... function adaptive_average_pool (line 668) | def adaptive_average_pool(inputs, output_size, data_format=None): function adaptive_max_pool (line 680) | def adaptive_max_pool(inputs, output_size, data_format=None): function _convert_to_lax_conv_dimension_numbers (line 692) | def _convert_to_lax_conv_dimension_numbers( function conv (line 717) | def conv( function depthwise_conv (line 777) | def depthwise_conv( function separable_conv (line 824) | def separable_conv( function conv_transpose (line 852) | def conv_transpose( function one_hot (line 900) | def one_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function multi_hot (line 928) | def multi_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function categorical_crossentropy (line 951) | def categorical_crossentropy(target, output, from_logits=False, axis=-1): function sparse_categorical_crossentropy (line 977) | def sparse_categorical_crossentropy(target, output, from_logits=False, a... function binary_crossentropy (line 1005) | def binary_crossentropy(target, output, from_logits=False): function moments (line 1027) | def moments(x, axes, keepdims=False, synchronized=False): function batch_normalization (line 1060) | def batch_normalization( function ctc_loss (line 1081) | def ctc_loss(target, output, target_length, output_length, mask_index=0): function _ctc_greedy_decode (line 1189) | def _ctc_greedy_decode( function _ctc_beam_search_decode (line 1232) | def _ctc_beam_search_decode( function ctc_decode (line 1395) | def ctc_decode( function psnr (line 1430) | def psnr(x1, x2, max_val): function _can_use_flash_attention (line 1443) | def _can_use_flash_attention(query, key, value, bias, raise_error=False): function _apply_masks (line 1517) | def _apply_masks(logits, mask, is_causal): function _dot_product_attention_core (line 1538) | def _dot_product_attention_core( function wrap_flash_attention (line 1558) | def wrap_flash_attention( function dot_product_attention (line 1626) | def dot_product_attention( function unfold (line 1860) | def unfold(input, kernel_size, dilation=1, padding=0, stride=1): function fold (line 1903) | def fold(x, output_size, kernel_size, dilation=1, padding=0, stride=1): function depth_to_space (line 1973) | def depth_to_space(x, block_size, data_format="channels_last"): function space_to_depth (line 2012) | def space_to_depth(x, block_size, data_format="channels_last"): FILE: keras/src/backend/jax/numpy.py function _uses_cpu (line 20) | def _uses_cpu(x): function rot90 (line 32) | def rot90(array, k=1, axes=(0, 1)): function add (line 48) | def add(x1, x2): function bartlett (line 54) | def bartlett(x): function hamming (line 59) | def hamming(x): function hanning (line 64) | def hanning(x): function heaviside (line 69) | def heaviside(x1, x2): function hypot (line 75) | def hypot(x1, x2): function kaiser (line 81) | def kaiser(x, beta): function bincount (line 86) | def bincount(x, weights=None, minlength=0, sparse=False): function einsum (line 134) | def einsum(subscripts, *operands, **kwargs): function subtract (line 148) | def subtract(x1, x2): function matmul (line 154) | def matmul(x1, x2): function multiply (line 185) | def multiply(x1, x2): function mean (line 226) | def mean(x, axis=None, keepdims=False): function max (line 266) | def max(x, axis=None, keepdims=False, initial=None): function ones (line 271) | def ones(shape, dtype=None): function zeros (line 276) | def zeros(shape, dtype=None): function absolute (line 282) | def absolute(x): function abs (line 287) | def abs(x): function all (line 291) | def all(x, axis=None, keepdims=False): function angle (line 295) | def angle(x): function any (line 305) | def any(x, axis=None, keepdims=False): function amax (line 309) | def amax(x, axis=None, keepdims=False): function amin (line 313) | def amin(x, axis=None, keepdims=False): function append (line 317) | def append(x1, x2, axis=None): function arange (line 323) | def arange(start, stop=None, step=None, dtype=None): function arccos (line 343) | def arccos(x): function arccosh (line 354) | def arccosh(x): function arcsin (line 365) | def arcsin(x): function arcsinh (line 376) | def arcsinh(x): function arctan (line 387) | def arctan(x): function arctan2 (line 397) | def arctan2(x1, x2): function arctanh (line 407) | def arctanh(x): function argmax (line 417) | def argmax(x, axis=None, keepdims=False): function argmin (line 432) | def argmin(x, axis=None, keepdims=False): function argsort (line 447) | def argsort(x, axis=-1): function array (line 454) | def array(x, dtype=None): function view (line 458) | def view(x, dtype=None): function average (line 463) | def average(x, axis=None, weights=None): function bitwise_and (line 476) | def bitwise_and(x, y): function bitwise_invert (line 482) | def bitwise_invert(x): function bitwise_not (line 487) | def bitwise_not(x): function bitwise_or (line 491) | def bitwise_or(x, y): function bitwise_xor (line 497) | def bitwise_xor(x, y): function bitwise_left_shift (line 503) | def bitwise_left_shift(x, y): function left_shift (line 510) | def left_shift(x, y): function bitwise_right_shift (line 514) | def bitwise_right_shift(x, y): function right_shift (line 521) | def right_shift(x, y): function blackman (line 525) | def blackman(x): function broadcast_to (line 530) | def broadcast_to(x, shape): function cbrt (line 535) | def cbrt(x): function ceil (line 541) | def ceil(x): function clip (line 551) | def clip(x, x_min, x_max): function concatenate (line 558) | def concatenate(xs, axis=0): function conjugate (line 576) | def conjugate(x): function conj (line 582) | def conj(x): function copy (line 588) | def copy(x): function cos (line 594) | def cos(x): function cosh (line 605) | def cosh(x): function count_nonzero (line 615) | def count_nonzero(x, axis=None): function cross (line 619) | def cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None): function cumprod (line 632) | def cumprod(x, axis=None, dtype=None): function cumsum (line 637) | def cumsum(x, axis=None, dtype=None): function deg2rad (line 642) | def deg2rad(x): function diag (line 647) | def diag(x, k=0): function diagflat (line 652) | def diagflat(x, k=0): function diagonal (line 657) | def diagonal(x, offset=0, axis1=0, axis2=1): function diff (line 667) | def diff(a, n=1, axis=-1): function digitize (line 673) | def digitize(x, bins): function dot (line 679) | def dot(x1, x2): function dstack (line 685) | def dstack(xs): function empty (line 689) | def empty(shape, dtype=None): function empty_like (line 694) | def empty_like(x, dtype=None): function equal (line 698) | def equal(x1, x2): function exp (line 705) | def exp(x): function exp2 (line 714) | def exp2(x): function expand_dims (line 722) | def expand_dims(x, axis): function expm1 (line 739) | def expm1(x): function flip (line 747) | def flip(x, axis=None): function floor (line 752) | def floor(x): function full (line 762) | def full(shape, fill_value, dtype=None): function full_like (line 767) | def full_like(x, fill_value, dtype=None): function gcd (line 771) | def gcd(x1, x2): function geomspace (line 777) | def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): function greater (line 783) | def greater(x1, x2): function greater_equal (line 789) | def greater_equal(x1, x2): function hstack (line 795) | def hstack(xs): function hsplit (line 799) | def hsplit(x, indices_or_sections): function identity (line 804) | def identity(n, dtype=None): function imag (line 810) | def imag(x): function isclose (line 815) | def isclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function allclose (line 821) | def allclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function isfinite (line 828) | def isfinite(x): function isin (line 833) | def isin(x1, x2, assume_unique=False, invert=False): function isinf (line 840) | def isinf(x): function isnan (line 846) | def isnan(x): function isneginf (line 851) | def isneginf(x): function isposinf (line 856) | def isposinf(x): function isreal (line 861) | def isreal(x): function kron (line 866) | def kron(x1, x2): function lcm (line 872) | def lcm(x1, x2): function ldexp (line 878) | def ldexp(x1, x2): function less (line 891) | def less(x1, x2): function less_equal (line 897) | def less_equal(x1, x2): function linspace (line 903) | def linspace( function log (line 918) | def log(x): function log10 (line 926) | def log10(x): function log1p (line 934) | def log1p(x): function log2 (line 942) | def log2(x): function logaddexp (line 949) | def logaddexp(x1, x2): function logaddexp2 (line 958) | def logaddexp2(x1, x2): function logical_and (line 967) | def logical_and(x1, x2): function logical_not (line 973) | def logical_not(x): function logical_or (line 978) | def logical_or(x1, x2): function logspace (line 984) | def logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, ax... function maximum (line 997) | def maximum(x1, x2): function median (line 1003) | def median(x, axis=None, keepdims=False): function meshgrid (line 1020) | def meshgrid(*x, indexing="xy"): function min (line 1024) | def min(x, axis=None, keepdims=False, initial=None): function minimum (line 1030) | def minimum(x1, x2): function mod (line 1036) | def mod(x1, x2): function fmod (line 1042) | def fmod(x1, x2): function moveaxis (line 1048) | def moveaxis(x, source, destination): function nanargmax (line 1052) | def nanargmax(x, axis=None, keepdims=False): function nanargmin (line 1057) | def nanargmin(x, axis=None, keepdims=False): function nancumsum (line 1062) | def nancumsum(x, axis=None, dtype=None): function nancumprod (line 1067) | def nancumprod(x, axis=None, dtype=None): function nanmax (line 1072) | def nanmax(x, axis=None, keepdims=False): function nanmean (line 1077) | def nanmean(x, axis=None, keepdims=False): function nanmin (line 1082) | def nanmin(x, axis=None, keepdims=False): function nanprod (line 1087) | def nanprod(x, axis=None, keepdims=False): function nanstd (line 1092) | def nanstd(x, axis=None, keepdims=False): function nansum (line 1097) | def nansum(x, axis=None, keepdims=False): function nanvar (line 1102) | def nanvar(x, axis=None, keepdims=False): function nan_to_num (line 1107) | def nan_to_num(x, nan=0.0, posinf=None, neginf=None): function ndim (line 1112) | def ndim(x): function nonzero (line 1116) | def nonzero(x): function not_equal (line 1120) | def not_equal(x1, x2): function ones_like (line 1126) | def ones_like(x, dtype=None): function zeros_like (line 1130) | def zeros_like(x, dtype=None): function outer (line 1134) | def outer(x1, x2): function pad (line 1138) | def pad(x, pad_width, mode="constant", constant_values=None): function prod (line 1152) | def prod(x, axis=None, keepdims=False, dtype=None): function ptp (line 1157) | def ptp(x, axis=None, keepdims=False): function quantile (line 1162) | def quantile(x, q, axis=None, method="linear", keepdims=False): function ravel (line 1178) | def ravel(x): function unravel_index (line 1183) | def unravel_index(indices, shape): function real (line 1189) | def real(x): function reciprocal (line 1195) | def reciprocal(x): function repeat (line 1200) | def repeat(x, repeats, axis=None): function reshape (line 1205) | def reshape(x, newshape): function roll (line 1220) | def roll(x, shift, axis=None): function searchsorted (line 1224) | def searchsorted(sorted_sequence, values, side="left"): function sign (line 1236) | def sign(x): function signbit (line 1242) | def signbit(x): function sin (line 1248) | def sin(x): function sinc (line 1258) | def sinc(x): function sinh (line 1269) | def sinh(x): function size (line 1279) | def size(x): function sort (line 1283) | def sort(x, axis=-1): function split (line 1288) | def split(x, indices_or_sections, axis=0): function array_split (line 1293) | def array_split(x, indices_or_sections, axis=0): function stack (line 1298) | def stack(x, axis=0): function std (line 1303) | def std(x, axis=None, keepdims=False): function swapaxes (line 1310) | def swapaxes(x, axis1, axis2): function take (line 1315) | def take(x, indices, axis=None): function take_along_axis (line 1321) | def take_along_axis(x, indices, axis=None): function tan (line 1328) | def tan(x): function tanh (line 1339) | def tanh(x): function tensordot (line 1349) | def tensordot(x1, x2, axes=2): function round (line 1356) | def round(x, decimals=0): function tile (line 1372) | def tile(x, repeats): function trace (line 1376) | def trace(x, offset=0, axis1=0, axis2=1): function tri (line 1381) | def tri(N, M=None, k=0, dtype=None): function tril (line 1386) | def tril(x, k=0): function triu (line 1391) | def triu(x, k=0): function trunc (line 1396) | def trunc(x): function vdot (line 1404) | def vdot(x1, x2): function inner (line 1410) | def inner(x1, x2): function vstack (line 1416) | def vstack(xs): function vsplit (line 1420) | def vsplit(x, indices_or_sections): function vectorize (line 1425) | def vectorize(pyfunc, *, excluded=None, signature=None): function where (line 1431) | def where(condition, x1=None, x2=None): function divide (line 1436) | def divide(x1, x2): function divide_no_nan (line 1442) | def divide_no_nan(x1, x2): function true_divide (line 1449) | def true_divide(x1, x2): function power (line 1453) | def power(x1, x2): function negative (line 1460) | def negative(x): function nextafter (line 1465) | def nextafter(x1, x2): function square (line 1472) | def square(x): function sqrt (line 1478) | def sqrt(x): function squeeze (line 1485) | def squeeze(x, axis=None): function transpose (line 1495) | def transpose(x, axes=None): function trapezoid (line 1510) | def trapezoid(y, x=None, dx=1.0, axis=-1): function vander (line 1518) | def vander(x, N=None, increasing=False): function var (line 1523) | def var(x, axis=None, keepdims=False): function sum (line 1535) | def sum(x, axis=None, keepdims=False): function eye (line 1560) | def eye(N, M=None, k=0, dtype=None): function floor_divide (line 1565) | def floor_divide(x1, x2): function logical_xor (line 1571) | def logical_xor(x1, x2): function corrcoef (line 1577) | def corrcoef(x): function correlate (line 1582) | def correlate(x1, x2, mode="valid"): function select (line 1588) | def select(condlist, choicelist, default=0): function slogdet (line 1592) | def slogdet(x): function argpartition (line 1597) | def argpartition(x, kth, axis=-1): function histogram (line 1601) | def histogram(x, bins=10, range=None): FILE: keras/src/backend/jax/optimizer.py class JaxOptimizer (line 15) | class JaxOptimizer(base_optimizer.BaseOptimizer): method _backend_apply_gradients (line 16) | def _backend_apply_gradients(self, grads, trainable_variables): FILE: keras/src/backend/jax/random.py function jax_draw_seed (line 9) | def jax_draw_seed(seed): function normal (line 16) | def normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function uniform (line 23) | def uniform(shape, minval=0.0, maxval=1.0, dtype=None, seed=None): function categorical (line 31) | def categorical(logits, num_samples, dtype="int32", seed=None): function randint (line 42) | def randint(shape, minval, maxval, dtype="int32", seed=None): function truncated_normal (line 49) | def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function _get_concrete_noise_shape (line 58) | def _get_concrete_noise_shape(inputs, noise_shape): function dropout (line 71) | def dropout(inputs, rate, noise_shape=None, seed=None): function shuffle (line 88) | def shuffle(x, axis=0, seed=None): function gamma (line 93) | def gamma(shape, alpha, dtype=None, seed=None): function binomial (line 99) | def binomial(shape, counts, probabilities, dtype=None, seed=None): function beta (line 111) | def beta(shape, alpha, beta, dtype=None, seed=None): FILE: keras/src/backend/jax/rnn.py function rnn (line 10) | def rnn( function cudnn_ok (line 214) | def cudnn_ok(*args, **kwargs): function lstm (line 218) | def lstm(*args, **kwargs): function gru (line 222) | def gru(*args, **kwargs): function unstack (line 226) | def unstack(x, axis=0): FILE: keras/src/backend/jax/sparse.py function axis_shape_dims_for_broadcast_in_dim (line 9) | def axis_shape_dims_for_broadcast_in_dim(axis, input_shape, insert_dims): function bcoo_add_indices (line 67) | def bcoo_add_indices(x1, x2, sum_duplicates): function densifying_unary (line 88) | def densifying_unary(func): function elementwise_unary (line 116) | def elementwise_unary(linear): function elementwise_binary_union (line 163) | def elementwise_binary_union(linear, use_sparsify): function elementwise_division (line 255) | def elementwise_division(func): FILE: keras/src/backend/jax/tensorboard.py function start_trace (line 4) | def start_trace(logdir): function stop_trace (line 9) | def stop_trace(save): function start_batch_trace (line 14) | def start_batch_trace(batch): function stop_batch_trace (line 22) | def stop_batch_trace(batch_trace_context): FILE: keras/src/backend/jax/trainer.py class JAXTrainer (line 31) | class JAXTrainer(base_trainer.Trainer): method __init__ (line 32) | def __init__(self): method compute_loss_and_updates (line 39) | def compute_loss_and_updates( method _update_metrics_variables (line 98) | def _update_metrics_variables( method train_step (line 123) | def train_step(self, state, data): method test_step (line 167) | def test_step(self, state, data): method predict_step (line 198) | def predict_step(self, state, data): method _make_function (line 210) | def _make_function(self, step_function, concatenate_outputs=False): method make_train_function (line 261) | def make_train_function(self, force=False): method make_test_function (line 287) | def make_test_function(self, force=False): method make_predict_function (line 323) | def make_predict_function(self, force=False): method fit (line 362) | def fit( method evaluate (line 550) | def evaluate( method predict (line 653) | def predict( method train_on_batch (line 749) | def train_on_batch( method test_on_batch (line 809) | def test_on_batch( method predict_on_batch (line 850) | def predict_on_batch(self, x): method jax_state_sync (line 878) | def jax_state_sync(self): method _get_state_sharding_spec (line 904) | def _get_state_sharding_spec(self): method _check_sharding_consistency (line 933) | def _check_sharding_consistency( method _purge_model_variables (line 1007) | def _purge_model_variables( method _get_jax_state (line 1037) | def _get_jax_state( function _distribute_data (line 1064) | def _distribute_data(data, layouts=None): class JAXEpochIterator (line 1082) | class JAXEpochIterator(EpochIterator): method __next__ (line 1083) | def __next__(self): method _get_iterator (line 1086) | def _get_iterator(self): method _get_distributed_iterator (line 1095) | def _get_distributed_iterator(self, distribution): method _one_batch_ahead_iterator (line 1108) | def _one_batch_ahead_iterator(self, numpy_iterator): FILE: keras/src/backend/jax/trainer_test.py class JAXTrainerTest (line 14) | class JAXTrainerTest(testing.TestCase, parameterized.TestCase): method _skip_if_not_distributed (line 15) | def _skip_if_not_distributed(self): method _make_distribution (line 21) | def _make_distribution(self, dist_type): method test_warns_when_model_built_outside_scope (line 41) | def test_warns_when_model_built_outside_scope(self, dist_type): method test_no_warning_when_model_built_inside_scope (line 82) | def test_no_warning_when_model_built_inside_scope(self, dist_type): FILE: keras/src/backend/numpy/core.py class Variable (line 22) | class Variable(KerasVariable): method _initialize (line 23) | def _initialize(self, value): method _direct_assign (line 26) | def _direct_assign(self, value): method _convert_to_tensor (line 29) | def _convert_to_tensor(self, value, dtype=None): method __array__ (line 33) | def __array__(self): function convert_to_tensor (line 37) | def convert_to_tensor(x, dtype=None, sparse=None, ragged=None): function convert_to_numpy (line 59) | def convert_to_numpy(x): function is_tensor (line 63) | def is_tensor(x): function shape (line 69) | def shape(x): function cast (line 73) | def cast(x, dtype): function cond (line 77) | def cond(pred, true_fn, false_fn): function vectorized_map (line 83) | def vectorized_map(function, elements): function compute_output_spec (line 95) | def compute_output_spec(fn, *args, **kwargs): function map (line 156) | def map(f, xs): function scan (line 164) | def scan(f, init, xs=None, length=None, reverse=False, unroll=1): function associative_scan (line 213) | def associative_scan(f, elems, reverse=False, axis=0): function scatter (line 328) | def scatter(indices, values, shape): function scatter_update (line 343) | def scatter_update(inputs, indices, updates, reduction=None): function slice (line 362) | def slice(inputs, start_indices, shape): function slice_update (line 382) | def slice_update(inputs, start_indices, updates): function switch (line 395) | def switch(index, branches, *operands): function while_loop (line 401) | def while_loop( function fori_loop (line 423) | def fori_loop(lower, upper, body_fun, init_val): function stop_gradient (line 430) | def stop_gradient(variable): function unstack (line 434) | def unstack(x, num=None, axis=0): function random_seed_dtype (line 439) | def random_seed_dtype(): class custom_gradient (line 443) | class custom_gradient: method __init__ (line 450) | def __init__(self, fun): method __call__ (line 458) | def __call__(self, *args, **kwargs): function device_scope (line 464) | def device_scope(device_name): function remat (line 468) | def remat(f): FILE: keras/src/backend/numpy/export.py class NumpyExportArchive (line 1) | class NumpyExportArchive: method track (line 2) | def track(self, resource): method add_endpoint (line 7) | def add_endpoint(self, name, fn, input_signature=None, **kwargs): FILE: keras/src/backend/numpy/image.py function rgb_to_grayscale (line 46) | def rgb_to_grayscale(images, data_format=None): function rgb_to_hsv (line 68) | def rgb_to_hsv(images, data_format=None): function hsv_to_rgb (line 118) | def hsv_to_rgb(images, data_format=None): function resize (line 158) | def resize( function _compute_weight_mat (line 398) | def _compute_weight_mat( function _resize (line 440) | def _resize(image, shape, method, antialias): function _resize_nearest (line 467) | def _resize_nearest(x, output_shape): function _fill_triangle_kernel (line 483) | def _fill_triangle_kernel(x): function _fill_keys_cubic_kernel (line 487) | def _fill_keys_cubic_kernel(x): function _fill_lanczos_kernel (line 493) | def _fill_lanczos_kernel(radius, x): function _scale_and_translate (line 511) | def _scale_and_translate( function affine_transform (line 542) | def affine_transform( function perspective_transform (line 651) | def perspective_transform( function compute_homography_matrix (line 760) | def compute_homography_matrix(start_points, end_points): function map_coordinates (line 910) | def map_coordinates( function gaussian_blur (line 971) | def gaussian_blur( function elastic_transform (line 1047) | def elastic_transform( function scale_and_translate (line 1171) | def scale_and_translate( FILE: keras/src/backend/numpy/layer.py class NumpyLayer (line 1) | class NumpyLayer: FILE: keras/src/backend/numpy/linalg.py function cholesky (line 9) | def cholesky(a, upper=False): function cholesky_inverse (line 13) | def cholesky_inverse(a, upper=False): function det (line 23) | def det(a): function eig (line 27) | def eig(a): function eigh (line 31) | def eigh(a): function inv (line 35) | def inv(a): function lu_factor (line 39) | def lu_factor(a): function norm (line 53) | def norm(x, ord=None, axis=None, keepdims=False): function qr (line 63) | def qr(x, mode="reduced"): function solve (line 73) | def solve(a, b): function solve_triangular (line 77) | def solve_triangular(a, b, lower=False): function svd (line 91) | def svd(x, full_matrices=True, compute_uv=True): function lstsq (line 95) | def lstsq(a, b, rcond=None): function jvp (line 101) | def jvp(fun, primals, tangents, has_aux=False): FILE: keras/src/backend/numpy/math.py function _segment_reduction_fn (line 10) | def _segment_reduction_fn( function segment_sum (line 42) | def segment_sum(data, segment_ids, num_segments=None, sorted=False): function segment_max (line 48) | def segment_max(data, segment_ids, num_segments=None, sorted=False): function top_k (line 54) | def top_k(x, k, sorted=True): function in_top_k (line 69) | def in_top_k(targets, predictions, k): function logsumexp (line 77) | def logsumexp(x, axis=None, keepdims=False): function qr (line 81) | def qr(x, mode="reduced"): function extract_sequences (line 91) | def extract_sequences(x, sequence_length, sequence_stride): function _get_complex_tensor_from_tuple (line 106) | def _get_complex_tensor_from_tuple(x): function fft (line 134) | def fft(x): function fft2 (line 139) | def fft2(x): function ifft2 (line 144) | def ifft2(x): function rfft (line 150) | def rfft(x, fft_length=None): function irfft (line 159) | def irfft(x, fft_length=None): function stft (line 167) | def stft( function istft (line 231) | def istft( function rsqrt (line 288) | def rsqrt(x): function erf (line 292) | def erf(x): function erfinv (line 296) | def erfinv(x): function logdet (line 300) | def logdet(x): FILE: keras/src/backend/numpy/nn.py function relu (line 18) | def relu(x): function relu6 (line 23) | def relu6(x): function sigmoid (line 32) | def sigmoid(x): function sparse_sigmoid (line 37) | def sparse_sigmoid(x): function tanh (line 48) | def tanh(x): function tanh_shrink (line 52) | def tanh_shrink(x): function softplus (line 57) | def softplus(x): function softsign (line 62) | def softsign(x): function soft_shrink (line 67) | def soft_shrink(x, threshold=0.5): function sparse_plus (line 79) | def sparse_plus(x): function silu (line 87) | def silu(x): function squareplus (line 92) | def squareplus(x, b=4): function log_sigmoid (line 99) | def log_sigmoid(x): function leaky_relu (line 104) | def leaky_relu(x, negative_slope=0.2): function hard_sigmoid (line 109) | def hard_sigmoid(x): function hard_silu (line 120) | def hard_silu(x): function elu (line 124) | def elu(x, alpha=1.0): function selu (line 131) | def selu(x): function gelu (line 138) | def gelu(x, approximate=True): function celu (line 160) | def celu(x, alpha=1.0): function glu (line 168) | def glu(x, axis=-1): function hard_tanh (line 180) | def hard_tanh(x): function hard_shrink (line 187) | def hard_shrink(x, threshold=0.5): function threshold (line 196) | def threshold(x, threshold, default_value): function softmax (line 201) | def softmax(x, axis=-1): function log_softmax (line 206) | def log_softmax(x, axis=-1): function sparsemax (line 212) | def sparsemax(x, axis=-1): function _convert_to_spatial_operand (line 230) | def _convert_to_spatial_operand( function _pool (line 247) | def _pool( function max_pool (line 287) | def max_pool( function average_pool (line 306) | def average_pool( function _compute_adaptive_pooling_gather_indices (line 346) | def _compute_adaptive_pooling_gather_indices( function _strided_view_1d (line 370) | def _strided_view_1d(x, window_size): function _adaptive_pool1d_impl (line 381) | def _adaptive_pool1d_impl(inputs, output_size, mode, data_format): function _adaptive_pool2d_impl (line 415) | def _adaptive_pool2d_impl(inputs, output_size, mode, data_format): function _adaptive_pool3d_impl (line 478) | def _adaptive_pool3d_impl(inputs, output_size, mode, data_format): function adaptive_average_pool (line 562) | def adaptive_average_pool(inputs, output_size, data_format=None): function adaptive_max_pool (line 580) | def adaptive_max_pool(inputs, output_size, data_format=None): function _convert_to_lax_conv_dimension_numbers (line 592) | def _convert_to_lax_conv_dimension_numbers( function conv (line 617) | def conv( function depthwise_conv (line 677) | def depthwise_conv( function separable_conv (line 724) | def separable_conv( function conv_transpose (line 752) | def conv_transpose( function one_hot (line 802) | def one_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function multi_hot (line 830) | def multi_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function categorical_crossentropy (line 842) | def categorical_crossentropy(target, output, from_logits=False, axis=-1): function sparse_categorical_crossentropy (line 868) | def sparse_categorical_crossentropy(target, output, from_logits=False, a... function binary_crossentropy (line 896) | def binary_crossentropy(target, output, from_logits=False): function moments (line 916) | def moments(x, axes, keepdims=False, synchronized=False): function batch_normalization (line 951) | def batch_normalization( function ctc_loss (line 972) | def ctc_loss(target, output, target_length, output_length, mask_index=0): function _ctc_greedy_decode (line 1085) | def _ctc_greedy_decode( function _ctc_beam_search_decode (line 1128) | def _ctc_beam_search_decode( function ctc_decode (line 1293) | def ctc_decode( function psnr (line 1328) | def psnr(x1, x2, max_val): function _get_large_negative (line 1341) | def _get_large_negative(dtype): function _apply_masks (line 1347) | def _apply_masks(logits, mask, is_causal): function _dot_product_attention_xla (line 1367) | def _dot_product_attention_xla(query, key, value, bias, mask, is_causal,... function dot_product_attention (line 1396) | def dot_product_attention( function unfold (line 1438) | def unfold(input, kernel_size, dilation=1, padding=0, stride=1): function fold (line 1491) | def fold(x, output_size, kernel_size, dilation=1, padding=0, stride=1): function depth_to_space (line 1548) | def depth_to_space(x, block_size, data_format="channels_last"): function space_to_depth (line 1587) | def space_to_depth(x, block_size, data_format="channels_last"): FILE: keras/src/backend/numpy/numpy.py function rot90 (line 11) | def rot90(array, k=1, axes=(0, 1)): function add (line 26) | def add(x1, x2): function einsum (line 40) | def einsum(subscripts, *operands, **kwargs): function subtract (line 58) | def subtract(x1, x2): function matmul (line 72) | def matmul(x1, x2): function multiply (line 88) | def multiply(x1, x2): function mean (line 102) | def mean(x, axis=None, keepdims=False): function max (line 113) | def max(x, axis=None, keepdims=False, initial=None): function ones (line 118) | def ones(shape, dtype=None): function zeros (line 123) | def zeros(shape, dtype=None): function absolute (line 128) | def absolute(x): function abs (line 132) | def abs(x): function all (line 136) | def all(x, axis=None, keepdims=False): function allclose (line 141) | def allclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False): function angle (line 145) | def angle(x): function any (line 155) | def any(x, axis=None, keepdims=False): function amax (line 160) | def amax(x, axis=None, keepdims=False): function amin (line 165) | def amin(x, axis=None, keepdims=False): function append (line 170) | def append(x1, x2, axis=None): function arange (line 180) | def arange(start, stop=None, step=None, dtype=None): function arccos (line 195) | def arccos(x): function arccosh (line 205) | def arccosh(x): function arcsin (line 215) | def arcsin(x): function arcsinh (line 225) | def arcsinh(x): function arctan (line 235) | def arctan(x): function arctan2 (line 245) | def arctan2(x1, x2): function arctanh (line 254) | def arctanh(x): function argmax (line 264) | def argmax(x, axis=None, keepdims=False): function argmin (line 278) | def argmin(x, axis=None, keepdims=False): function argsort (line 292) | def argsort(x, axis=-1): function array (line 297) | def array(x, dtype=None): function view (line 301) | def view(x, dtype=None): function average (line 306) | def average(x, axis=None, weights=None): function bartlett (line 320) | def bartlett(x): function hamming (line 325) | def hamming(x): function hanning (line 330) | def hanning(x): function heaviside (line 335) | def heaviside(x1, x2): function kaiser (line 348) | def kaiser(x, beta): function bincount (line 353) | def bincount(x, weights=None, minlength=0, sparse=False): function bitwise_and (line 384) | def bitwise_and(x, y): function bitwise_invert (line 393) | def bitwise_invert(x): function bitwise_not (line 398) | def bitwise_not(x): function bitwise_or (line 402) | def bitwise_or(x, y): function bitwise_xor (line 411) | def bitwise_xor(x, y): function bitwise_left_shift (line 420) | def bitwise_left_shift(x, y): function left_shift (line 430) | def left_shift(x, y): function bitwise_right_shift (line 434) | def bitwise_right_shift(x, y): function right_shift (line 444) | def right_shift(x, y): function blackman (line 448) | def blackman(x): function broadcast_to (line 453) | def broadcast_to(x, shape): function cbrt (line 457) | def cbrt(x): function ceil (line 469) | def ceil(x): function clip (line 479) | def clip(x, x_min, x_max): function concatenate (line 487) | def concatenate(xs, axis=0): function conjugate (line 498) | def conjugate(x): function conj (line 502) | def conj(x): function copy (line 506) | def copy(x): function cos (line 510) | def cos(x): function cosh (line 520) | def cosh(x): function count_nonzero (line 530) | def count_nonzero(x, axis=None): function cross (line 537) | def cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None): function cumprod (line 554) | def cumprod(x, axis=None, dtype=None): function cumsum (line 562) | def cumsum(x, axis=None, dtype=None): function deg2rad (line 570) | def deg2rad(x): function diag (line 583) | def diag(x, k=0): function diagflat (line 587) | def diagflat(x, k=0): function diagonal (line 591) | def diagonal(x, offset=0, axis1=0, axis2=1): function diff (line 597) | def diff(a, n=1, axis=-1): function digitize (line 601) | def digitize(x, bins): function dot (line 605) | def dot(x1, x2): function dstack (line 614) | def dstack(xs): function empty (line 624) | def empty(shape, dtype=None): function empty_like (line 629) | def empty_like(x, dtype=None): function equal (line 633) | def equal(x1, x2): function exp (line 637) | def exp(x): function exp2 (line 645) | def exp2(x): function expand_dims (line 653) | def expand_dims(x, axis): function expm1 (line 658) | def expm1(x): function flip (line 666) | def flip(x, axis=None): function floor (line 671) | def floor(x): function full (line 682) | def full(shape, fill_value, dtype=None): function full_like (line 687) | def full_like(x, fill_value, dtype=None): function gcd (line 691) | def gcd(x1, x2): function geomspace (line 699) | def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): function greater (line 706) | def greater(x1, x2): function greater_equal (line 710) | def greater_equal(x1, x2): function hstack (line 714) | def hstack(xs): function hsplit (line 724) | def hsplit(x, indices_or_sections): function hypot (line 729) | def hypot(x1, x2): function identity (line 742) | def identity(n, dtype=None): function imag (line 747) | def imag(x): function isclose (line 751) | def isclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function isfinite (line 755) | def isfinite(x): function isin (line 759) | def isin(x1, x2, assume_unique=False, invert=False): function isinf (line 765) | def isinf(x): function isnan (line 769) | def isnan(x): function isneginf (line 773) | def isneginf(x): function isposinf (line 778) | def isposinf(x): function isreal (line 783) | def isreal(x): function kron (line 788) | def kron(x1, x2): function lcm (line 795) | def lcm(x1, x2): function ldexp (line 802) | def ldexp(x1, x2): function less (line 815) | def less(x1, x2): function less_equal (line 819) | def less_equal(x1, x2): function linspace (line 823) | def linspace( function log (line 845) | def log(x): function log10 (line 855) | def log10(x): function log1p (line 865) | def log1p(x): function log2 (line 875) | def log2(x): function logaddexp (line 885) | def logaddexp(x1, x2): function logaddexp2 (line 894) | def logaddexp2(x1, x2): function logical_and (line 901) | def logical_and(x1, x2): function logical_not (line 905) | def logical_not(x): function logical_or (line 909) | def logical_or(x1, x2): function logspace (line 913) | def logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, ax... function maximum (line 932) | def maximum(x1, x2): function median (line 946) | def median(x, axis=None, keepdims=False): function meshgrid (line 951) | def meshgrid(*x, indexing="xy"): function min (line 955) | def min(x, axis=None, keepdims=False, initial=None): function minimum (line 960) | def minimum(x1, x2): function mod (line 974) | def mod(x1, x2): function fmod (line 985) | def fmod(x1, x2): function moveaxis (line 996) | def moveaxis(x, source, destination): function nanargmax (line 1000) | def nanargmax(x, axis=None, keepdims=False): function nanargmin (line 1015) | def nanargmin(x, axis=None, keepdims=False): function nancumsum (line 1030) | def nancumsum(x, axis=None, dtype=None): function nancumprod (line 1038) | def nancumprod(x, axis=None, dtype=None): function nanmax (line 1046) | def nanmax(x, axis=None, keepdims=False): function nanmean (line 1050) | def nanmean(x, axis=None, keepdims=False): function nanmin (line 1055) | def nanmin(x, axis=None, keepdims=False): function nanprod (line 1059) | def nanprod(x, axis=None, keepdims=False): function nanstd (line 1072) | def nanstd(x, axis=None, keepdims=False): function nansum (line 1082) | def nansum(x, axis=None, keepdims=False): function nanvar (line 1093) | def nanvar(x, axis=None, keepdims=False): function nan_to_num (line 1103) | def nan_to_num(x, nan=0.0, posinf=None, neginf=None): function ndim (line 1107) | def ndim(x): function nonzero (line 1111) | def nonzero(x): function not_equal (line 1115) | def not_equal(x1, x2): function zeros_like (line 1119) | def zeros_like(x, dtype=None): function ones_like (line 1123) | def ones_like(x, dtype=None): function outer (line 1127) | def outer(x1, x2): function pad (line 1136) | def pad(x, pad_width, mode="constant", constant_values=None): function prod (line 1149) | def prod(x, axis=None, keepdims=False, dtype=None): function ptp (line 1161) | def ptp(x, axis=None, keepdims=False): function quantile (line 1165) | def quantile(x, q, axis=None, method="linear", keepdims=False): function ravel (line 1182) | def ravel(x): function unravel_index (line 1186) | def unravel_index(indices, shape): function real (line 1193) | def real(x): function reciprocal (line 1197) | def reciprocal(x): function repeat (line 1201) | def repeat(x, repeats, axis=None): function reshape (line 1205) | def reshape(x, newshape): function roll (line 1209) | def roll(x, shift, axis=None): function searchsorted (line 1213) | def searchsorted(sorted_sequence, values, side="left"): function sign (line 1229) | def sign(x): function signbit (line 1233) | def signbit(x): function sin (line 1237) | def sin(x): function sinc (line 1247) | def sinc(x): function sinh (line 1257) | def sinh(x): function size (line 1267) | def size(x): function sort (line 1271) | def sort(x, axis=-1): function split (line 1276) | def split(x, indices_or_sections, axis=0): function array_split (line 1281) | def array_split(x, indices_or_sections, axis=0): function stack (line 1286) | def stack(x, axis=0): function std (line 1295) | def std(x, axis=None, keepdims=False): function swapaxes (line 1304) | def swapaxes(x, axis1, axis2): function take (line 1308) | def take(x, indices, axis=None): function take_along_axis (line 1313) | def take_along_axis(x, indices, axis=None): function tan (line 1318) | def tan(x): function tanh (line 1328) | def tanh(x): function tensordot (line 1338) | def tensordot(x1, x2, axes=2): function round (line 1348) | def round(x, decimals=0): function tile (line 1352) | def tile(x, repeats): function trace (line 1356) | def trace(x, offset=0, axis1=0, axis2=1): function tri (line 1368) | def tri(N, M=None, k=0, dtype=None): function tril (line 1373) | def tril(x, k=0): function triu (line 1377) | def triu(x, k=0): function trunc (line 1381) | def trunc(x): function vdot (line 1389) | def vdot(x1, x2): function inner (line 1398) | def inner(x1, x2): function vstack (line 1407) | def vstack(xs): function vsplit (line 1417) | def vsplit(x, indices_or_sections): function vectorize (line 1422) | def vectorize(pyfunc, *, excluded=None, signature=None): function where (line 1426) | def where(condition, x1=None, x2=None): function divide (line 1443) | def divide(x1, x2): function divide_no_nan (line 1458) | def divide_no_nan(x1, x2): function true_divide (line 1475) | def true_divide(x1, x2): function power (line 1479) | def power(x1, x2): function negative (line 1493) | def negative(x): function nextafter (line 1497) | def nextafter(x1, x2): function square (line 1505) | def square(x): function sqrt (line 1512) | def sqrt(x): function squeeze (line 1523) | def squeeze(x, axis=None): function transpose (line 1528) | def transpose(x, axes=None): function trapezoid (line 1533) | def trapezoid(y, x=None, dx=1.0, axis=-1): function vander (line 1542) | def vander(x, N=None, increasing=False): function var (line 1550) | def var(x, axis=None, keepdims=False): function sum (line 1560) | def sum(x, axis=None, keepdims=False): function eye (line 1571) | def eye(N, M=None, k=0, dtype=None): function floor_divide (line 1576) | def floor_divide(x1, x2): function logical_xor (line 1589) | def logical_xor(x1, x2): function corrcoef (line 1593) | def corrcoef(x): function correlate (line 1606) | def correlate(x1, x2, mode="valid"): function select (line 1621) | def select(condlist, choicelist, default=0): function slogdet (line 1625) | def slogdet(x): function argpartition (line 1629) | def argpartition(x, kth, axis=-1): function histogram (line 1633) | def histogram(x, bins=10, range=None): FILE: keras/src/backend/numpy/random.py function normal (line 10) | def normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function uniform (line 17) | def uniform(shape, minval=0.0, maxval=1.0, dtype=None, seed=None): function categorical (line 24) | def categorical(logits, num_samples, dtype="int64", seed=None): function randint (line 36) | def randint(shape, minval, maxval, dtype="int32", seed=None): function truncated_normal (line 43) | def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function dropout (line 69) | def dropout(inputs, rate, noise_shape=None, seed=None): function shuffle (line 97) | def shuffle(x, axis=0, seed=None): function gamma (line 103) | def gamma(shape, alpha, dtype=None, seed=None): function binomial (line 110) | def binomial(shape, counts, probabilities, dtype=None, seed=None): function beta (line 118) | def beta(shape, alpha, beta, dtype=None, seed=None): FILE: keras/src/backend/numpy/rnn.py function rnn (line 6) | def rnn( function lstm (line 203) | def lstm(*args, **kwargs): function gru (line 207) | def gru(*args, **kwargs): function unstack (line 211) | def unstack(x, axis=0): function numpy_scan (line 215) | def numpy_scan(f, init, xs, reverse=False, mask=None): function cudnn_ok (line 242) | def cudnn_ok(*args, **kwargs): FILE: keras/src/backend/numpy/trainer.py class NumpyTrainer (line 16) | class NumpyTrainer(base_trainer.Trainer): method __init__ (line 17) | def __init__(self): method test_step (line 22) | def test_step(self, data): method predict_step (line 40) | def predict_step(self, data): method make_test_function (line 48) | def make_test_function(self, force=False): method make_predict_function (line 68) | def make_predict_function(self, force=False): method _symbolic_build (line 95) | def _symbolic_build(self, data_batch): method fit (line 151) | def fit( method predict (line 173) | def predict( method evaluate (line 226) | def evaluate( method train_on_batch (line 293) | def train_on_batch( method test_on_batch (line 305) | def test_on_batch( method predict_on_batch (line 326) | def predict_on_batch(self, x): FILE: keras/src/backend/openvino/core.py function align_operand_types (line 78) | def align_operand_types(x1, x2, op_name): function get_ov_output (line 99) | def get_ov_output(x, ov_type=None): class OpenVINOKerasTensor (line 142) | class OpenVINOKerasTensor: method __init__ (line 143) | def __init__(self, x, data=None): method __add__ (line 165) | def __add__(self, other): method __radd__ (line 173) | def __radd__(self, other): method __sub__ (line 181) | def __sub__(self, other): method __rsub__ (line 193) | def __rsub__(self, other): method __mul__ (line 201) | def __mul__(self, other): method __rmul__ (line 213) | def __rmul__(self, other): method __truediv__ (line 225) | def __truediv__(self, other): method __rtruediv__ (line 233) | def __rtruediv__(self, other): method __floordiv__ (line 241) | def __floordiv__(self, other): method __rfloordiv__ (line 249) | def __rfloordiv__(self, other): method __neg__ (line 257) | def __neg__(self): method __abs__ (line 261) | def __abs__(self): method __invert__ (line 265) | def __invert__(self): method __pow__ (line 269) | def __pow__(self, other): method __rpow__ (line 277) | def __rpow__(self, other): method __lt__ (line 285) | def __lt__(self, other): method __gt__ (line 293) | def __gt__(self, other): method __le__ (line 301) | def __le__(self, other): method __ge__ (line 309) | def __ge__(self, other): method __eq__ (line 319) | def __eq__(self, other): method __ne__ (line 327) | def __ne__(self, other): method __getitem__ (line 335) | def __getitem__(self, indices): method __len__ (line 494) | def __len__(self): method __iter__ (line 509) | def __iter__(self): method __bool__ (line 515) | def __bool__(self): method __mod__ (line 518) | def __mod__(self, other): method __array__ (line 526) | def __array__(self, dtype=None): method numpy (line 538) | def numpy(self): method __rmod__ (line 541) | def __rmod__(self, other): method __matmul__ (line 549) | def __matmul__(self, other): method __rmatmul__ (line 559) | def __rmatmul__(self, other): method __div__ (line 569) | def __div__(self, other): method __rdiv__ (line 572) | def __rdiv__(self, other): method __and__ (line 575) | def __and__(self, other): method __rand__ (line 583) | def __rand__(self, other): method __or__ (line 591) | def __or__(self, other): method __ror__ (line 599) | def __ror__(self, other): method __xor__ (line 607) | def __xor__(self, other): method __rxor__ (line 615) | def __rxor__(self, other): method __int__ (line 623) | def __int__(self): method __float__ (line 632) | def __float__(self): method __repr__ (line 641) | def __repr__(self): method __round__ (line 644) | def __round__(self, ndigits=None): method reshape (line 656) | def reshape(self, new_shape): method squeeze (line 663) | def squeeze(self, axis=None): function ov_to_keras_type (line 674) | def ov_to_keras_type(ov_type): function device_scope (line 684) | def device_scope(device_name): function get_device (line 688) | def get_device(): class Variable (line 692) | class Variable(KerasVariable): method _initialize (line 693) | def _initialize(self, value): method _direct_assign (line 707) | def _direct_assign(self, value): method _convert_to_tensor (line 710) | def _convert_to_tensor(self, value, dtype=None): method __array__ (line 713) | def __array__(self): method __getitem__ (line 716) | def __getitem__(self, idx): method __int__ (line 720) | def __int__(self): method __float__ (line 729) | def __float__(self): function _is_scalar (line 739) | def _is_scalar(elem): function convert_to_tensor (line 743) | def convert_to_tensor(x, dtype=None, sparse=None, ragged=None): function convert_to_numpy (line 799) | def convert_to_numpy(x): function is_tensor (line 843) | def is_tensor(x): function shape (line 851) | def shape(x): function cast (line 855) | def cast(x, dtype): function cond (line 862) | def cond(pred, true_fn, false_fn): function vectorized_map (line 891) | def vectorized_map(function, elements): function compute_output_spec (line 896) | def compute_output_spec(fn, *args, **kwargs): function map (line 933) | def map(f, xs): function scan (line 941) | def scan(f, init, xs=None, length=None, reverse=False, unroll=1): function associative_scan (line 1009) | def associative_scan(f, elems, reverse=False, axis=0): function scatter (line 1150) | def scatter(indices, values, shape): function scatter_update (line 1162) | def scatter_update(inputs, indices, updates, reduction=None): function slice (line 1188) | def slice(inputs, start_indices, shape): function slice_update (line 1254) | def slice_update(inputs, start_indices, updates): function switch (line 1419) | def switch(index, branches, *operands): function while_loop (line 1498) | def while_loop( function fori_loop (line 1612) | def fori_loop(lower, upper, body_fun, init_val): function stop_gradient (line 1620) | def stop_gradient(variable): function unstack (line 1624) | def unstack(x, num=None, axis=0): function random_seed_dtype (line 1640) | def random_seed_dtype(): function custom_gradient (line 1648) | def custom_gradient(fun): function remat (line 1670) | def remat(f): FILE: keras/src/backend/openvino/export.py class OpenvinoExportArchive (line 1) | class OpenvinoExportArchive: method track (line 2) | def track(self, resource): method add_endpoint (line 7) | def add_endpoint(self, name, fn, input_signature=None, **kwargs): FILE: keras/src/backend/openvino/image.py function rgb_to_grayscale (line 8) | def rgb_to_grayscale(images, data_format=None): function rgb_to_hsv (line 48) | def rgb_to_hsv(images, data_format=None): function hsv_to_rgb (line 142) | def hsv_to_rgb(images, data_format=None): function resize (line 211) | def resize( function affine_transform (line 225) | def affine_transform( function perspective_transform (line 238) | def perspective_transform( function map_coordinates (line 251) | def map_coordinates( function gaussian_blur (line 259) | def gaussian_blur( function elastic_transform (line 267) | def elastic_transform( function scale_and_translate (line 282) | def scale_and_translate( FILE: keras/src/backend/openvino/layer.py class OpenvinoLayer (line 1) | class OpenvinoLayer: FILE: keras/src/backend/openvino/linalg.py function cholesky (line 15) | def cholesky(a, upper=False): function cholesky_inverse (line 21) | def cholesky_inverse(a, upper=False): function det (line 38) | def det(a): function eig (line 155) | def eig(a): function eigh (line 159) | def eigh(a): function inv (line 429) | def inv(a): function lu_factor (line 436) | def lu_factor(a): function norm (line 442) | def norm(x, ord=None, axis=None, keepdims=False): function qr (line 614) | def qr(x, mode="reduced"): function solve (line 618) | def solve(a, b): function solve_triangular (line 635) | def solve_triangular(a, b, lower=False): function svd (line 641) | def svd(x, full_matrices=True, compute_uv=True): function lstsq (line 645) | def lstsq(a, b, rcond=None): function jvp (line 649) | def jvp(fun, primals, tangents, has_aux=False): FILE: keras/src/backend/openvino/math.py function _segment_reduction_fn (line 15) | def _segment_reduction_fn( function segment_sum (line 103) | def segment_sum(data, segment_ids, num_segments=None, sorted=False): function segment_max (line 107) | def segment_max(data, segment_ids, num_segments=None, sorted=False): function top_k (line 111) | def top_k(x, k, sorted=True): function in_top_k (line 122) | def in_top_k(targets, predictions, k): function logsumexp (line 147) | def logsumexp(x, axis=None, keepdims=False): function qr (line 172) | def qr(x, mode="reduced"): function extract_sequences (line 176) | def extract_sequences(x, sequence_length, sequence_stride): function _dft (line 241) | def _dft(x, axes_offsets, inverse=False): function fft (line 284) | def fft(x): function fft2 (line 289) | def fft2(x): function ifft2 (line 294) | def ifft2(x): function rfft (line 299) | def rfft(x, fft_length=None): function irfft (line 339) | def irfft(x, fft_length=None): function stft (line 360) | def stft( function _overlap_sequences_ov (line 462) | def _overlap_sequences_ov(x, sequence_stride, fft_length): function istft (line 616) | def istft( function rsqrt (line 764) | def rsqrt(x): function erf (line 771) | def erf(x): function erfinv (line 777) | def erfinv(x): FILE: keras/src/backend/openvino/nn.py function relu (line 15) | def relu(x): function relu6 (line 20) | def relu6(x): function celu (line 25) | def celu(x, alpha=1.0): function sigmoid (line 42) | def sigmoid(x): function tanh (line 47) | def tanh(x): function tanh_shrink (line 52) | def tanh_shrink(x): function hard_tanh (line 57) | def hard_tanh(x): function soft_shrink (line 62) | def soft_shrink(x, threshold=0.5): function hard_shrink (line 75) | def hard_shrink(x, threshold=0.5): function softplus (line 85) | def softplus(x): function softsign (line 90) | def softsign(x): function silu (line 95) | def silu(x): function log_sigmoid (line 101) | def log_sigmoid(x): function leaky_relu (line 109) | def leaky_relu(x, negative_slope=0.2): function sparse_sigmoid (line 118) | def sparse_sigmoid(x): function hard_sigmoid (line 129) | def hard_sigmoid(x): function hard_silu (line 136) | def hard_silu(x): function elu (line 144) | def elu(x, alpha=1.0): function selu (line 149) | def selu(x): function gelu (line 158) | def gelu(x, approximate=True): function softmax (line 166) | def softmax(x, axis=-1): function log_softmax (line 187) | def log_softmax(x, axis=-1): function squareplus (line 214) | def squareplus(x, b=4): function sparse_plus (line 227) | def sparse_plus(x): function threshold (line 246) | def threshold(x, threshold, default_value): function max_pool (line 256) | def max_pool( function average_pool (line 278) | def average_pool( function _compute_adaptive_gather_indices (line 296) | def _compute_adaptive_gather_indices( function _adaptive_pool_ov (line 319) | def _adaptive_pool_ov( function adaptive_average_pool (line 418) | def adaptive_average_pool(inputs, output_size, data_format=None): function adaptive_max_pool (line 430) | def adaptive_max_pool(inputs, output_size, data_format=None): function _pool (line 442) | def _pool( function _adjust_strides_dilation (line 477) | def _adjust_strides_dilation( function _adjust_padding (line 489) | def _adjust_padding( function _adjust_input (line 507) | def _adjust_input(inputs, num_spatial_dims, data_format): function _adjust_kernel (line 520) | def _adjust_kernel(kernel, num_spatial_dims): function _adjust_depthwise_kernel (line 531) | def _adjust_depthwise_kernel(kernel, num_spatial_dims): function _adjust_outputs (line 546) | def _adjust_outputs(outputs, num_spatial_dims, data_format): function conv (line 560) | def conv( function depthwise_conv (line 641) | def depthwise_conv( function separable_conv (line 679) | def separable_conv( function conv_transpose (line 707) | def conv_transpose( function one_hot (line 782) | def one_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function multi_hot (line 801) | def multi_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function categorical_crossentropy (line 812) | def categorical_crossentropy(target, output, from_logits=False, axis=-1): function sparse_categorical_crossentropy (line 844) | def sparse_categorical_crossentropy(target, output, from_logits=False, a... function binary_crossentropy (line 894) | def binary_crossentropy(target, output, from_logits=False): function moments (line 938) | def moments(x, axes, keepdims=False, synchronized=False): function batch_normalization (line 964) | def batch_normalization( function ctc_loss (line 1007) | def ctc_loss(target, output, target_length, output_length, mask_index=0): function ctc_decode (line 1019) | def ctc_decode( function psnr (line 1033) | def psnr(x1, x2, max_val): function dot_product_attention (line 1057) | def dot_product_attention( function unfold (line 1110) | def unfold(input, kernel_size, dilation=1, padding=0, stride=1): function fold (line 1142) | def fold(x, output_size, kernel_size, dilation=1, padding=0, stride=1): function depth_to_space (line 1213) | def depth_to_space(x, block_size, data_format="channels_last"): function space_to_depth (line 1249) | def space_to_depth(x, block_size, data_format="channels_last"): FILE: keras/src/backend/openvino/numpy.py function _promote_binary_op_types (line 23) | def _promote_binary_op_types(x1, x2): function add (line 40) | def add(x1, x2): function einsum (line 48) | def einsum(subscripts, *operands, **kwargs): function subtract (line 80) | def subtract(x1, x2): function matmul (line 88) | def matmul(x1, x2): function multiply (line 110) | def multiply(x1, x2): function mean (line 118) | def mean(x, axis=None, keepdims=False): function max (line 146) | def max(x, axis=None, keepdims=False, initial=None): function _compute_extrema (line 150) | def _compute_extrema(x, operation, axis=None, keepdims=False, initial=No... function ones (line 196) | def ones(shape, dtype=None): function zeros (line 209) | def zeros(shape, dtype=None): function absolute (line 222) | def absolute(x): function abs (line 230) | def abs(x): function all (line 235) | def all(x, axis=None, keepdims=False): function allclose (line 246) | def allclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False): function angle (line 268) | def angle(x): function any (line 286) | def any(x, axis=None, keepdims=False): function amax (line 297) | def amax(x, axis=None, keepdims=False): function amin (line 310) | def amin(x, axis=None, keepdims=False): function _resolve_axis (line 323) | def _resolve_axis(x, axis): function _upcast_type_if_needed (line 336) | def _upcast_type_if_needed(x): function append (line 347) | def append(x1, x2, axis=None): function arange (line 358) | def arange(start, stop=None, step=None, dtype=None): function arccos (line 388) | def arccos(x): function arccosh (line 397) | def arccosh(x): function arcsin (line 406) | def arcsin(x): function arcsinh (line 415) | def arcsinh(x): function arctan (line 424) | def arctan(x): function arctan2 (line 433) | def arctan2(x1, x2): function arctanh (line 483) | def arctanh(x): function argmax (line 492) | def argmax(x, axis=None, keepdims=False): function argmin (line 524) | def argmin(x, axis=None, keepdims=False): function argsort (line 556) | def argsort(x, axis=-1): function array (line 589) | def array(x, dtype=None): function view (line 593) | def view(x, dtype=None): function average (line 597) | def average(x, axis=None, weights=None): function bartlett (line 629) | def bartlett(x): function hamming (line 654) | def hamming(x): function hanning (line 686) | def hanning(x): function heaviside (line 729) | def heaviside(x1, x2): function _i0_node (line 767) | def _i0_node(x): function kaiser (line 813) | def kaiser(x, beta): function bitwise_left_shift (line 853) | def bitwise_left_shift(x, y): function left_shift (line 865) | def left_shift(x, y): function bitwise_right_shift (line 869) | def bitwise_right_shift(x, y): function right_shift (line 881) | def right_shift(x, y): function bincount (line 885) | def bincount(x, weights=None, minlength=0, sparse=False): function _bitwise_op_i8u8 (line 930) | def _bitwise_op_i8u8(ov_op, x, y): function bitwise_and (line 949) | def bitwise_and(x, y): function bitwise_xor (line 956) | def bitwise_xor(x, y): function bitwise_invert (line 963) | def bitwise_invert(x): function bitwise_not (line 968) | def bitwise_not(x): function bitwise_or (line 972) | def bitwise_or(x, y): function blackman (line 979) | def blackman(x): function broadcast_to (line 1006) | def broadcast_to(x, shape): function cbrt (line 1017) | def cbrt(x): function ceil (line 1030) | def ceil(x): function clip (line 1039) | def clip(x, x_min, x_max): function concatenate (line 1051) | def concatenate(xs, axis=0): function conjugate (line 1073) | def conjugate(x): function conj (line 1079) | def conj(x): function copy (line 1083) | def copy(x): function cos (line 1087) | def cos(x): function cosh (line 1096) | def cosh(x): function count_nonzero (line 1105) | def count_nonzero(x, axis=None): function cross (line 1117) | def cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None): function cumprod (line 1192) | def cumprod(x, axis=None, dtype=None): function cumsum (line 1280) | def cumsum(x, axis=None, dtype=None): function deg2rad (line 1291) | def deg2rad(x): function diag (line 1312) | def diag(x, k=0): function diagflat (line 1379) | def diagflat(x, k=0): function diagonal (line 1441) | def diagonal(x, offset=0, axis1=0, axis2=1): function diff (line 1491) | def diff(a, n=1, axis=-1): function digitize (line 1564) | def digitize(x, bins): function dot (line 1591) | def dot(x1, x2): function dstack (line 1605) | def dstack(xs): function empty (line 1647) | def empty(shape, dtype=None): function empty_like (line 1660) | def empty_like(x, dtype=None): function equal (line 1664) | def equal(x1, x2): function exp (line 1676) | def exp(x): function exp2 (line 1685) | def exp2(x): function expand_dims (line 1696) | def expand_dims(x, axis): function expm1 (line 1704) | def expm1(x): function flip (line 1716) | def flip(x, axis=None): function rot90 (line 1752) | def rot90(array, k=1, axes=(0, 1)): function floor (line 1807) | def floor(x): function full (line 1815) | def full(shape, fill_value, dtype=None): function full_like (line 1827) | def full_like(x, fill_value, dtype=None): function gcd (line 1839) | def gcd(x1, x2): function geomspace (line 1897) | def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): function greater (line 1941) | def greater(x1, x2): function greater_equal (line 1953) | def greater_equal(x1, x2): function hstack (line 1965) | def hstack(xs): function hsplit (line 1980) | def hsplit(x, indices_or_sections): function hypot (line 1987) | def hypot(x1, x2): function identity (line 2018) | def identity(n, dtype=None): function imag (line 2032) | def imag(x): function inner (line 2038) | def inner(x1, x2): function isclose (line 2060) | def isclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function isfinite (line 2079) | def isfinite(x): function isin (line 2092) | def isin(x1, x2, assume_unique=False, invert=False): function isinf (line 2114) | def isinf(x): function isnan (line 2121) | def isnan(x): function isneginf (line 2129) | def isneginf(x): function isposinf (line 2133) | def isposinf(x): function _is_inf (line 2137) | def _is_inf(x, pos=True): function isreal (line 2171) | def isreal(x): function kron (line 2177) | def kron(x1, x2): function lcm (line 2240) | def lcm(x1, x2): function ldexp (line 2264) | def ldexp(x1, x2): function less (line 2286) | def less(x1, x2): function less_equal (line 2298) | def less_equal(x1, x2): function linspace (line 2310) | def linspace( function log (line 2440) | def log(x): function log10 (line 2449) | def log10(x): function log1p (line 2462) | def log1p(x): function log2 (line 2476) | def log2(x): function logaddexp (line 2489) | def logaddexp(x1, x2): function logaddexp2 (line 2539) | def logaddexp2(x1, x2): function logical_and (line 2578) | def logical_and(x1, x2): function logical_not (line 2586) | def logical_not(x): function logical_or (line 2592) | def logical_or(x1, x2): function logspace (line 2600) | def logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, ax... function maximum (line 2626) | def maximum(x1, x2): function median (line 2632) | def median(x, axis=None, keepdims=False): function meshgrid (line 2767) | def meshgrid(*x, indexing="xy"): function min (line 2811) | def min(x, axis=None, keepdims=False, initial=None): function minimum (line 2815) | def minimum(x1, x2): function mod (line 2821) | def mod(x1, x2): function fmod (line 2828) | def fmod(x1, x2): function moveaxis (line 2835) | def moveaxis(x, source, destination): function nanargmax (line 2855) | def nanargmax(x, axis=None, keepdims=False): function nanargmin (line 2899) | def nanargmin(x, axis=None, keepdims=False): function nancumsum (line 2943) | def nancumsum(x, axis=None, dtype=None): function nancumprod (line 2947) | def nancumprod(x, axis=None, dtype=None): function nanmax (line 2951) | def nanmax(x, axis=None, keepdims=False): function nanmean (line 2986) | def nanmean(x, axis=None, keepdims=False): function nanmin (line 3017) | def nanmin(x, axis=None, keepdims=False): function nanprod (line 3052) | def nanprod(x, axis=None, keepdims=False): function nanstd (line 3077) | def nanstd(x, axis=None, keepdims=False): function nansum (line 3081) | def nansum(x, axis=None, keepdims=False): function nanvar (line 3100) | def nanvar(x, axis=None, keepdims=False): function nan_to_num (line 3161) | def nan_to_num(x, nan=0.0, posinf=None, neginf=None): function ndim (line 3194) | def ndim(x): function nonzero (line 3201) | def nonzero(x): function not_equal (line 3207) | def not_equal(x1, x2): function zeros_like (line 3219) | def zeros_like(x, dtype=None): function ones_like (line 3231) | def ones_like(x, dtype=None): function outer (line 3243) | def outer(x1, x2): function pad (line 3261) | def pad(x, pad_width, mode="constant", constant_values=None): function prod (line 3294) | def prod(x, axis=None, keepdims=False, dtype=None): function ptp (line 3313) | def ptp(x, axis=None, keepdims=False): function quantile (line 3326) | def quantile(x, q, axis=None, method="linear", keepdims=False): function ravel (line 3477) | def ravel(x): function real (line 3485) | def real(x): function reciprocal (line 3491) | def reciprocal(x): function repeat (line 3498) | def repeat(x, repeats, axis=None): function reshape (line 3557) | def reshape(x, newshape): function roll (line 3572) | def roll(x, shift, axis=None): function searchsorted (line 3586) | def searchsorted(sorted_sequence, values, side="left"): function sign (line 3620) | def sign(x): function signbit (line 3625) | def signbit(x): function sin (line 3640) | def sin(x): function sinc (line 3649) | def sinc(x): function sinh (line 3667) | def sinh(x): function size (line 3676) | def size(x): function sort (line 3687) | def sort(x, axis=-1): function split (line 3727) | def split(x, indices_or_sections, axis=0): function array_split (line 3778) | def array_split(x, indices_or_sections, axis=0): function stack (line 3809) | def stack(x, axis=0): function std (line 3827) | def std(x, axis=None, keepdims=False): function swapaxes (line 3833) | def swapaxes(x, axis1, axis2): function take (line 3850) | def take(x, indices, axis=None): function take_along_axis (line 3862) | def take_along_axis(x, indices, axis=None): function tan (line 3933) | def tan(x): function tanh (line 3942) | def tanh(x): function tensordot (line 3951) | def tensordot(x1, x2, axes=2): function round (line 4030) | def round(x, decimals=0): function trunc (line 4050) | def trunc(x): function tile (line 4062) | def tile(x, repeats): function trace (line 4096) | def trace(x, offset=0, axis1=0, axis2=1): function tri (line 4101) | def tri(N, M=None, k=0, dtype=None): function tril (line 4151) | def tril(x, k=0): function triu (line 4169) | def triu(x, k=0): function vdot (line 4192) | def vdot(x1, x2): function vstack (line 4209) | def vstack(xs): function vsplit (line 4223) | def vsplit(x, indices_or_sections): function vectorize (line 4227) | def vectorize(pyfunc, *, excluded=None, signature=None): function where (line 4235) | def where(condition, x1=None, x2=None): function divide (line 4264) | def divide(x1, x2): function divide_no_nan (line 4281) | def divide_no_nan(x1, x2): function true_divide (line 4298) | def true_divide(x1, x2): function power (line 4302) | def power(x1, x2): function negative (line 4320) | def negative(x): function nextafter (line 4325) | def nextafter(x1, x2): function square (line 4384) | def square(x): function sqrt (line 4393) | def sqrt(x): function squeeze (line 4402) | def squeeze(x, axis=None): function transpose (line 4415) | def transpose(x, axes=None): function _helper_trapezoid (line 4435) | def _helper_trapezoid(y, axis): function trapezoid (line 4467) | def trapezoid(y, x=None, dx=1.0, axis=-1): function unravel_index (line 4500) | def unravel_index(indices, shape): function vander (line 4535) | def vander(x, N=None, increasing=False): function var (line 4577) | def var(x, axis=None, keepdims=False): function sum (line 4608) | def sum(x, axis=None, keepdims=False): function eye (line 4618) | def eye(N, M=None, k=0, dtype=None): function floor_divide (line 4633) | def floor_divide(x1, x2): function logical_xor (line 4652) | def logical_xor(x1, x2): function corrcoef (line 4660) | def corrcoef(x): function correlate (line 4687) | def correlate(x1, x2, mode="valid"): function select (line 4744) | def select(condlist, choicelist, default=0): function slogdet (line 4761) | def slogdet(x): function argpartition (line 4957) | def argpartition(x, kth, axis=-1): function histogram (line 5023) | def histogram(x, bins=10, range=None): FILE: keras/src/backend/openvino/random.py function _rng_from_seed_data (line 16) | def _rng_from_seed_data(seed_data): function _random_uniform (line 29) | def _random_uniform(shape, minval, maxval, dtype, seed1, seed2): function normal (line 55) | def normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function uniform (line 63) | def uniform(shape, minval=0.0, maxval=1.0, dtype=None, seed=None): function categorical (line 75) | def categorical(logits, num_samples, dtype="int64", seed=None): function randint (line 133) | def randint(shape, minval, maxval, dtype="int32", seed=None): function truncated_normal (line 167) | def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function dropout (line 194) | def dropout(inputs, rate, noise_shape=None, seed=None): function shuffle (line 266) | def shuffle(x, axis=0, seed=None): function _const (line 295) | def _const(val, dtype): function _random_normal (line 303) | def _random_normal(shape, dtype, seed1, seed2): function gamma (line 320) | def gamma(shape, alpha, dtype=None, seed=None): function binomial (line 396) | def binomial(shape, counts, probabilities, dtype=None, seed=None): function beta (line 445) | def beta(shape, alpha, beta, dtype=None, seed=None): FILE: keras/src/backend/openvino/rnn.py function rnn (line 10) | def rnn( function _reorder_gates (line 296) | def _reorder_gates(x_ov, from_order, to_order, axis): function _seq_lengths (line 311) | def _seq_lengths(inputs_ov): function lstm (line 327) | def lstm( function gru (line 432) | def gru( function cudnn_ok (line 558) | def cudnn_ok(*args, **kwargs): FILE: keras/src/backend/openvino/trainer.py class OpenVINOTrainer (line 18) | class OpenVINOTrainer(base_trainer.Trainer): method __init__ (line 19) | def __init__(self): method _unpack_singleton (line 28) | def _unpack_singleton(self, x): method test_step (line 33) | def test_step(self, data): method predict_step (line 50) | def predict_step(self, data): method make_test_function (line 61) | def make_test_function(self, force=False): method _parameterize_data (line 81) | def _parameterize_data(self, data): method _get_data_shapes (line 107) | def _get_data_shapes(self, data): method _get_compiled_model (line 116) | def _get_compiled_model(self, data): method make_predict_function (line 147) | def make_predict_function(self, force=False): method fit (line 174) | def fit( method predict (line 198) | def predict( method evaluate (line 252) | def evaluate( method train_on_batch (line 309) | def train_on_batch( method test_on_batch (line 321) | def test_on_batch( method predict_on_batch (line 337) | def predict_on_batch(self, x): FILE: keras/src/backend/tensorflow/core.py class Variable (line 27) | class Variable( method handle (line 35) | def handle(self): method _initialize (line 38) | def _initialize(self, value): method _initialize_with_initializer (line 51) | def _initialize_with_initializer(self, initializer): method _deferred_initialize (line 54) | def _deferred_initialize(self): method _direct_assign (line 69) | def _direct_assign(self, value): method _convert_to_tensor (line 72) | def _convert_to_tensor(self, value, dtype=None): method numpy (line 75) | def numpy(self): # noqa: F811 method shape (line 79) | def shape(self): method __tf_tensor__ (line 83) | def __tf_tensor__(self, dtype=None, name=None): method _shared_name (line 88) | def _shared_name(self): method _serialize_to_tensors (line 91) | def _serialize_to_tensors(self): method _restore_from_tensors (line 97) | def _restore_from_tensors(self, restored_tensors): method _copy_trackable_to_cpu (line 104) | def _copy_trackable_to_cpu(self, object_map): method _export_to_saved_model_graph (line 108) | def _export_to_saved_model_graph( method _write_object_proto (line 117) | def _write_object_proto(self, proto, options): method _map_aggregation (line 120) | def _map_aggregation(self, aggregation): method _map_synchronization (line 129) | def _map_synchronization(self, synchronization): function convert_to_tensor (line 139) | def convert_to_tensor(x, dtype=None, sparse=None, ragged=None): function convert_to_numpy (line 164) | def convert_to_numpy(x): function is_tensor (line 174) | def is_tensor(x): function shape (line 178) | def shape(x): function cast (line 209) | def cast(x, dtype): function compute_output_spec (line 220) | def compute_output_spec(fn, *args, **kwargs): function cond (line 253) | def cond(pred, true_fn, false_fn): function vectorized_map (line 261) | def vectorized_map(function, elements): function map (line 265) | def map(f, xs): function scan (line 281) | def scan(f, init, xs=None, length=None, reverse=False, unroll=1): function associative_scan (line 402) | def associative_scan(f, elems, reverse=False, axis=0): function scatter (line 580) | def scatter(indices, values, shape): function scatter_update (line 584) | def scatter_update(inputs, indices, updates, reduction=None): function slice (line 616) | def slice(inputs, start_indices, shape): function slice_update (line 620) | def slice_update(inputs, start_indices, updates): function switch (line 624) | def switch(index, branches, *operands): function while_loop (line 637) | def while_loop( function fori_loop (line 659) | def fori_loop(lower, upper, body_fun, init_val): function stop_gradient (line 667) | def stop_gradient(variable): function unstack (line 671) | def unstack(x, num=None, axis=0): function random_seed_dtype (line 675) | def random_seed_dtype(): function custom_gradient (line 680) | def custom_gradient(fun): function remat (line 684) | def remat(f): class name_scope (line 696) | class name_scope(base_name_scope): method __init__ (line 697) | def __init__(self, name, **kwargs): method __enter__ (line 701) | def __enter__(self): method __exit__ (line 719) | def __exit__(self, *args, **kwargs): function device_scope (line 725) | def device_scope(device_name): FILE: keras/src/backend/tensorflow/distribute_test.py class DistributeTest (line 20) | class DistributeTest(testing.TestCase): method setUp (line 21) | def setUp(self): method test_variable_creation (line 34) | def test_variable_creation(self): method test_strategy_run (line 50) | def test_strategy_run(self): method test_epoch_iterator (line 89) | def test_epoch_iterator(self): method test_variable_aggregation (line 127) | def test_variable_aggregation(self): method test_variable_synchronization (line 140) | def test_variable_synchronization(self): method test_seed_generator (line 158) | def test_seed_generator(self): method test_correctness_with_fit_and_regularizer (line 166) | def test_correctness_with_fit_and_regularizer(self): FILE: keras/src/backend/tensorflow/distribution_lib.py function list_devices (line 13) | def list_devices(device_type=None): function distribute_value (line 48) | def distribute_value(value, tensor_layout): function _to_backend_mesh (line 53) | def _to_backend_mesh(device_mesh): function _to_backend_layout (line 68) | def _to_backend_layout(tensor_layout): FILE: keras/src/backend/tensorflow/export.py class TFExportArchive (line 6) | class TFExportArchive(SavedModelExportArchive): method _backend_track_layer (line 9) | def _backend_track_layer(self, layer): method _backend_add_endpoint (line 19) | def _backend_add_endpoint(self, name, fn, input_signature, **kwargs): FILE: keras/src/backend/tensorflow/image.py function rgb_to_grayscale (line 51) | def rgb_to_grayscale(images, data_format=None): function rgb_to_hsv (line 75) | def rgb_to_hsv(images, data_format=None): function hsv_to_rgb (line 104) | def hsv_to_rgb(images, data_format=None): function resize (line 133) | def resize( function affine_transform (line 335) | def affine_transform( function perspective_transform (line 395) | def perspective_transform( function compute_homography_matrix (line 473) | def compute_homography_matrix(start_points, end_points): function _mirror_index_fixer (line 615) | def _mirror_index_fixer(index, size): function _reflect_index_fixer (line 621) | def _reflect_index_fixer(index, size): function _nearest_indices_and_weights (line 627) | def _nearest_indices_and_weights(coordinate): function _linear_indices_and_weights (line 636) | def _linear_indices_and_weights(coordinate): function map_coordinates (line 644) | def map_coordinates( function gaussian_blur (line 742) | def gaussian_blur( function elastic_transform (line 798) | def elastic_transform( function _fill_triangle_kernel (line 947) | def _fill_triangle_kernel(x): function _fill_keys_cubic_kernel (line 951) | def _fill_keys_cubic_kernel(x): function _fill_lanczos_kernel (line 957) | def _fill_lanczos_kernel(radius, x): function _compute_weight_mat (line 973) | def _compute_weight_mat( function _scale_and_translate (line 1010) | def _scale_and_translate( function scale_and_translate (line 1042) | def scale_and_translate( FILE: keras/src/backend/tensorflow/layer.py class TFLayer (line 11) | class TFLayer(KerasAutoTrackable): method __init__ (line 12) | def __init__(self, *args, **kwargs): method _set_save_spec (line 18) | def _set_save_spec(self, inputs, args=None, kwargs=None): method _trackable_children (line 50) | def _trackable_children(self, save_type="checkpoint", **kwargs): method _convert_tracked_collections (line 73) | def _convert_tracked_collections(self, children): method _get_save_spec (line 86) | def _get_save_spec(self, dynamic_batch=True): method _default_save_signature (line 115) | def _default_save_signature(self): FILE: keras/src/backend/tensorflow/linalg.py function cholesky (line 10) | def cholesky(a, upper=False): function cholesky_inverse (line 19) | def cholesky_inverse(a, upper=False): function det (line 29) | def det(a): function eig (line 33) | def eig(a): function eigh (line 37) | def eigh(a): function inv (line 41) | def inv(a): function lu_factor (line 45) | def lu_factor(a): function norm (line 50) | def norm(x, ord=None, axis=None, keepdims=False): function qr (line 171) | def qr(x, mode="reduced"): function solve (line 183) | def solve(a, b): function solve_triangular (line 191) | def solve_triangular(a, b, lower=False): function svd (line 200) | def svd(x, full_matrices=True, compute_uv=True): function lstsq (line 209) | def lstsq(a, b, rcond=None): function jvp (line 249) | def jvp(fun, primals, tangents, has_aux=False): FILE: keras/src/backend/tensorflow/math.py function segment_sum (line 8) | def segment_sum(data, segment_ids, num_segments=None, sorted=False): function segment_max (line 24) | def segment_max(data, segment_ids, num_segments=None, sorted=False): function top_k (line 40) | def top_k(x, k, sorted=True): function in_top_k (line 44) | def in_top_k(targets, predictions, k): function logsumexp (line 48) | def logsumexp(x, axis=None, keepdims=False): function qr (line 52) | def qr(x, mode="reduced"): function extract_sequences (line 64) | def extract_sequences(x, sequence_length, sequence_stride): function _get_complex_tensor_from_tuple (line 74) | def _get_complex_tensor_from_tuple(x): function fft (line 102) | def fft(x): function fft2 (line 108) | def fft2(x): function ifft2 (line 114) | def ifft2(x): function rfft (line 123) | def rfft(x, fft_length=None): function irfft (line 130) | def irfft(x, fft_length=None): function stft (line 137) | def stft( function istft (line 202) | def istft( function rsqrt (line 262) | def rsqrt(x): function erf (line 266) | def erf(x): function erfinv (line 270) | def erfinv(x): function logdet (line 274) | def logdet(x): FILE: keras/src/backend/tensorflow/name_scope_test.py class TFNameScopeTest (line 7) | class TFNameScopeTest(TestCase): method test_stacking (line 8) | def test_stacking(self): method test_deduplicate (line 29) | def test_deduplicate(self): FILE: keras/src/backend/tensorflow/nn.py function relu (line 17) | def relu(x): function relu6 (line 21) | def relu6(x): function sigmoid (line 25) | def sigmoid(x): function sparse_sigmoid (line 32) | def sparse_sigmoid(x): function tanh (line 41) | def tanh(x): function tanh_shrink (line 45) | def tanh_shrink(x): function softplus (line 49) | def softplus(x): function softsign (line 53) | def softsign(x): function soft_shrink (line 57) | def soft_shrink(x, threshold=0.5): function sparse_plus (line 65) | def sparse_plus(x): function silu (line 73) | def silu(x): function squareplus (line 77) | def squareplus(x, b=4): function log_sigmoid (line 84) | def log_sigmoid(x): function leaky_relu (line 88) | def leaky_relu(x, negative_slope=0.2): function hard_sigmoid (line 92) | def hard_sigmoid(x): function hard_silu (line 97) | def hard_silu(x): function elu (line 101) | def elu(x, alpha=1.0): function selu (line 109) | def selu(x): function gelu (line 113) | def gelu(x, approximate=True): function celu (line 118) | def celu(x, alpha=1.0): function glu (line 124) | def glu(x, axis=-1): function hard_tanh (line 134) | def hard_tanh(x): function hard_shrink (line 138) | def hard_shrink(x, threshold=0.5): function threshold (line 142) | def threshold(x, threshold, default_value): function softmax (line 146) | def softmax(x, axis=-1): function log_softmax (line 160) | def log_softmax(x, axis=-1): function sparsemax (line 170) | def sparsemax(x, axis=-1): function _transpose_spatial_inputs (line 188) | def _transpose_spatial_inputs(inputs): function _transpose_spatial_outputs (line 206) | def _transpose_spatial_outputs(outputs): function max_pool (line 218) | def max_pool( function average_pool (line 246) | def average_pool( function _compute_static_gather_indices (line 274) | def _compute_static_gather_indices( function _adaptive_average_pool1d (line 310) | def _adaptive_average_pool1d(inputs, output_size, data_format="channels_... function _adaptive_max_pool1d (line 353) | def _adaptive_max_pool1d(inputs, output_size, data_format="channels_firs... function _adaptive_average_pool2d (line 396) | def _adaptive_average_pool2d(inputs, output_size, data_format="channels_... function _adaptive_max_pool2d (line 466) | def _adaptive_max_pool2d(inputs, output_size, data_format="channels_firs... function _adaptive_average_pool3d (line 537) | def _adaptive_average_pool3d(inputs, output_size, data_format="channels_... function _adaptive_max_pool3d (line 630) | def _adaptive_max_pool3d(inputs, output_size, data_format="channels_firs... function adaptive_average_pool (line 724) | def adaptive_average_pool(inputs, output_size, data_format=None): function adaptive_max_pool (line 739) | def adaptive_max_pool(inputs, output_size, data_format=None): function _convert_data_format (line 754) | def _convert_data_format(data_format, ndim): function conv (line 786) | def conv( function depthwise_conv (line 840) | def depthwise_conv( function separable_conv (line 902) | def separable_conv( function conv_transpose (line 965) | def conv_transpose( function one_hot (line 1005) | def one_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function multi_hot (line 1041) | def multi_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function _get_logits (line 1075) | def _get_logits(output, from_logits, op_type, fn_name): function categorical_crossentropy (line 1111) | def categorical_crossentropy(target, output, from_logits=False, axis=-1): function sparse_categorical_crossentropy (line 1194) | def sparse_categorical_crossentropy(target, output, from_logits=False, a... function binary_crossentropy (line 1257) | def binary_crossentropy(target, output, from_logits=False): function moments (line 1305) | def moments(x, axes, keepdims=False, synchronized=False): function _compute_moments_sync (line 1328) | def _compute_moments_sync(x, axes, keepdims): function _compute_moments (line 1360) | def _compute_moments(x, axes, keepdims): function batch_normalization (line 1364) | def batch_normalization( function ctc_loss (line 1387) | def ctc_loss(target, output, target_length, output_length, mask_index=0): function ctc_decode (line 1410) | def ctc_decode( function psnr (line 1475) | def psnr(x1, x2, max_val): function _get_large_negative (line 1490) | def _get_large_negative(dtype): function _apply_masks (line 1496) | def _apply_masks(logits, mask, is_causal): function _dot_product_attention_xla (line 1517) | def _dot_product_attention_xla(query, key, value, bias, mask, is_causal,... function dot_product_attention (line 1536) | def dot_product_attention( function unfold (line 1580) | def unfold(input, kernel_size, dilation=1, padding=0, stride=1): function fold (line 1627) | def fold(x, output_size, kernel_size, dilation=1, padding=0, stride=1): function depth_to_space (line 1706) | def depth_to_space(x, block_size, data_format="channels_last"): function space_to_depth (line 1734) | def space_to_depth(x, block_size, data_format="channels_last"): FILE: keras/src/backend/tensorflow/numpy.py function rot90 (line 26) | def rot90(array, k=1, axes=(0, 1)): function add (line 96) | def add(x1, x2): function bartlett (line 134) | def bartlett(x): function hamming (line 149) | def hamming(x): function hanning (line 154) | def hanning(x): function heaviside (line 159) | def heaviside(x1, x2): function kaiser (line 179) | def kaiser(x, beta): function bincount (line 184) | def bincount(x, weights=None, minlength=0, sparse=False): function _normalize_einsum_subscripts (line 235) | def _normalize_einsum_subscripts(subscripts): function einsum (line 249) | def einsum(subscripts, *operands, **kwargs): function subtract (line 478) | def subtract(x1, x2): function matmul (line 492) | def matmul(x1, x2): function multiply (line 631) | def multiply(x1, x2): function mean (line 645) | def mean(x, axis=None, keepdims=False): function max (line 722) | def max(x, axis=None, keepdims=False, initial=None): function ones (line 752) | def ones(shape, dtype=None): function zeros (line 757) | def zeros(shape, dtype=None): function absolute (line 763) | def absolute(x): function abs (line 772) | def abs(x): function all (line 776) | def all(x, axis=None, keepdims=False): function angle (line 781) | def angle(x): function any (line 791) | def any(x, axis=None, keepdims=False): function amax (line 796) | def amax(x, axis=None, keepdims=False): function amin (line 800) | def amin(x, axis=None, keepdims=False): function append (line 804) | def append(x1, x2, axis=None): function arange (line 816) | def arange(start, stop=None, step=None, dtype=None): function arccos (line 837) | def arccos(x): function arccosh (line 848) | def arccosh(x): function arcsin (line 859) | def arcsin(x): function arcsinh (line 870) | def arcsinh(x): function arctan (line 881) | def arctan(x): function arctan2 (line 891) | def arctan2(x1, x2): function arctanh (line 901) | def arctanh(x): function _keepdims (line 911) | def _keepdims(x, y, axis): function argmax (line 922) | def argmax(x, axis=None, keepdims=False): function argmin (line 951) | def argmin(x, axis=None, keepdims=False): function argsort (line 980) | def argsort(x, axis=-1): function array (line 995) | def array(x, dtype=None): function view (line 999) | def view(x, dtype=None): function average (line 1044) | def average(x, axis=None, weights=None): function bitwise_and (line 1076) | def bitwise_and(x, y): function bitwise_invert (line 1085) | def bitwise_invert(x): function bitwise_not (line 1090) | def bitwise_not(x): function bitwise_or (line 1094) | def bitwise_or(x, y): function bitwise_xor (line 1103) | def bitwise_xor(x, y): function bitwise_left_shift (line 1112) | def bitwise_left_shift(x, y): function left_shift (line 1122) | def left_shift(x, y): function bitwise_right_shift (line 1126) | def bitwise_right_shift(x, y): function right_shift (line 1136) | def right_shift(x, y): function blackman (line 1140) | def blackman(x): function broadcast_to (line 1152) | def broadcast_to(x, shape): function cbrt (line 1156) | def cbrt(x): function ceil (line 1169) | def ceil(x): function clip (line 1179) | def clip(x, x_min, x_max): function concatenate (line 1186) | def concatenate(xs, axis=0): function conjugate (line 1209) | def conjugate(x): function conj (line 1214) | def conj(x): function copy (line 1219) | def copy(x): function cos (line 1225) | def cos(x): function cosh (line 1236) | def cosh(x): function count_nonzero (line 1246) | def count_nonzero(x, axis=None): function cross (line 1250) | def cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None): function cumprod (line 1313) | def cumprod(x, axis=None, dtype=None): function cumsum (line 1324) | def cumsum(x, axis=None, dtype=None): function deg2rad (line 1335) | def deg2rad(x): function diag (line 1357) | def diag(x, k=0): function diagflat (line 1367) | def diagflat(x, k=0): function diagonal (line 1372) | def diagonal(x, offset=0, axis1=0, axis2=1): function diff (line 1403) | def diff(a, n=1, axis=-1): function digitize (line 1429) | def digitize(x, bins): function dot (line 1461) | def dot(x1, x2): function dstack (line 1481) | def dstack(xs): function empty (line 1502) | def empty(shape, dtype=None): function empty_like (line 1507) | def empty_like(x, dtype=None): function equal (line 1511) | def equal(x1, x2): function exp (line 1521) | def exp(x): function exp2 (line 1530) | def exp2(x): function expand_dims (line 1538) | def expand_dims(x, axis): function expm1 (line 1559) | def expm1(x): function flip (line 1567) | def flip(x, axis=None): function floor (line 1575) | def floor(x): function full (line 1586) | def full(shape, fill_value, dtype=None): function full_like (line 1592) | def full_like(x, fill_value, dtype=None): function gcd (line 1599) | def gcd(x1, x2): function geomspace (line 1636) | def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): function greater (line 1656) | def greater(x1, x2): function greater_equal (line 1665) | def greater_equal(x1, x2): function hstack (line 1674) | def hstack(xs): function hsplit (line 1684) | def hsplit(x, indices_or_sections): function hypot (line 1691) | def hypot(x1, x2): function identity (line 1713) | def identity(n, dtype=None): function imag (line 1718) | def imag(x): function isclose (line 1722) | def isclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function allclose (line 1737) | def allclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function isfinite (line 1756) | def isfinite(x): function isin (line 1764) | def isin(x1, x2, assume_unique=False, invert=False): function isinf (line 1792) | def isinf(x): function isnan (line 1800) | def isnan(x): function isneginf (line 1808) | def isneginf(x): function isposinf (line 1816) | def isposinf(x): function isreal (line 1824) | def isreal(x): function kron (line 1832) | def kron(x1, x2): function lcm (line 1878) | def lcm(x1, x2): function ldexp (line 1907) | def ldexp(x1, x2): function less (line 1924) | def less(x1, x2): function less_equal (line 1933) | def less_equal(x1, x2): function linspace (line 1942) | def linspace( function log (line 1986) | def log(x): function log10 (line 1998) | def log10(x): function log1p (line 2010) | def log1p(x): function log2 (line 2022) | def log2(x): function logaddexp (line 2033) | def logaddexp(x1, x2): function logaddexp2 (line 2047) | def logaddexp2(x1, x2): function logical_and (line 2063) | def logical_and(x1, x2): function logical_not (line 2069) | def logical_not(x): function logical_or (line 2074) | def logical_or(x1, x2): function logspace (line 2080) | def logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, ax... function maximum (line 2093) | def maximum(x1, x2): function median (line 2107) | def median(x, axis=None, keepdims=False): function meshgrid (line 2111) | def meshgrid(*x, indexing="xy"): function min (line 2115) | def min(x, axis=None, keepdims=False, initial=None): function minimum (line 2146) | def minimum(x1, x2): function mod (line 2160) | def mod(x1, x2): function fmod (line 2171) | def fmod(x1, x2): function moveaxis (line 2187) | def moveaxis(x, source, destination): function nanargmax (line 2208) | def nanargmax(x, axis=None, keepdims=False): function nanargmin (line 2227) | def nanargmin(x, axis=None, keepdims=False): function nancumsum (line 2246) | def nancumsum(x, axis=None, dtype=None): function nancumprod (line 2251) | def nancumprod(x, axis=None, dtype=None): function nanmax (line 2256) | def nanmax(x, axis=None, keepdims=False): function nanmean (line 2276) | def nanmean(x, axis=None, keepdims=False): function nanmin (line 2297) | def nanmin(x, axis=None, keepdims=False): function nanprod (line 2317) | def nanprod(x, axis=None, keepdims=False): function nanstd (line 2327) | def nanstd(x, axis=None, keepdims=False): function nansum (line 2332) | def nansum(x, axis=None, keepdims=False): function nanvar (line 2348) | def nanvar(x, axis=None, keepdims=False): function nan_to_num (line 2373) | def nan_to_num(x, nan=0.0, posinf=None, neginf=None): function ndim (line 2397) | def ndim(x): function nonzero (line 2402) | def nonzero(x): function not_equal (line 2408) | def not_equal(x1, x2): function ones_like (line 2417) | def ones_like(x, dtype=None): function zeros_like (line 2421) | def zeros_like(x, dtype=None): function outer (line 2425) | def outer(x1, x2): function pad (line 2434) | def pad(x, pad_width, mode="constant", constant_values=None): function prod (line 2449) | def prod(x, axis=None, keepdims=False, dtype=None): function ptp (line 2463) | def ptp(x, axis=None, keepdims=False): function _quantile (line 2470) | def _quantile(x, q, axis=None, method="linear", keepdims=False): function quantile (line 2578) | def quantile(x, q, axis=None, method="linear", keepdims=False): function ravel (line 2587) | def ravel(x): function unravel_index (line 2592) | def unravel_index(indices, shape): function real (line 2620) | def real(x): function reciprocal (line 2626) | def reciprocal(x): function repeat (line 2631) | def repeat(x, repeats, axis=None): function reshape (line 2640) | def reshape(x, newshape): function roll (line 2654) | def roll(x, shift, axis=None): function searchsorted (line 2665) | def searchsorted(sorted_sequence, values, side="left"): function sign (line 2685) | def sign(x): function signbit (line 2696) | def signbit(x): function sin (line 2716) | def sin(x): function sinc (line 2726) | def sinc(x): function sinh (line 2742) | def sinh(x): function size (line 2752) | def size(x): function sort (line 2757) | def sort(x, axis=-1): function split (line 2767) | def split(x, indices_or_sections, axis=0): function array_split (line 2783) | def array_split(x, indices_or_sections, axis=0): function stack (line 2794) | def stack(x, axis=0): function std (line 2802) | def std(x, axis=None, keepdims=False): function swapaxes (line 2810) | def swapaxes(x, axis1, axis2): function take (line 2841) | def take(x, indices, axis=None): function take_along_axis (line 2889) | def take_along_axis(x, indices, axis=None): function tan (line 2970) | def tan(x): function tanh (line 2981) | def tanh(x): function tensordot (line 2991) | def tensordot(x1, x2, axes=2): function round (line 3003) | def round(x, decimals=0): function tile (line 3023) | def tile(x, repeats): function trace (line 3055) | def trace(x, offset=0, axis1=0, axis2=1): function tri (line 3074) | def tri(N, M=None, k=0, dtype=None): function tril (line 3095) | def tril(x, k=0): function triu (line 3118) | def triu(x, k=0): function trunc (line 3141) | def trunc(x): function vdot (line 3149) | def vdot(x1, x2): function inner (line 3161) | def inner(x1, x2): function vstack (line 3179) | def vstack(xs): function vsplit (line 3187) | def vsplit(x, indices_or_sections): function _vmap_fn (line 3191) | def _vmap_fn(fn, in_axes=0): function vectorize (line 3204) | def vectorize(pyfunc, *, excluded=None, signature=None): function where (line 3210) | def where(condition, x1=None, x2=None): function divide (line 3233) | def divide(x1, x2): function divide_no_nan (line 3248) | def divide_no_nan(x1, x2): function true_divide (line 3263) | def true_divide(x1, x2): function power (line 3267) | def power(x1, x2): function negative (line 3287) | def negative(x): function nextafter (line 3291) | def nextafter(x1, x2): function square (line 3302) | def square(x): function sqrt (line 3310) | def sqrt(x): function squeeze (line 3321) | def squeeze(x, axis=None): function transpose (line 3345) | def transpose(x, axes=None): function trapezoid (line 3355) | def trapezoid(y, x=None, dx=1.0, axis=-1): function vander (line 3391) | def vander(x, N=None, increasing=False): function var (line 3412) | def var(x, axis=None, keepdims=False): function sum (line 3423) | def sum(x, axis=None, keepdims=False): function eye (line 3439) | def eye(N, M=None, k=0, dtype=None): function floor_divide (line 3454) | def floor_divide(x1, x2): function logical_xor (line 3468) | def logical_xor(x1, x2): function corrcoef (line 3474) | def corrcoef(x): function correlate (line 3506) | def correlate(x1, x2, mode="valid"): function select (line 3575) | def select(condlist, choicelist, default=0): function slogdet (line 3579) | def slogdet(x): function argpartition (line 3584) | def argpartition(x, kth, axis=-1): function histogram (line 3605) | def histogram(x, bins=10, range=None): FILE: keras/src/backend/tensorflow/optimizer.py class TFOptimizer (line 19) | class TFOptimizer(KerasAutoTrackable, base_optimizer.BaseOptimizer): method __init__ (line 20) | def __init__(self, *args, **kwargs): method add_variable_from_reference (line 24) | def add_variable_from_reference( method stateless_apply (line 39) | def stateless_apply(self, optimizer_variables, grads, trainable_variab... method assign (line 47) | def assign(self, variable, value): method assign_add (line 56) | def assign_add(self, variable, value): method assign_sub (line 65) | def assign_sub(self, variable, value): method _var_key (line 74) | def _var_key(self, variable): method _apply_weight_decay (line 89) | def _apply_weight_decay(self, variables): method _backend_update_step (line 113) | def _backend_update_step(self, grads, trainable_variables, learning_ra... method _distributed_tf_update_step (line 127) | def _distributed_tf_update_step( method _all_reduce_sum_gradients (line 141) | def _all_reduce_sum_gradients(self, grads_and_vars): method _overwrite_model_variables_with_average_value (line 181) | def _overwrite_model_variables_with_average_value( method _backend_increment_gradient_accumulators (line 203) | def _backend_increment_gradient_accumulators(self, grads, acc_grads): method _clip_by_norm (line 224) | def _clip_by_norm(self, values, axes=None): function filter_empty_gradients (line 230) | def filter_empty_gradients(grads_and_vars): FILE: keras/src/backend/tensorflow/optimizer_distribute_test.py class OptimizerDistributeTest (line 18) | class OptimizerDistributeTest(testing.TestCase): method setUp (line 19) | def setUp(self): method test_config (line 33) | def test_config(self): method test_single_step (line 44) | def test_single_step(self, optimizer_type): method test_weight_decay (line 71) | def test_weight_decay(self): method test_correctness_with_golden (line 104) | def test_correctness_with_golden(self): method test_clip_norm (line 134) | def test_clip_norm(self): method test_clip_value (line 141) | def test_clip_value(self): method test_stateless_not_supported (line 148) | def test_stateless_not_supported(self): method test_ema (line 156) | def test_ema(self): method test_gradient_accumulation (line 186) | def test_gradient_accumulation(self): FILE: keras/src/backend/tensorflow/random.py function _cast_seed (line 10) | def _cast_seed(seed): function normal (line 23) | def normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function uniform (line 31) | def uniform(shape, minval=0.0, maxval=1.0, dtype=None, seed=None): function categorical (line 43) | def categorical(logits, num_samples, dtype="int64", seed=None): function randint (line 49) | def randint(shape, minval, maxval, dtype="int32", seed=None): function truncated_normal (line 64) | def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function _get_concrete_noise_shape (line 72) | def _get_concrete_noise_shape(inputs, noise_shape): function dropout (line 85) | def dropout(inputs, rate, noise_shape=None, seed=None): function shuffle (line 100) | def shuffle(x, axis=0, seed=None): function gamma (line 108) | def gamma(shape, alpha, dtype=None, seed=None): function binomial (line 126) | def binomial(shape, counts, probabilities, dtype=None, seed=None): function beta (line 145) | def beta(shape, alpha, beta, dtype=None, seed=None): FILE: keras/src/backend/tensorflow/rnn.py function rnn (line 6) | def rnn( function gru (line 449) | def gru( function _do_gru_arguments_support_cudnn (line 503) | def _do_gru_arguments_support_cudnn( function _do_lstm_arguments_support_cudnn (line 523) | def _do_lstm_arguments_support_cudnn( function _has_fully_masked_sequence (line 541) | def _has_fully_masked_sequence(mask): function _assert_valid_mask (line 562) | def _assert_valid_mask(mask): function _standardize_cudnn_weights (line 584) | def _standardize_cudnn_weights(weights, biases, shape, transpose_weights... function _is_sequence_right_padded (line 617) | def _is_sequence_right_padded(mask): function _compute_sequence_length_from_mask (line 650) | def _compute_sequence_length_from_mask(mask, time_major): function _is_gpu_available (line 675) | def _is_gpu_available(): function _cudnn_gru (line 679) | def _cudnn_gru( function cudnn_ok (line 795) | def cudnn_ok( function lstm (line 820) | def lstm( function _cudnn_lstm (line 871) | def _cudnn_lstm( FILE: keras/src/backend/tensorflow/saved_model_test.py class CustomModelX (line 22) | class CustomModelX(models.Model): method __init__ (line 23) | def __init__(self, *args, **kwargs): method call (line 28) | def call(self, inputs): method one (line 32) | def one(self): class CustomSignatureModel (line 37) | class CustomSignatureModel(models.Model): method __init__ (line 38) | def __init__(self): method __call__ (line 43) | def __call__(self, x): method mutate (line 47) | def mutate(self, new_v): class SavedModelTest (line 55) | class SavedModelTest(testing.TestCase): method test_sequential (line 56) | def test_sequential(self): method test_functional (line 74) | def test_functional(self): method test_subclassed (line 98) | def test_subclassed(self): method test_custom_model_and_layer (line 120) | def test_custom_model_and_layer(self): method test_model_with_input_structure (line 152) | def test_model_with_input_structure(self, struct_type): method test_multi_input_model (line 191) | def test_multi_input_model(self): method test_multi_input_custom_model_and_layer (line 227) | def test_multi_input_custom_model_and_layer(self): method test_list_trackable_children_tracking (line 259) | def test_list_trackable_children_tracking(self): method test_dict_trackable_children_tracking (line 293) | def test_dict_trackable_children_tracking(self): method test_fixed_signature_string_dtype (line 327) | def test_fixed_signature_string_dtype(self): method test_non_fixed_signature_string_dtype (line 342) | def test_non_fixed_signature_string_dtype(self): method test_fine_tuning (line 368) | def test_fine_tuning(self): method test_signatures_path (line 399) | def test_signatures_path(self): method test_multiple_signatures_dict_path (line 414) | def test_multiple_signatures_dict_path(self): FILE: keras/src/backend/tensorflow/sparse.py function sparse_to_dense (line 12) | def sparse_to_dense(x, default_value=None): function sparse_with_values (line 25) | def sparse_with_values(x, values): function broadcast_scalar_to_sparse_shape (line 32) | def broadcast_scalar_to_sparse_shape(scalar, sparse): function sparse_subtract (line 38) | def sparse_subtract(x1, x2): function sparse_union_indices_and_values (line 56) | def sparse_union_indices_and_values(x1, x2_indices, x2_values=None): function indexed_slices_union_indices_and_values (line 87) | def indexed_slices_union_indices_and_values(x1, x2_indices, x2_values=No... function sparse_intersection_indices_and_values (line 164) | def sparse_intersection_indices_and_values(x1, x2): function indexed_slices_intersection_indices_and_values (line 216) | def indexed_slices_intersection_indices_and_values(x1, x2): function densifying_unary (line 300) | def densifying_unary(default_value): function elementwise_unary (line 348) | def elementwise_unary(func): function elementwise_binary_union (line 392) | def elementwise_binary_union(sparse_op, densify_mixed=False): function elementwise_binary_intersection (line 500) | def elementwise_binary_intersection(func): function elementwise_division (line 632) | def elementwise_division(func): FILE: keras/src/backend/tensorflow/tensorboard.py function start_trace (line 4) | def start_trace(logdir): function stop_trace (line 8) | def stop_trace(save): function start_batch_trace (line 12) | def start_batch_trace(batch): function stop_batch_trace (line 20) | def stop_batch_trace(batch_trace_context): FILE: keras/src/backend/tensorflow/trackable.py class KerasAutoTrackable (line 6) | class KerasAutoTrackable(tf.__internal__.tracking.AutoTrackable): method __setattr__ (line 15) | def __setattr__(self, name, value): function sticky_attribute_assignment (line 31) | def sticky_attribute_assignment(trackable, name, value): FILE: keras/src/backend/tensorflow/trainer.py class TensorFlowTrainer (line 22) | class TensorFlowTrainer(base_trainer.Trainer): method __init__ (line 23) | def __init__(self): method distribute_strategy (line 42) | def distribute_strategy(self): method distribute_reduction_method (line 46) | def distribute_reduction_method(self): method distribute_reduction_method (line 50) | def distribute_reduction_method(self, value): method train_step (line 53) | def train_step(self, data): method test_step (line 90) | def test_step(self, data): method predict_step (line 107) | def predict_step(self, data): method _autoconvert_optionals (line 115) | def _autoconvert_optionals(self, step_func): method _make_function (line 130) | def _make_function(self, step_function): method make_train_function (line 254) | def make_train_function(self, force=False): method make_test_function (line 259) | def make_test_function(self, force=False): method make_predict_function (line 264) | def make_predict_function(self, force=False): method fit (line 315) | def fit( method evaluate (line 456) | def evaluate( method predict (line 523) | def predict( method train_on_batch (line 601) | def train_on_batch( method test_on_batch (line 635) | def test_on_batch( method predict_on_batch (line 657) | def predict_on_batch(self, x): method compiled_metrics (line 667) | def compiled_metrics(self): method _compiled_metrics_update_state (line 676) | def _compiled_metrics_update_state(self, y, y_pred, sample_weight=None): method compiled_loss (line 692) | def compiled_loss( method loss (line 703) | def loss(self, y, y_pred, sample_weight=None): method _maybe_symbolic_build (line 712) | def _maybe_symbolic_build(self, iterator=None, data_batch=None): method _aggregate_additional_loss (line 741) | def _aggregate_additional_loss(self, loss): class TFEpochIterator (line 746) | class TFEpochIterator(EpochIterator): method __init__ (line 747) | def __init__(self, distribute_strategy=None, *args, **kwargs): method _get_iterator (line 757) | def _get_iterator(self): method tf_sync (line 760) | def tf_sync(self): method __next__ (line 763) | def __next__(self): method catch_stop_iteration (line 767) | def catch_stop_iteration(self): function reduce_per_replica (line 777) | def reduce_per_replica(values, strategy, reduction): function _multi_worker_concat (line 867) | def _multi_worker_concat(v, strategy): function concat (line 898) | def concat(tensors, axis=0): function _tpu_multi_host_concat (line 908) | def _tpu_multi_host_concat(v, strategy): function _collective_all_reduce_multi_worker (line 922) | def _collective_all_reduce_multi_worker(strategy): function _is_per_replica_instance (line 928) | def _is_per_replica_instance(obj): function _is_scalar (line 934) | def _is_scalar(x): function _is_tpu_multi_host (line 938) | def _is_tpu_multi_host(strategy): function _is_tpu_strategy (line 942) | def _is_tpu_strategy(strategy): function _is_tpu_strategy_class (line 946) | def _is_tpu_strategy_class(clz): function convert_to_np_if_not_ragged (line 955) | def convert_to_np_if_not_ragged(x): function potentially_ragged_concat (line 963) | def potentially_ragged_concat(tensors): FILE: keras/src/backend/tests/compute_output_spec_test.py function single_arg_test_fn (line 10) | def single_arg_test_fn(x): function three_args_2_kwarg_test_fn (line 14) | def three_args_2_kwarg_test_fn(x1, x2, x3=None): class ComputeOutputSpecTest (line 22) | class ComputeOutputSpecTest(unittest.TestCase): method test_dynamic_batch_size (line 23) | def test_dynamic_batch_size(self): method test_dynamic_everything (line 36) | def test_dynamic_everything(self): method test_sparse_to_sparse (line 53) | def test_sparse_to_sparse(self): method test_sparse_to_dense (line 84) | def test_sparse_to_dense(self): FILE: keras/src/backend/tests/device_scope_test.py class DeviceTest (line 7) | class DeviceTest(testing.TestCase): method test_tf_device_scope (line 11) | def test_tf_device_scope(self): method test_jax_device_scope (line 29) | def test_jax_device_scope(self): method test_invalid_jax_device (line 49) | def test_invalid_jax_device(self): method test_torch_device_scope (line 56) | def test_torch_device_scope(self): method test_invalid_torch_device (line 76) | def test_invalid_torch_device(self): method test_torch_meta_device (line 81) | def test_torch_meta_device(self): FILE: keras/src/backend/torch/core.py function device_scope (line 63) | def device_scope(device_name): function get_device (line 73) | def get_device(): function _parse_device_input (line 80) | def _parse_device_input(device_name): function to_torch_dtype (line 97) | def to_torch_dtype(dtype): class Variable (line 104) | class Variable(KerasVariable): method _initialize (line 105) | def _initialize(self, value): method _direct_assign (line 115) | def _direct_assign(self, value): method _convert_to_tensor (line 119) | def _convert_to_tensor(self, value, dtype=None): method __torch_function__ (line 124) | def __torch_function__(cls, func, types, args=(), kwargs=None): method __array__ (line 134) | def __array__(self, dtype=None): method value (line 141) | def value(self): method trainable (line 176) | def trainable(self): method trainable (line 180) | def trainable(self, value): method __eq__ (line 185) | def __eq__(self, other): function convert_to_tensor (line 192) | def convert_to_tensor(x, dtype=None, sparse=None, ragged=None): function convert_to_numpy (line 246) | def convert_to_numpy(x): function is_tensor (line 267) | def is_tensor(x): function shape (line 279) | def shape(x): function cast (line 284) | def cast(x, dtype): function compute_output_spec (line 297) | def compute_output_spec(fn, *args, **kwargs): function cond (line 374) | def cond(pred, true_fn, false_fn): function vectorized_map (line 384) | def vectorized_map(function, elements): function map (line 388) | def map(f, xs): function scan (line 396) | def scan(f, init, xs=None, length=None, reverse=False, unroll=1): function associative_scan (line 445) | def associative_scan(f, elems, reverse=False, axis=0): function scatter (line 568) | def scatter(indices, values, shape): function scatter_update (line 584) | def scatter_update(inputs, indices, updates, reduction=None): function slice (line 619) | def slice(inputs, start_indices, shape): function slice_update (line 633) | def slice_update(inputs, start_indices, updates): function switch (line 649) | def switch(index, branches, *operands): function while_loop (line 655) | def while_loop( function fori_loop (line 677) | def fori_loop(lower, upper, body_fun, init_val): function stop_gradient (line 684) | def stop_gradient(variable): function unstack (line 692) | def unstack(x, num=None, axis=0): function random_seed_dtype (line 696) | def random_seed_dtype(): function remat (line 703) | def remat(f): class custom_gradient (line 721) | class custom_gradient: method __init__ (line 728) | def __init__(self, forward_fn): method __call__ (line 731) | def __call__(self, *args, **kwargs): class CustomGradientFunction (line 735) | class CustomGradientFunction(torch.autograd.Function): method forward (line 739) | def forward(ctx, forward_fn, *args, **kwargs): method backward (line 758) | def backward(ctx, grad_output): FILE: keras/src/backend/torch/export.py class TorchExportArchive (line 15) | class TorchExportArchive(SavedModelExportArchive): method _backend_track_layer (line 18) | def _backend_track_layer(self, layer): method _backend_add_endpoint (line 24) | def _backend_add_endpoint(self, name, fn, input_signature, **kwargs): method track_and_add_endpoint (line 30) | def track_and_add_endpoint(self, name, resource, input_signature, **kw... FILE: keras/src/backend/torch/image.py function rgb_to_grayscale (line 49) | def rgb_to_grayscale(images, data_format=None): function rgb_to_hsv (line 76) | def rgb_to_hsv(images, data_format=None): function hsv_to_rgb (line 126) | def hsv_to_rgb(images, data_format=None): function _cast_squeeze_in (line 166) | def _cast_squeeze_in(image, req_dtypes): function _cast_squeeze_out (line 182) | def _cast_squeeze_out(image, need_cast, need_squeeze, out_dtype): function resize (line 200) | def resize( function affine_transform (line 352) | def affine_transform( function perspective_transform (line 460) | def perspective_transform( function compute_homography_matrix (line 568) | def compute_homography_matrix(start_points, end_points): function _mirror_index_fixer (line 719) | def _mirror_index_fixer(index, size): function _reflect_index_fixer (line 725) | def _reflect_index_fixer(index, size): function _is_integer (line 741) | def _is_integer(a): function _nearest_indices_and_weights (line 747) | def _nearest_indices_and_weights(coordinate): function _linear_indices_and_weights (line 755) | def _linear_indices_and_weights(coordinate): function map_coordinates (line 763) | def map_coordinates( function gaussian_blur (line 846) | def gaussian_blur( function _torch_seed_generator (line 911) | def _torch_seed_generator(seed): function elastic_transform (line 921) | def elastic_transform( function _fill_triangle_kernel (line 1055) | def _fill_triangle_kernel(x): function _fill_keys_cubic_kernel (line 1059) | def _fill_keys_cubic_kernel(x): function _fill_lanczos_kernel (line 1065) | def _fill_lanczos_kernel(radius, x): function _compute_weight_mat (line 1081) | def _compute_weight_mat( function _scale_and_translate (line 1128) | def _scale_and_translate( function scale_and_translate (line 1158) | def scale_and_translate( FILE: keras/src/backend/torch/layer.py class TorchLayer (line 7) | class TorchLayer(torch.nn.Module): method torch_params (line 9) | def torch_params(self): method _post_build (line 14) | def _post_build(self): method _track_variables (line 21) | def _track_variables(self): method named_parameters (line 28) | def named_parameters( method forward (line 40) | def forward(self, *args, **kwargs): method _setattr_hook (line 43) | def _setattr_hook(self, name, value): method _post_track_variable (line 57) | def _post_track_variable(self, variable): method _post_untrack_variable (line 62) | def _post_untrack_variable(self, variable): FILE: keras/src/backend/torch/linalg.py function cholesky (line 10) | def cholesky(x, upper=False): function cholesky_inverse (line 14) | def cholesky_inverse(x, upper=False): function det (line 18) | def det(x): function eig (line 22) | def eig(x): function eigh (line 26) | def eigh(x): function inv (line 30) | def inv(x): function lu_factor (line 34) | def lu_factor(x): function norm (line 40) | def norm(x, ord=None, axis=None, keepdims=False): function qr (line 50) | def qr(x, mode="reduced"): function solve (line 60) | def solve(a, b): function solve_triangular (line 64) | def solve_triangular(a, b, lower=False): function svd (line 73) | def svd(x, full_matrices=True, compute_uv=True): function lstsq (line 79) | def lstsq(a, b, rcond=None): function jvp (line 85) | def jvp(fun, primals, tangents, has_aux=False): FILE: keras/src/backend/torch/math.py function _segment_reduction_fn (line 11) | def _segment_reduction_fn(data, segment_ids, reduction_method, num_segme... function segment_sum (line 52) | def segment_sum(data, segment_ids, num_segments=None, sorted=False): function segment_max (line 58) | def segment_max(data, segment_ids, num_segments=None, sorted=False): function top_k (line 64) | def top_k(x, k, sorted=True): function in_top_k (line 69) | def in_top_k(targets, predictions, k): function logsumexp (line 79) | def logsumexp(x, axis=None, keepdims=False): function qr (line 85) | def qr(x, mode="reduced"): function extract_sequences (line 97) | def extract_sequences(x, sequence_length, sequence_stride): function _overlap_sequences (line 104) | def _overlap_sequences(x, sequence_stride): function _get_complex_tensor_from_tuple (line 154) | def _get_complex_tensor_from_tuple(x): function fft (line 183) | def fft(x): function fft2 (line 189) | def fft2(x): function ifft2 (line 195) | def ifft2(x): function rfft (line 201) | def rfft(x, fft_length=None): function irfft (line 207) | def irfft(x, fft_length=None): function stft (line 212) | def stft( function istft (line 284) | def istft( function rsqrt (line 383) | def rsqrt(x): function erf (line 388) | def erf(x): function erfinv (line 393) | def erfinv(x): function logdet (line 398) | def logdet(x): FILE: keras/src/backend/torch/nn.py function relu (line 16) | def relu(x): function relu6 (line 21) | def relu6(x): function sigmoid (line 26) | def sigmoid(x): function sparse_sigmoid (line 31) | def sparse_sigmoid(x): function tanh (line 44) | def tanh(x): function tanh_shrink (line 49) | def tanh_shrink(x): function softplus (line 54) | def softplus(x): function softsign (line 59) | def softsign(x): function soft_shrink (line 64) | def soft_shrink(x, threshold=0.5): function sparse_plus (line 69) | def sparse_plus(x): function silu (line 78) | def silu(x): function squareplus (line 83) | def squareplus(x, b=4): function log_sigmoid (line 90) | def log_sigmoid(x): function leaky_relu (line 95) | def leaky_relu(x, negative_slope=0.2): function hard_sigmoid (line 100) | def hard_sigmoid(x): function hard_silu (line 105) | def hard_silu(x): function elu (line 110) | def elu(x, alpha=1.0): function selu (line 115) | def selu(x): function gelu (line 120) | def gelu(x, approximate=True): function celu (line 128) | def celu(x, alpha=1.0): function glu (line 133) | def glu(x, axis=-1): function hard_tanh (line 138) | def hard_tanh(x): function hard_shrink (line 143) | def hard_shrink(x, threshold=0.5): function threshold (line 148) | def threshold(x, threshold, default_value): function softmax (line 153) | def softmax(x, axis=-1): function log_softmax (line 173) | def log_softmax(x, axis=-1): function sparsemax (line 193) | def sparsemax(x, axis=-1): function _compute_padding_length (line 215) | def _compute_padding_length( function _apply_same_padding (line 237) | def _apply_same_padding( function _transpose_spatial_inputs (line 282) | def _transpose_spatial_inputs(inputs): function _transpose_spatial_outputs (line 300) | def _transpose_spatial_outputs(outputs): function _transpose_conv_kernel (line 312) | def _transpose_conv_kernel(kernel): function _get_channels_last_memory_format (line 325) | def _get_channels_last_memory_format(ndim): function _maybe_convert_to_channels_last (line 333) | def _maybe_convert_to_channels_last(tensor): function max_pool (line 340) | def max_pool( function average_pool (line 402) | def average_pool( function adaptive_average_pool (line 476) | def adaptive_average_pool(inputs, output_size, data_format=None): function adaptive_max_pool (line 519) | def adaptive_max_pool(inputs, output_size, data_format=None): function conv (line 564) | def conv( function depthwise_conv (line 651) | def depthwise_conv( function separable_conv (line 666) | def separable_conv( function conv_transpose (line 693) | def conv_transpose( function one_hot (line 770) | def one_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function multi_hot (line 796) | def multi_hot(x, num_classes, axis=-1, dtype=None, sparse=False): function categorical_crossentropy (line 808) | def categorical_crossentropy(target, output, from_logits=False, axis=-1): function sparse_categorical_crossentropy (line 834) | def sparse_categorical_crossentropy(target, output, from_logits=False, a... function binary_crossentropy (line 883) | def binary_crossentropy(target, output, from_logits=False): function moments (line 918) | def moments(x, axes, keepdims=False, synchronized=False): function batch_normalization (line 963) | def batch_normalization( function ctc_loss (line 993) | def ctc_loss(target, output, target_length, output_length, mask_index=0): function _ctc_greedy_decode (line 1016) | def _ctc_greedy_decode( function ctc_decode (line 1062) | def ctc_decode( function psnr (line 1094) | def psnr(x1, x2, max_val): function _get_large_negative (line 1111) | def _get_large_negative(dtype): function _can_use_flash_attention (line 1120) | def _can_use_flash_attention( function dot_product_attention (line 1164) | def dot_product_attention( function unfold (line 1243) | def unfold(input, kernel_size, dilation=1, padding=0, stride=1): function fold (line 1266) | def fold(x, output_size, kernel_size, dilation=1, padding=0, stride=1): function depth_to_space (line 1291) | def depth_to_space(x, block_size, data_format="channels_last"): function space_to_depth (line 1332) | def space_to_depth(x, block_size, data_format="channels_last"): FILE: keras/src/backend/torch/numpy.py function rot90 (line 28) | def rot90(array, k=1, axes=(0, 1)): function add (line 67) | def add(x1, x2): function einsum (line 73) | def einsum(subscripts, *operands, **kwargs): function subtract (line 89) | def subtract(x1, x2): function matmul (line 100) | def matmul(x1, x2): function multiply (line 156) | def multiply(x1, x2): function mean (line 162) | def mean(x, axis=None, keepdims=False): function max (line 197) | def max(x, axis=None, keepdims=False, initial=None): function ones (line 223) | def ones(shape, dtype=None): function zeros (line 230) | def zeros(shape, dtype=None): function zeros_like (line 237) | def zeros_like(x, dtype=None): function absolute (line 243) | def absolute(x): function abs (line 251) | def abs(x): function all (line 255) | def all(x, axis=None, keepdims=False): function angle (line 266) | def angle(x): function any (line 277) | def any(x, axis=None, keepdims=False): function amax (line 288) | def amax(x, axis=None, keepdims=False): function amin (line 298) | def amin(x, axis=None, keepdims=False): function append (line 308) | def append(x1, x2, axis=None): function arange (line 315) | def arange(start, stop=None, step=None, dtype=None): function arccos (line 333) | def arccos(x): function arccosh (line 338) | def arccosh(x): function arcsin (line 343) | def arcsin(x): function arcsinh (line 348) | def arcsinh(x): function arctan (line 353) | def arctan(x): function arctan2 (line 358) | def arctan2(x1, x2): function arctanh (line 371) | def arctanh(x): function argmax (line 376) | def argmax(x, axis=None, keepdims=False): function argmin (line 386) | def argmin(x, axis=None, keepdims=False): function argsort (line 396) | def argsort(x, axis=-1): function array (line 409) | def array(x, dtype=None): function view (line 413) | def view(x, dtype=None): function average (line 419) | def average(x, axis=None, weights=None): function bartlett (line 439) | def bartlett(x): function hamming (line 444) | def hamming(x): function hanning (line 449) | def hanning(x): function heaviside (line 454) | def heaviside(x1, x2): function kaiser (line 470) | def kaiser(x, beta): function bincount (line 475) | def bincount(x, weights=None, minlength=0, sparse=False): function bitwise_and (line 506) | def bitwise_and(x, y): function bitwise_invert (line 512) | def bitwise_invert(x): function bitwise_not (line 517) | def bitwise_not(x): function bitwise_or (line 521) | def bitwise_or(x, y): function bitwise_xor (line 527) | def bitwise_xor(x, y): function bitwise_left_shift (line 533) | def bitwise_left_shift(x, y): function left_shift (line 540) | def left_shift(x, y): function bitwise_right_shift (line 544) | def bitwise_right_shift(x, y): function right_shift (line 551) | def right_shift(x, y): function blackman (line 555) | def blackman(x): function broadcast_to (line 560) | def broadcast_to(x, shape): function cbrt (line 565) | def cbrt(x): function ceil (line 577) | def ceil(x): function clip (line 595) | def clip(x, x_min, x_max): function concatenate (line 611) | def concatenate(xs, axis=0): function conjugate (line 616) | def conjugate(x): function conj (line 622) | def conj(x): function copy (line 628) | def copy(x): function cos (line 633) | def cos(x): function cosh (line 638) | def cosh(x): function count_nonzero (line 643) | def count_nonzero(x, axis=None): function cross (line 651) | def cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None): function cumprod (line 673) | def cumprod(x, axis=None, dtype=None): function cumsum (line 690) | def cumsum(x, axis=None, dtype=None): function deg2rad (line 707) | def deg2rad(x): function diag (line 716) | def diag(x, k=0): function diagflat (line 721) | def diagflat(x, k=0): function diagonal (line 726) | def diagonal(x, offset=0, axis1=0, axis2=1): function diff (line 736) | def diff(a, n=1, axis=-1): function digitize (line 741) | def digitize(x, bins): function dot (line 749) | def dot(x1, x2): function dstack (line 767) | def dstack(xs): function empty (line 772) | def empty(shape, dtype=None): function empty_like (line 777) | def empty_like(x, dtype=None): function equal (line 783) | def equal(x1, x2): function exp (line 788) | def exp(x): function exp2 (line 796) | def exp2(x): function expand_dims (line 804) | def expand_dims(x, axis): function expm1 (line 814) | def expm1(x): function flip (line 822) | def flip(x, axis=None): function floor (line 830) | def floor(x): function full (line 841) | def full(shape, fill_value, dtype=None): function full_like (line 854) | def full_like(x, fill_value, dtype=None): function gcd (line 859) | def gcd(x1, x2): function geomspace (line 865) | def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): function greater (line 892) | def greater(x1, x2): function greater_equal (line 897) | def greater_equal(x1, x2): function hstack (line 902) | def hstack(xs): function hsplit (line 907) | def hsplit(x, indices_or_sections): function hypot (line 914) | def hypot(x1, x2): function identity (line 930) | def identity(n, dtype=None): function imag (line 942) | def imag(x): function isclose (line 948) | def isclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function allclose (line 959) | def allclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): function isfinite (line 972) | def isfinite(x): function isin (line 977) | def isin(x1, x2, assume_unique=False, invert=False): function isinf (line 994) | def isinf(x): function isnan (line 999) | def isnan(x): function isneginf (line 1004) | def isneginf(x): function isposinf (line 1009) | def isposinf(x): function isreal (line 1014) | def isreal(x): function kron (line 1019) | def kron(x1, x2): function lcm (line 1025) | def lcm(x1, x2): function ldexp (line 1031) | def ldexp(x1, x2): function less (line 1045) | def less(x1, x2): function less_equal (line 1050) | def less_equal(x1, x2): function linspace (line 1055) | def linspace( function log (line 1105) | def log(x): function log10 (line 1110) | def log10(x): function log1p (line 1115) | def log1p(x): function log2 (line 1120) | def log2(x): function logaddexp (line 1125) | def logaddexp(x1, x2): function logaddexp2 (line 1141) | def logaddexp2(x1, x2): function logical_and (line 1150) | def logical_and(x1, x2): function logical_not (line 1155) | def logical_not(x): function logical_or (line 1160) | def logical_or(x1, x2): function logspace (line 1165) | def logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, ax... function maximum (line 1213) | def maximum(x1, x2): function median (line 1227) | def median(x, axis=None, keepdims=False): function meshgrid (line 1269) | def meshgrid(*x, indexing="xy"): function min (line 1274) | def min(x, axis=None, keepdims=False, initial=None): function minimum (line 1299) | def minimum(x1, x2): function mod (line 1313) | def mod(x1, x2): function fmod (line 1323) | def fmod(x1, x2): function moveaxis (line 1333) | def moveaxis(x, source, destination): function nanargmax (line 1338) | def nanargmax(x, axis=None, keepdims=False): function nanargmin (line 1353) | def nanargmin(x, axis=None, keepdims=False): function nancumsum (line 1368) | def nancumsum(x, axis=None, dtype=None): function nancumprod (line 1373) | def nancumprod(x, axis=None, dtype=None): function nanmax (line 1378) | def nanmax(x, axis=None, keepdims=False): function nanmean (line 1396) | def nanmean(x, axis=None, keepdims=False): function nanmin (line 1406) | def nanmin(x, axis=None, keepdims=False): function nanprod (line 1424) | def nanprod(x, axis=None, keepdims=False): function nanstd (line 1443) | def nanstd(x, axis=None, keepdims=False): function nansum (line 1448) | def nansum(x, axis=None, keepdims=False): function nanvar (line 1462) | def nanvar(x, axis=None, keepdims=False): function nan_to_num (line 1486) | def nan_to_num(x, nan=0.0, posinf=None, neginf=None): function ndim (line 1491) | def ndim(x): function nonzero (line 1496) | def nonzero(x): function not_equal (line 1501) | def not_equal(x1, x2): function ones_like (line 1506) | def ones_like(x, dtype=None): function outer (line 1512) | def outer(x1, x2): function pad (line 1517) | def pad(x, pad_width, mode="constant", constant_values=None): function prod (line 1567) | def prod(x, axis=None, keepdims=False, dtype=None): function ptp (line 1596) | def ptp(x, axis=None, keepdims=False): function quantile (line 1608) | def quantile(x, q, axis=None, method="linear", keepdims=False): function ravel (line 1651) | def ravel(x): function unravel_index (line 1656) | def unravel_index(indices, shape): function real (line 1664) | def real(x): function reciprocal (line 1670) | def reciprocal(x): function repeat (line 1675) | def repeat(x, repeats, axis=None): function reshape (line 1693) | def reshape(x, newshape): function roll (line 1700) | def roll(x, shift, axis=None): function searchsorted (line 1705) | def searchsorted(sorted_sequence, values, side="left"): function sign (line 1719) | def sign(x): function signbit (line 1724) | def signbit(x): function sin (line 1729) | def sin(x): function sinc (line 1734) | def sinc(x): function sinh (line 1739) | def sinh(x): function size (line 1744) | def size(x): function sort (line 1749) | def sort(x, axis=-1): function split (line 1758) | def split(x, indices_or_sections, axis=0): function array_split (line 1790) | def array_split(x, indices_or_sections, axis=0): function stack (line 1796) | def stack(x, axis=0): function std (line 1801) | def std(x, axis=None, keepdims=False): function swapaxes (line 1810) | def swapaxes(x, axis1, axis2): function take (line 1815) | def take(x, indices, axis=None): function take_along_axis (line 1842) | def take_along_axis(x, indices, axis=None): function tan (line 1855) | def tan(x): function tanh (line 1860) | def tanh(x): function tensordot (line 1865) | def tensordot(x1, x2, axes=2): function round (line 1887) | def round(x, decimals=0): function tile (line 1897) | def tile(x, repeats): function trace (line 1906) | def trace(x, offset=0, axis1=0, axis2=1): function tri (line 1919) | def tri(N, M=None, k=0, dtype=None): function tril (line 1926) | def tril(x, k=0): function triu (line 1931) | def triu(x, k=0): function trunc (line 1936) | def trunc(x): function vdot (line 1943) | def vdot(x1, x2): function inner (line 1959) | def inner(x1, x2): function vstack (line 1973) | def vstack(xs): function vsplit (line 1978) | def vsplit(x, indices_or_sections): function vectorize (line 1985) | def vectorize(pyfunc, *, excluded=None, signature=None): function where (line 1991) | def where(condition, x1=None, x2=None): function divide (line 2001) | def divide(x1, x2): function divide_no_nan (line 2009) | def divide_no_nan(x1, x2): function true_divide (line 2017) | def true_divide(x1, x2): function power (line 2021) | def power(x1, x2): function negative (line 2026) | def negative(x): function nextafter (line 2031) | def nextafter(x1, x2): function square (line 2041) | def square(x): function sqrt (line 2048) | def sqrt(x): function squeeze (line 2055) | def squeeze(x, axis=None): function transpose (line 2062) | def transpose(x, axes=None): function trapezoid (line 2069) | def trapezoid(y, x=None, dx=1.0, axis=-1): function vander (line 2081) | def vander(x, N=None, increasing=False): function var (line 2087) | def var(x, axis=None, keepdims=False): function sum (line 2101) | def sum(x, axis=None, keepdims=False): function eye (line 2118) | def eye(N, M=None, k=0, dtype=None): function floor_divide (line 2137) | def floor_divide(x1, x2): function logical_xor (line 2149) | def logical_xor(x1, x2): function corrcoef (line 2154) | def corrcoef(x): function correlate (line 2165) | def correlate(x1, x2, mode="valid"): function select (line 2212) | def select(condlist, choicelist, default=0): function slogdet (line 2221) | def slogdet(x): function argpartition (line 2226) | def argpartition(x, kth, axis=-1): function histogram (line 2243) | def histogram(x, bins=10, range=None): FILE: keras/src/backend/torch/optimizers/torch_adadelta.py class Adadelta (line 8) | class Adadelta( method _parallel_update_step (line 11) | def _parallel_update_step( FILE: keras/src/backend/torch/optimizers/torch_adagrad.py class Adagrad (line 8) | class Adagrad( method _parallel_update_step (line 11) | def _parallel_update_step( FILE: keras/src/backend/torch/optimizers/torch_adam.py class Adam (line 8) | class Adam(torch_parallel_optimizer.TorchParallelOptimizer, optimizers.A... method _parallel_update_step (line 9) | def _parallel_update_step( FILE: keras/src/backend/torch/optimizers/torch_adamax.py class Adamax (line 8) | class Adamax( method _parallel_update_step (line 11) | def _parallel_update_step( FILE: keras/src/backend/torch/optimizers/torch_adamw.py class AdamW (line 5) | class AdamW(torch_adam.Adam, optimizers.AdamW): FILE: keras/src/backend/torch/optimizers/torch_lion.py class Lion (line 8) | class Lion(torch_parallel_optimizer.TorchParallelOptimizer, optimizers.L... method _parallel_update_step (line 9) | def _parallel_update_step( FILE: keras/src/backend/torch/optimizers/torch_nadam.py class Nadam (line 9) | class Nadam(torch_parallel_optimizer.TorchParallelOptimizer, optimizers.... method _parallel_update_step (line 10) | def _parallel_update_step( FILE: keras/src/backend/torch/optimizers/torch_optimizer.py class TorchOptimizer (line 8) | class TorchOptimizer(BaseOptimizer): method __new__ (line 9) | def __new__(cls, *args, **kwargs): method _apply_weight_decay (line 38) | def _apply_weight_decay(self, variables): FILE: keras/src/backend/torch/optimizers/torch_parallel_optimizer.py class TorchParallelOptimizer (line 7) | class TorchParallelOptimizer(BaseOptimizer): method _backend_update_step (line 9) | def _backend_update_step(self, grads, trainable_variables, learning_ra... method _backend_reset_gradient_accumulators (line 17) | def _backend_reset_gradient_accumulators(self): method _backend_increment_gradient_accumulators (line 24) | def _backend_increment_gradient_accumulators(self, grads, acc_grads): FILE: keras/src/backend/torch/optimizers/torch_rmsprop.py class RMSprop (line 8) | class RMSprop( method _parallel_update_step (line 11) | def _parallel_update_step( FILE: keras/src/backend/torch/optimizers/torch_sgd.py class SGD (line 7) | class SGD(torch_parallel_optimizer.TorchParallelOptimizer, optimizers.SGD): method _parallel_update_step (line 8) | def _parallel_update_step( FILE: keras/src/backend/torch/random.py function torch_seed_generator (line 17) | def torch_seed_generator(seed): function normal (line 30) | def normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function categorical (line 49) | def categorical(logits, num_samples, dtype="int32", seed=None): function uniform (line 69) | def uniform(shape, minval=0.0, maxval=1.0, dtype=None, seed=None): function randint (line 91) | def randint(shape, minval, maxval, dtype="int32", seed=None): function truncated_normal (line 113) | def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function _get_concrete_noise_shape (line 126) | def _get_concrete_noise_shape(inputs, noise_shape): function dropout (line 139) | def dropout(inputs, rate, noise_shape=None, seed=None): function shuffle (line 176) | def shuffle(x, axis=0, seed=None): function gamma (line 201) | def gamma(shape, alpha, dtype=None, seed=None): function binomial (line 217) | def binomial(shape, counts, probabilities, dtype=None, seed=None): function beta (line 235) | def beta(shape, alpha, beta, dtype=None, seed=None): FILE: keras/src/backend/torch/rnn.py function rnn (line 8) | def rnn( function _is_sequence_right_padded (line 379) | def _is_sequence_right_padded(mask): function _has_fully_masked_sequence (line 414) | def _has_fully_masked_sequence(mask): function _assert_valid_mask (line 433) | def _assert_valid_mask(mask): function _compute_sequence_length_from_mask (line 453) | def _compute_sequence_length_from_mask(mask, batch_first): function prepare_lstm_weights (line 478) | def prepare_lstm_weights(lstm, kernel, recurrent_kernel, bias, device): function _is_cuda_cudnn_available (line 542) | def _is_cuda_cudnn_available(): function cudnn_ok (line 547) | def cudnn_ok( function lstm (line 566) | def lstm( function _cudnn_lstm (line 642) | def _cudnn_lstm( function gru (line 740) | def gru( function prepare_gru_params (line 798) | def prepare_gru_params(kernel, recurrent_kernel, bias, device): function _cudnn_gru (line 844) | def _cudnn_gru( FILE: keras/src/backend/torch/trainer.py class TorchTrainer (line 20) | class TorchTrainer(base_trainer.Trainer): method __init__ (line 21) | def __init__(self): method _should_torch_compile (line 27) | def _should_torch_compile(self): method train_step (line 41) | def train_step(self, data): method test_step (line 83) | def test_step(self, data): method predict_step (line 104) | def predict_step(self, data): method make_train_function (line 112) | def make_train_function(self, force=False): method make_test_function (line 132) | def make_test_function(self, force=False): method make_predict_function (line 153) | def make_predict_function(self, force=False): method fit (line 175) | def fit( method evaluate (line 331) | def evaluate( method predict (line 398) | def predict( method train_on_batch (line 454) | def train_on_batch( method test_on_batch (line 487) | def test_on_batch( method predict_on_batch (line 508) | def predict_on_batch(self, x): class TorchEpochIterator (line 517) | class TorchEpochIterator(EpochIterator): method _get_iterator (line 518) | def _get_iterator(self): FILE: keras/src/callbacks/backup_and_restore.py class BackupAndRestore (line 9) | class BackupAndRestore(Callback): method __init__ (line 80) | def __init__( method on_train_begin (line 113) | def on_train_begin(self, logs=None): method _load_model (line 130) | def _load_model(self): method on_epoch_end (line 154) | def on_epoch_end(self, epoch, logs=None): method on_train_batch_end (line 160) | def on_train_batch_end(self, batch, logs=None): method _save_model (line 164) | def _save_model(self): method _should_save_on_batch (line 192) | def _should_save_on_batch(self, batch): method on_train_end (line 208) | def on_train_end(self, logs=None): FILE: keras/src/callbacks/backup_and_restore_test.py class InterruptingCallback (line 11) | class InterruptingCallback(callbacks.Callback): method __init__ (line 14) | def __init__(self, steps_int, epoch_int): method on_epoch_end (line 20) | def on_epoch_end(self, epoch, log=None): method on_batch_end (line 25) | def on_batch_end(self, batch, logs=None): class CanaryLayer (line 31) | class CanaryLayer(layers.Layer): method __init__ (line 32) | def __init__(self): method call (line 38) | def call(self, x): class BackupAndRestoreCallbackTest (line 43) | class BackupAndRestoreCallbackTest(testing.TestCase): method make_model (line 44) | def make_model(self): method test_save_freq_unknown_error (line 60) | def test_save_freq_unknown_error(self): method test_best_case_step (line 72) | def test_best_case_step(self): method test_best_case_epoch (line 112) | def test_best_case_epoch(self): method test_backup_corrupted (line 153) | def test_backup_corrupted(self): method test_model_deleted_case_epoch (line 201) | def test_model_deleted_case_epoch(self): method test_backup_dir_empty_error (line 221) | def test_backup_dir_empty_error(self): method test_backup_dir_none_error (line 227) | def test_backup_dir_none_error(self): FILE: keras/src/callbacks/callback.py class Callback (line 7) | class Callback: method __init__ (line 67) | def __init__(self): method set_params (line 71) | def set_params(self, params): method set_model (line 74) | def set_model(self, model): method model (line 78) | def model(self): method on_batch_begin (line 103) | def on_batch_begin(self, batch, logs=None): method on_batch_end (line 107) | def on_batch_end(self, batch, logs=None): method on_epoch_begin (line 111) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 124) | def on_epoch_end(self, epoch, logs=None): method on_train_batch_begin (line 140) | def on_train_batch_begin(self, batch, logs=None): method on_train_batch_end (line 158) | def on_train_batch_end(self, batch, logs=None): method on_test_batch_begin (line 175) | def on_test_batch_begin(self, batch, logs=None): method on_test_batch_end (line 194) | def on_test_batch_end(self, batch, logs=None): method on_predict_batch_begin (line 212) | def on_predict_batch_begin(self, batch, logs=None): method on_predict_batch_end (line 228) | def on_predict_batch_end(self, batch, logs=None): method on_train_begin (line 243) | def on_train_begin(self, logs=None): method on_train_end (line 254) | def on_train_end(self, logs=None): method on_test_begin (line 266) | def on_test_begin(self, logs=None): method on_test_end (line 277) | def on_test_end(self, logs=None): method on_predict_begin (line 289) | def on_predict_begin(self, logs=None): method on_predict_end (line 300) | def on_predict_end(self, logs=None): FILE: keras/src/callbacks/callback_list.py class CallbackList (line 14) | class CallbackList(Callback): method __init__ (line 17) | def __init__( method set_params (line 53) | def set_params(self, params): method _configure_async_dispatch (line 59) | def _configure_async_dispatch(self, callbacks): method _add_default_callbacks (line 86) | def _add_default_callbacks(self, add_history, add_progbar): method set_model (line 105) | def set_model(self, model): method _on_begin (line 114) | def _on_begin(self): method _on_end (line 127) | def _on_end(self): method _async_dispatch (line 141) | def _async_dispatch(self, fn, *args): method _flush_futures (line 149) | def _flush_futures(self): method on_batch_begin (line 155) | def on_batch_begin(self, batch, logs=None): method on_epoch_begin (line 160) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 165) | def on_epoch_end(self, epoch, logs=None): method on_train_batch_begin (line 173) | def on_train_batch_begin(self, batch, logs=None): method on_test_batch_begin (line 178) | def on_test_batch_begin(self, batch, logs=None): method on_predict_batch_begin (line 183) | def on_predict_batch_begin(self, batch, logs=None): method on_batch_end (line 188) | def on_batch_end(self, batch, logs=None): method on_train_batch_end (line 194) | def on_train_batch_end(self, batch, logs=None): method on_test_batch_end (line 200) | def on_test_batch_end(self, batch, logs=None): method on_predict_batch_end (line 206) | def on_predict_batch_end(self, batch, logs=None): method _on_batch_end (line 212) | def _on_batch_end(self, batch, logs=None): method _on_train_batch_end (line 217) | def _on_train_batch_end(self, batch, logs=None): method _on_test_batch_end (line 222) | def _on_test_batch_end(self, batch, logs=None): method _on_predict_batch_end (line 227) | def _on_predict_batch_end(self, batch, logs=None): method on_train_begin (line 232) | def on_train_begin(self, logs=None): method on_train_end (line 239) | def on_train_end(self, logs=None): method on_test_begin (line 249) | def on_test_begin(self, logs=None): method on_test_end (line 256) | def on_test_end(self, logs=None): method on_predict_begin (line 266) | def on_predict_begin(self, logs=None): method on_predict_end (line 273) | def on_predict_end(self, logs=None): FILE: keras/src/callbacks/callback_test.py class CallbackTest (line 9) | class CallbackTest(testing.TestCase): method test_model_state_is_current_on_epoch_end (line 11) | def test_model_state_is_current_on_epoch_end(self): FILE: keras/src/callbacks/csv_logger.py class CSVLogger (line 12) | class CSVLogger(Callback): method __init__ (line 32) | def __init__(self, filename, separator=",", append=False): method on_train_begin (line 42) | def on_train_begin(self, logs=None): method on_epoch_end (line 58) | def on_epoch_end(self, epoch, logs=None): method on_train_end (line 104) | def on_train_end(self, logs=None): FILE: keras/src/callbacks/csv_logger_test.py class CSVLoggerTest (line 22) | class CSVLoggerTest(testing.TestCase): method test_CSVLogger (line 24) | def test_CSVLogger(self): method test_stop_training_csv (line 132) | def test_stop_training_csv(self): FILE: keras/src/callbacks/early_stopping.py class EarlyStopping (line 9) | class EarlyStopping(MonitorCallback): method __init__ (line 66) | def __init__( method on_train_begin (line 87) | def on_train_begin(self, logs=None): method on_epoch_end (line 94) | def on_epoch_end(self, epoch, logs=None): method on_train_end (line 128) | def on_train_end(self, logs=None): method get_monitor_value (line 142) | def get_monitor_value(self, logs): FILE: keras/src/callbacks/early_stopping_test.py class EarlyStoppingTest (line 12) | class EarlyStoppingTest(testing.TestCase): method test_early_stopping (line 14) | def test_early_stopping(self): method test_early_stopping_patience (line 84) | def test_early_stopping_patience(self): method test_early_stopping_reuse (line 102) | def test_early_stopping_reuse(self): method test_early_stopping_with_baseline (line 130) | def test_early_stopping_with_baseline(self): method test_early_stopping_final_weights_when_restoring_model_weights (line 151) | def test_early_stopping_final_weights_when_restoring_model_weights(self): method test_early_stopping_with_start_from_epoch (line 236) | def test_early_stopping_with_start_from_epoch(self): FILE: keras/src/callbacks/history.py class History (line 6) | class History(Callback): method __init__ (line 27) | def __init__(self): method on_train_begin (line 31) | def on_train_begin(self, logs=None): method on_epoch_end (line 34) | def on_epoch_end(self, epoch, logs=None): FILE: keras/src/callbacks/lambda_callback.py class LambdaCallback (line 6) | class LambdaCallback(Callback): method __init__ (line 64) | def __init__( FILE: keras/src/callbacks/lambda_callback_test.py class LambdaCallbackTest (line 13) | class LambdaCallbackTest(testing.TestCase): method test_lambda_callback (line 15) | def test_lambda_callback(self): method test_lambda_callback_with_batches (line 50) | def test_lambda_callback_with_batches(self): method test_lambda_callback_with_kwargs (line 87) | def test_lambda_callback_with_kwargs(self): method test_lambda_callback_no_args (line 124) | def test_lambda_callback_no_args(self): method test_lambda_callback_with_additional_kwargs (line 130) | def test_lambda_callback_with_additional_kwargs(self): method test_lambda_callback_during_prediction (line 142) | def test_lambda_callback_during_prediction(self): FILE: keras/src/callbacks/learning_rate_scheduler.py class LearningRateScheduler (line 10) | class LearningRateScheduler(Callback): method __init__ (line 47) | def __init__(self, schedule, verbose=0): method on_epoch_begin (line 52) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 77) | def on_epoch_end(self, epoch, logs=None): FILE: keras/src/callbacks/learning_rate_scheduler_test.py class LearningRateSchedulerTest (line 13) | class LearningRateSchedulerTest(testing.TestCase): method setUp (line 14) | def setUp(self): method test_updates_learning_rate (line 35) | def test_updates_learning_rate(self): method test_verbose_logging (line 50) | def test_verbose_logging(self): method test_schedule_dependent_on_previous_learning_rate (line 68) | def test_schedule_dependent_on_previous_learning_rate(self): method test_throws_when_optimizer_has_schedule (line 88) | def test_throws_when_optimizer_has_schedule(self): method test_learning_rate_in_history (line 112) | def test_learning_rate_in_history(self): FILE: keras/src/callbacks/model_checkpoint.py class ModelCheckpoint (line 15) | class ModelCheckpoint(MonitorCallback): method __init__ (line 179) | def __init__( method on_train_batch_end (line 223) | def on_train_batch_end(self, batch, logs=None): method on_epoch_begin (line 227) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 230) | def on_epoch_end(self, epoch, logs=None): method _should_save_on_batch (line 238) | def _should_save_on_batch(self, batch): method _should_save_model (line 255) | def _should_save_model(self, epoch, batch, logs, filepath): method _save_model (line 317) | def _save_model(self, epoch, batch, logs): method _get_file_path (line 362) | def _get_file_path(self, epoch, batch, logs): method _checkpoint_exists (line 383) | def _checkpoint_exists(self, filepath): method _get_most_recently_modified_file_matching_pattern (line 387) | def _get_most_recently_modified_file_matching_pattern(self, pattern): FILE: keras/src/callbacks/model_checkpoint_test.py class ModelCheckpointTest (line 29) | class ModelCheckpointTest(testing.TestCase): method test_model_checkpoint_options (line 39) | def test_model_checkpoint_options(self): method test_model_checkpoint_loading (line 492) | def test_model_checkpoint_loading(self): FILE: keras/src/callbacks/monitor_callback.py class MonitorCallback (line 8) | class MonitorCallback(Callback): method __init__ (line 41) | def __init__( method _set_monitor_op (line 62) | def _set_monitor_op(self): method _is_improvement (line 101) | def _is_improvement(self, monitor_value, reference_value): FILE: keras/src/callbacks/monitor_callback_test.py class MonitorCallbackTest (line 12) | class MonitorCallbackTest(testing.TestCase): method test_monitor_op_logic (line 14) | def test_monitor_op_logic(self): method test_min_delta (line 80) | def test_min_delta(self): FILE: keras/src/callbacks/orbax_checkpoint.py function _get_state_tree (line 27) | def _get_state_tree(model): class OrbaxCheckpoint (line 58) | class OrbaxCheckpoint(MonitorCallback): method __init__ (line 110) | def __init__( method set_model (line 183) | def set_model(self, model): method _is_multihost_initialized (line 189) | def _is_multihost_initialized(self): method _sync_processes (line 200) | def _sync_processes(self, key=None): method is_multihost_enabled (line 209) | def is_multihost_enabled(self): method is_primary_host (line 221) | def is_primary_host(self): method _should_save_on_batch (line 237) | def _should_save_on_batch(self, batch): method _save_checkpoint (line 256) | def _save_checkpoint(self, step, logs=None): method on_train_batch_end (line 301) | def on_train_batch_end(self, batch, logs=None): method on_epoch_end (line 325) | def on_epoch_end(self, epoch, logs=None): method on_train_end (line 352) | def on_train_end(self, logs=None): method wait_until_finished (line 363) | def wait_until_finished(self): FILE: keras/src/callbacks/orbax_checkpoint_test.py class OrbaxCheckpointTest (line 24) | class OrbaxCheckpointTest(testing.TestCase, parameterized.TestCase): method _create_test_model (line 25) | def _create_test_model(self, steps_per_execution=1): method _create_dummy_data (line 38) | def _create_dummy_data(self, num_samples=100): method _setup_distributed_test (line 51) | def _setup_distributed_test(self): method _build_distributed_model (line 82) | def _build_distributed_model(self, dense_units, out_units): method _make_layout_map (line 91) | def _make_layout_map(self, device_mesh, *layer_names): method test_checkpoint_saving_basic (line 109) | def test_checkpoint_saving_basic(self, save_freq, epochs, batch_size): method test_save_best_only (line 138) | def test_save_best_only(self, mode, monitor): method test_async_vs_sync_saving (line 166) | def test_async_vs_sync_saving(self, save_on_background): method test_max_to_keep (line 188) | def test_max_to_keep(self): method test_load_weights_from_orbax_checkpoint (line 206) | def test_load_weights_from_orbax_checkpoint(self): method test_save_freq_epoch (line 255) | def test_save_freq_epoch(self): method test_invalid_save_freq (line 291) | def test_invalid_save_freq(self): method test_initial_value_threshold (line 298) | def test_initial_value_threshold(self): method test_checkpoint_loading_comprehensive (line 321) | def test_checkpoint_loading_comprehensive(self, save_on_background): method test_distributed_checkpoint_functionality (line 364) | def test_distributed_checkpoint_functionality(self): method test_distributed_checkpoint_resharding (line 449) | def test_distributed_checkpoint_resharding(self): method test_checkpoint_loading_via_saving_api (line 514) | def test_checkpoint_loading_via_saving_api(self): method test_comprehensive_model_state_restoration (line 552) | def test_comprehensive_model_state_restoration(self, save_on_background): method test_checkpoint_with_assets (line 633) | def test_checkpoint_with_assets(self, save_on_background): method test_training_resumption (line 696) | def test_training_resumption(self, steps_per_execution): FILE: keras/src/callbacks/progbar_logger.py class ProgbarLogger (line 8) | class ProgbarLogger(Callback): method __init__ (line 20) | def __init__(self): method set_params (line 30) | def set_params(self, params): method on_train_begin (line 38) | def on_train_begin(self, logs=None): method on_test_begin (line 42) | def on_test_begin(self, logs=None): method on_predict_begin (line 47) | def on_predict_begin(self, logs=None): method on_epoch_begin (line 51) | def on_epoch_begin(self, epoch, logs=None): method on_train_batch_end (line 57) | def on_train_batch_end(self, batch, logs=None): method on_test_batch_end (line 60) | def on_test_batch_end(self, batch, logs=None): method on_predict_batch_end (line 64) | def on_predict_batch_end(self, batch, logs=None): method on_epoch_end (line 68) | def on_epoch_end(self, epoch, logs=None): method on_test_end (line 71) | def on_test_end(self, logs=None): method on_predict_end (line 75) | def on_predict_end(self, logs=None): method _reset_progbar (line 78) | def _reset_progbar(self): method _maybe_init_progbar (line 82) | def _maybe_init_progbar(self): method _update_progbar (line 88) | def _update_progbar(self, batch, logs=None): method _finalize_progbar (line 97) | def _finalize_progbar(self, logs): FILE: keras/src/callbacks/reduce_lr_on_plateau.py class ReduceLROnPlateau (line 12) | class ReduceLROnPlateau(MonitorCallback): method __init__ (line 48) | def __init__( method _reset (line 75) | def _reset(self): method on_train_begin (line 80) | def on_train_begin(self, logs=None): method on_epoch_end (line 83) | def on_epoch_end(self, epoch, logs=None): method in_cooldown (line 129) | def in_cooldown(self): FILE: keras/src/callbacks/reduce_lr_on_plateau_test.py class ReduceLROnPlateauTest (line 13) | class ReduceLROnPlateauTest(testing.TestCase): method setUp (line 14) | def setUp(self): method test_reduces_lr_with_model_fit (line 38) | def test_reduces_lr_with_model_fit(self): method test_throws_when_optimizer_has_schedule (line 54) | def test_throws_when_optimizer_has_schedule(self): method test_verbose_logging (line 81) | def test_verbose_logging(self): method test_honors_min_lr (line 100) | def test_honors_min_lr(self): method test_cooldown (line 120) | def test_cooldown(self): FILE: keras/src/callbacks/remote_monitor.py class RemoteMonitor (line 16) | class RemoteMonitor(Callback): method __init__ (line 38) | def __init__( method on_epoch_end (line 54) | def on_epoch_end(self, epoch, logs=None): FILE: keras/src/callbacks/remote_monitor_test.py class TerminateOnNaNTest (line 20) | class TerminateOnNaNTest(testing.TestCase): method test_RemoteMonitor (line 21) | def test_RemoteMonitor(self): method test_RemoteMonitor_np_array (line 33) | def test_RemoteMonitor_np_array(self): method test_RemoteMonitor_np_float32 (line 47) | def test_RemoteMonitor_np_float32(self): method test_RemoteMonitorWithJsonPayload (line 64) | def test_RemoteMonitorWithJsonPayload(self): FILE: keras/src/callbacks/swap_ema_weights.py class SwapEMAWeights (line 8) | class SwapEMAWeights(Callback): method __init__ (line 49) | def __init__(self, swap_on_epoch=False): method _tf_swap_variables (line 55) | def _tf_swap_variables(self, optimizer): method _backend_swap_variables (line 81) | def _backend_swap_variables(self, optimizer): method _tf_finalize_ema_values (line 90) | def _tf_finalize_ema_values(self, optimizer): method _backend_finalize_ema_values (line 105) | def _backend_finalize_ema_values(self, optimizer): method _swap_variables (line 112) | def _swap_variables(self): method _finalize_ema_values (line 129) | def _finalize_ema_values(self): method on_epoch_begin (line 146) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 151) | def on_epoch_end(self, epoch, logs=None): method on_test_begin (line 162) | def on_test_begin(self, logs=None): method on_test_end (line 167) | def on_test_end(self, logs=None): method on_predict_begin (line 172) | def on_predict_begin(self, logs=None): method on_predict_end (line 177) | def on_predict_end(self, logs=None): FILE: keras/src/callbacks/swap_ema_weights_test.py class SwapEMAWeightsTest (line 21) | class SwapEMAWeightsTest(testing.TestCase): method setUp (line 22) | def setUp(self): method _get_compiled_model (line 35) | def _get_compiled_model( method test_swap_ema_weights_with_invalid_optimizer (line 53) | def test_swap_ema_weights_with_invalid_optimizer(self): method test_swap_ema_weights (line 68) | def test_swap_ema_weights(self): method test_swap_ema_weights_on_epoch (line 101) | def test_swap_ema_weights_on_epoch(self): method test_swap_ema_weights_with_loss_scale_optimizer (line 128) | def test_swap_ema_weights_with_loss_scale_optimizer(self): method test_swap_ema_weights_with_tf_distribute (line 148) | def test_swap_ema_weights_with_tf_distribute(self): FILE: keras/src/callbacks/tensorboard.py class TensorBoard (line 18) | class TensorBoard(Callback): method __init__ (line 156) | def __init__( method set_model (line 210) | def set_model(self, model): method summary (line 227) | def summary(self): method _train_writer (line 235) | def _train_writer(self): method _val_writer (line 243) | def _val_writer(self): method _write_keras_model_train_graph (line 250) | def _write_keras_model_train_graph(self): method _write_keras_model_summary (line 265) | def _write_keras_model_summary(self): method _configure_embeddings (line 274) | def _configure_embeddings(self): method _push_writer (line 313) | def _push_writer(self, writer, step): method _pop_writer (line 329) | def _pop_writer(self): method _close_writers (line 340) | def _close_writers(self): method _init_profile_batch (line 344) | def _init_profile_batch(self, profile_batch): method on_train_begin (line 406) | def on_train_begin(self, logs=None): method on_train_end (line 411) | def on_train_end(self, logs=None): method on_test_begin (line 419) | def on_test_begin(self, logs=None): method on_test_end (line 422) | def on_test_end(self, logs=None): method on_train_batch_begin (line 433) | def on_train_batch_begin(self, batch, logs=None): method on_train_batch_end (line 447) | def on_train_batch_end(self, batch, logs=None): method on_test_batch_begin (line 476) | def on_test_batch_begin(self, batch, logs=None): method on_epoch_begin (line 479) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 487) | def on_epoch_end(self, epoch, logs=None): method _start_trace (line 497) | def _start_trace(self): method _stop_trace (line 502) | def _stop_trace(self, batch=None): method _collect_learning_rate (line 512) | def _collect_learning_rate(self, logs): method _compute_steps_per_second (line 519) | def _compute_steps_per_second(self): method _log_epoch_metrics (line 532) | def _log_epoch_metrics(self, epoch, logs): method _log_weights (line 558) | def _log_weights(self, epoch): method _log_weight_as_image (line 578) | def _log_weight_as_image(self, weight, weight_name, epoch): method _log_embeddings (line 603) | def _log_embeddings(self, epoch): method _start_profiler (line 611) | def _start_profiler(self, logdir): method _stop_profiler (line 626) | def _stop_profiler(self, save=True): function keras_model_summary (line 643) | def keras_model_summary(name, data, step=None): FILE: keras/src/callbacks/tensorboard_test.py class _SummaryIterator (line 32) | class _SummaryIterator: method __init__ (line 35) | def __init__(self, path): method __iter__ (line 38) | def __iter__(self): method __next__ (line 41) | def __next__(self): class _SummaryFile (line 48) | class _SummaryFile: method __init__ (line 55) | def __init__(self): function list_summaries (line 64) | def list_summaries(logdir): class TestTensorBoardV2 (line 126) | class TestTensorBoardV2(testing.TestCase): method _get_log_dirs (line 127) | def _get_log_dirs(self): method _get_model (line 135) | def _get_model(self, compile_model=True): method test_TensorBoard_basic (line 148) | def test_TensorBoard_basic(self): method test_TensorBoard_across_invocations (line 178) | def test_TensorBoard_across_invocations(self): method test_TensorBoard_no_spurious_event_files (line 210) | def test_TensorBoard_no_spurious_event_files(self): method test_TensorBoard_batch_metrics (line 224) | def test_TensorBoard_batch_metrics(self): method test_TensorBoard_learning_rate_schedules (line 255) | def test_TensorBoard_learning_rate_schedules(self): method test_TensorBoard_global_step (line 280) | def test_TensorBoard_global_step(self): method test_TensorBoard_weight_histograms (line 320) | def test_TensorBoard_weight_histograms(self): method test_TensorBoard_weight_images (line 354) | def test_TensorBoard_weight_images(self): method test_TensorBoard_projector_callback (line 413) | def test_TensorBoard_projector_callback(self): method test_custom_summary (line 455) | def test_custom_summary(self): method _strip_to_only_final_name (line 543) | def _strip_to_only_final_name(self, summaries): method _strip_layer_names (line 563) | def _strip_layer_names(self, summaries, model_type): method _strip_variable_names (line 585) | def _strip_variable_names(self, summaries): method test_TensorBoard_non_blocking (line 615) | def test_TensorBoard_non_blocking(self): method _count_xplane_file (line 652) | def _count_xplane_file(self, logdir): method fitModelAndAssertKerasModelWritten (line 663) | def fitModelAndAssertKerasModelWritten(self, model): method test_TensorBoard_write_sequential_model_no_input_shape (line 695) | def test_TensorBoard_write_sequential_model_no_input_shape(self): method test_TensorBoard_write_sequential_model_with_input_shape (line 708) | def test_TensorBoard_write_sequential_model_with_input_shape(self): method test_TensorBoard_write_model (line 722) | def test_TensorBoard_write_model(self): method test_TensorBoard_auto_trace (line 741) | def test_TensorBoard_auto_trace(self): FILE: keras/src/callbacks/terminate_on_nan.py class TerminateOnNaN (line 9) | class TerminateOnNaN(Callback): method __init__ (line 42) | def __init__(self, raise_error: bool = False): method on_batch_end (line 46) | def on_batch_end(self, batch, logs=None): FILE: keras/src/callbacks/terminate_on_nan_test.py class TerminateOnNaNTest (line 19) | class TerminateOnNaNTest(testing.TestCase): method test_TerminateOnNaN (line 22) | def test_TerminateOnNaN(self): method test_terminate_on_nan_graceful_stop (line 62) | def test_terminate_on_nan_graceful_stop(self): method test_terminate_on_nan_raise_error_raises_error (line 80) | def test_terminate_on_nan_raise_error_raises_error(self): method test_raise_error_terminate_does_not_trigger_on_train_end (line 101) | def test_raise_error_terminate_does_not_trigger_on_train_end(self): method test_raise_error_terminate_preserves_backup (line 136) | def test_raise_error_terminate_preserves_backup(self): method test_normal_training_does_not_raise (line 184) | def test_normal_training_does_not_raise(self, raise_error): method test_raise_error_terminate_stops_on_later_batch (line 200) | def test_raise_error_terminate_stops_on_later_batch(self): FILE: keras/src/constraints/__init__.py function serialize (line 27) | def serialize(constraint): function deserialize (line 32) | def deserialize(config, custom_objects=None): function get (line 42) | def get(identifier): FILE: keras/src/constraints/constraints.py class Constraint (line 7) | class Constraint: method __call__ (line 33) | def __call__(self, w): method get_config (line 48) | def get_config(self): method from_config (line 60) | def from_config(cls, config): class MaxNorm (line 81) | class MaxNorm(Constraint): method __init__ (line 105) | def __init__(self, max_value=2, axis=0): method __call__ (line 109) | def __call__(self, w): method get_config (line 117) | def get_config(self): class NonNeg (line 122) | class NonNeg(Constraint): method __call__ (line 125) | def __call__(self, w): class UnitNorm (line 131) | class UnitNorm(Constraint): method __init__ (line 148) | def __init__(self, axis=0): method __call__ (line 151) | def __call__(self, w): method get_config (line 156) | def get_config(self): class MinMaxNorm (line 163) | class MinMaxNorm(Constraint): method __init__ (line 192) | def __init__(self, min_value=0.0, max_value=1.0, rate=1.0, axis=0): method __call__ (line 198) | def __call__(self, w): method get_config (line 209) | def get_config(self): FILE: keras/src/constraints/constraints_test.py function get_example_array (line 8) | def get_example_array(): class ConstraintsTest (line 15) | class ConstraintsTest(testing.TestCase): method test_max_norm (line 16) | def test_max_norm(self): method test_non_neg (line 30) | def test_non_neg(self): method test_unit_norm (line 36) | def test_unit_norm(self): method test_min_max_norm (line 43) | def test_min_max_norm(self): method test_get_method (line 51) | def test_get_method(self): method test_default_constraint_call (line 61) | def test_default_constraint_call(self): method test_constraint_get_config (line 67) | def test_constraint_get_config(self): method test_constraint_from_config (line 72) | def test_constraint_from_config(self): method test_max_norm_get_config (line 78) | def test_max_norm_get_config(self): method test_unit_norm_get_config (line 84) | def test_unit_norm_get_config(self): method test_min_max_norm_get_config (line 90) | def test_min_max_norm_get_config(self): FILE: keras/src/datasets/boston_housing.py function load_data (line 8) | def load_data(path="boston_housing.npz", test_split=0.2, seed=113): FILE: keras/src/datasets/california_housing.py function load_data (line 10) | def load_data( FILE: keras/src/datasets/cifar.py function load_batch (line 6) | def load_batch(fpath, label_key="labels"): FILE: keras/src/datasets/cifar10.py function load_data (line 14) | def load_data(): FILE: keras/src/datasets/cifar100.py function load_data (line 14) | def load_data(label_mode="fine"): FILE: keras/src/datasets/fashion_mnist.py function load_data (line 13) | def load_data(): FILE: keras/src/datasets/imdb.py function load_data (line 13) | def load_data( function get_word_index (line 144) | def get_word_index(path="imdb_word_index.json"): FILE: keras/src/datasets/mnist.py function load_data (line 10) | def load_data(path="mnist.npz"): FILE: keras/src/datasets/reuters.py function load_data (line 13) | def load_data( function get_word_index (line 137) | def get_word_index(path="reuters_word_index.json"): function get_label_names (line 167) | def get_label_names(): FILE: keras/src/distillation/distillation_loss.py function _convert_loss_to_function (line 8) | def _convert_loss_to_function(loss_item): class DistillationLoss (line 33) | class DistillationLoss: method compute_loss (line 45) | def compute_loss(self, teacher_outputs, student_outputs, **kwargs): method validate_outputs (line 62) | def validate_outputs(self, teacher_outputs, student_outputs): method validate_model_compatibility (line 73) | def validate_model_compatibility(self, teacher, student): class FeatureDistillation (line 87) | class FeatureDistillation(DistillationLoss): method __init__ (line 146) | def __init__( method validate_model_compatibility (line 160) | def validate_model_compatibility(self, teacher, student): method validate_outputs (line 204) | def validate_outputs(self, teacher_outputs, student_outputs): method compute_loss (line 218) | def compute_loss(self, teacher_outputs, student_outputs, **kwargs): method get_config (line 244) | def get_config(self): method from_config (line 253) | def from_config(cls, config): class LogitsDistillation (line 261) | class LogitsDistillation(DistillationLoss): method __init__ (line 314) | def __init__( method compute_loss (line 333) | def compute_loss(self, teacher_outputs, student_outputs, **kwargs): method get_config (line 378) | def get_config(self): method from_config (line 386) | def from_config(cls, config): FILE: keras/src/distillation/distillation_loss_test.py class TestLogitsDistillation (line 12) | class TestLogitsDistillation(TestCase): method test_logits_distillation_basic (line 15) | def test_logits_distillation_basic(self): class TestFeatureDistillation (line 35) | class TestFeatureDistillation(TestCase): method test_feature_distillation_basic (line 38) | def test_feature_distillation_basic(self): class TestEndToEndDistillation (line 58) | class TestEndToEndDistillation(TestCase): method setUp (line 61) | def setUp(self): method test_logits_distillation_end_to_end (line 97) | def test_logits_distillation_end_to_end(self): method test_feature_distillation_end_to_end (line 135) | def test_feature_distillation_end_to_end(self): method test_multi_distillation_loss_distillation_end_to_end (line 176) | def test_multi_distillation_loss_distillation_end_to_end(self): FILE: keras/src/distillation/distiller.py class Distiller (line 10) | class Distiller(Model): method __init__ (line 96) | def __init__( method _validate_models (line 175) | def _validate_models(self, teacher, student): method _assert_shapes_are_compatible (line 190) | def _assert_shapes_are_compatible(self, shape1, shape2, context): method _assert_same_dtype (line 206) | def _assert_same_dtype(self, teacher_dtype, student_dtype, context): method _validate_input_compatibility (line 214) | def _validate_input_compatibility(self, teacher, student): method _validate_output_compatibility (line 231) | def _validate_output_compatibility(self, teacher, student): method _validate_dtype_compatibility (line 248) | def _validate_dtype_compatibility(self, teacher, student): method _validate_distillation_loss_compatibility (line 274) | def _validate_distillation_loss_compatibility( method _create_multi_feature_extractors (line 281) | def _create_multi_feature_extractors(self): method _create_feature_extractor (line 317) | def _create_feature_extractor(self, model, layer_names): method _extract_all_teacher_features (line 355) | def _extract_all_teacher_features(self, x): method _extract_all_student_features (line 362) | def _extract_all_student_features(self, x, y_pred): method _get_distillation_loss_features (line 369) | def _get_distillation_loss_features( method compile (line 386) | def compile(self, optimizer="adam", loss=None, metrics=None, **kwargs): method call (line 414) | def call(self, inputs, training=None, **kwargs): method compute_loss (line 418) | def compute_loss( method reset_metrics (line 553) | def reset_metrics(self): method get_config (line 560) | def get_config(self): method from_config (line 582) | def from_config(cls, config): FILE: keras/src/distillation/distiller_test.py class SimpleTeacher (line 13) | class SimpleTeacher(keras.Model): method __init__ (line 16) | def __init__(self, vocab_size=10, hidden_dim=32): method call (line 21) | def call(self, inputs, training=None): class SimpleStudent (line 26) | class SimpleStudent(keras.Model): method __init__ (line 29) | def __init__(self, vocab_size=10, hidden_dim=16): method call (line 34) | def call(self, inputs, training=None): class TestDistiller (line 40) | class TestDistiller(TestCase): method setUp (line 43) | def setUp(self): method test_distiller_initialization (line 78) | def test_distiller_initialization(self): method test_distiller_call (line 109) | def test_distiller_call(self): method test_teacher_freezing (line 122) | def test_teacher_freezing(self): method test_model_compatibility_validation (line 145) | def test_model_compatibility_validation(self): method test_multi_distillation_loss_functionality (line 162) | def test_multi_distillation_loss_functionality(self): method test_multi_distillation_loss_validation (line 201) | def test_multi_distillation_loss_validation(self): method test_student_loss_weighting (line 228) | def test_student_loss_weighting(self): method test_full_training_workflow (line 270) | def test_full_training_workflow(self): method test_evaluation_workflow (line 347) | def test_evaluation_workflow(self): method test_prediction_workflow (line 392) | def test_prediction_workflow(self): method test_distiller_serialization_and_saving (line 428) | def test_distiller_serialization_and_saving(self): FILE: keras/src/distribution/distribution_lib.py function list_devices (line 21) | def list_devices(device_type=None): function get_device_count (line 45) | def get_device_count(device_type=None): function initialize (line 64) | def initialize(job_addresses=None, num_processes=None, process_id=None): class DeviceMesh (line 154) | class DeviceMesh: method __init__ (line 176) | def __init__( method shape (line 208) | def shape(self): method axis_names (line 212) | def axis_names(self): method devices (line 216) | def devices(self): method backend_mesh (line 220) | def backend_mesh(self): method __repr__ (line 225) | def __repr__(self): method __str__ (line 231) | def __str__(self): class TensorLayout (line 236) | class TensorLayout: method __init__ (line 253) | def __init__(self, axes, device_mesh=None): method axes (line 259) | def axes(self): method device_mesh (line 263) | def device_mesh(self): method device_mesh (line 267) | def device_mesh(self, device_mesh): method backend_layout (line 277) | def backend_layout(self): method _validate_axes (line 282) | def _validate_axes(self): method __repr__ (line 292) | def __repr__(self): method __str__ (line 298) | def __str__(self): class Distribution (line 302) | class Distribution: method __init__ (line 323) | def __init__( method get_data_layout (line 330) | def get_data_layout(self, data_shape): method get_variable_layout (line 342) | def get_variable_layout(self, variable): method get_tensor_layout (line 354) | def get_tensor_layout(self, path): method scope (line 368) | def scope(self): method device_mesh (line 378) | def device_mesh(self): method batch_dim_name (line 382) | def batch_dim_name(self): method auto_shard_dataset (line 386) | def auto_shard_dataset(self): method auto_shard_dataset (line 390) | def auto_shard_dataset(self, auto_shard_dataset): method distribute_dataset (line 393) | def distribute_dataset(self, dataset): method __repr__ (line 410) | def __repr__(self): method __str__ (line 413) | def __str__(self): class DataParallel (line 418) | class DataParallel(Distribution): method __init__ (line 444) | def __init__(self, device_mesh=None, devices=None, auto_shard_dataset=... method _initialize_with_device_mesh (line 457) | def _initialize_with_device_mesh(self, device_mesh, auto_shard_dataset): method _initialize_mesh_from_devices (line 474) | def _initialize_mesh_from_devices(self, devices, auto_shard_dataset): method _initialize_mesh_from_list_devices (line 485) | def _initialize_mesh_from_list_devices(self, auto_shard_dataset): method get_data_layout (line 496) | def get_data_layout(self, data_shape): method get_variable_layout (line 501) | def get_variable_layout(self, variable): method get_tensor_layout (line 509) | def get_tensor_layout(self, path): method distribute_dataset (line 513) | def distribute_dataset(self, dataset): class ModelParallel (line 554) | class ModelParallel(Distribution): method __init__ (line 639) | def __init__( method get_data_layout (line 665) | def get_data_layout(self, data_shape): method get_variable_layout (line 670) | def get_variable_layout(self, variable): method get_tensor_layout (line 681) | def get_tensor_layout(self, path): method distribute_dataset (line 684) | def distribute_dataset(self, dataset): class LayoutMap (line 762) | class LayoutMap(collections.abc.MutableMapping): method __init__ (line 801) | def __init__(self, device_mesh): method __getitem__ (line 805) | def __getitem__(self, key): method __setitem__ (line 838) | def __setitem__(self, key, layout): method __delitem__ (line 862) | def __delitem__(self, key): method __len__ (line 866) | def __len__(self): method __iter__ (line 869) | def __iter__(self): method device_mesh (line 873) | def device_mesh(self): method _maybe_populate_device_mesh (line 876) | def _maybe_populate_device_mesh(self, layout): function distribute_tensor (line 885) | def distribute_tensor(tensor, layout): function distribution (line 903) | def distribution(): function set_distribution (line 909) | def set_distribution(value): FILE: keras/src/distribution/distribution_lib_test.py class MultiProcessInitializeTest (line 25) | class MultiProcessInitializeTest(testing.TestCase): method tearDown (line 26) | def tearDown(self): method test_initialize_with_explicit_param (line 30) | def test_initialize_with_explicit_param(self, mock_backend_initialize): method test_initialize_with_env_vars (line 43) | def test_initialize_with_env_vars(self, mock_backend_initialize): method test_init_with_nones (line 56) | def test_init_with_nones(self, mock_backend_initialize): class DeviceMeshTest (line 62) | class DeviceMeshTest(testing.TestCase): method test_mesh_creation (line 63) | def test_mesh_creation(self): method test_input_validation (line 73) | def test_input_validation(self): class TensorLayoutTest (line 91) | class TensorLayoutTest(testing.TestCase): method setUp (line 92) | def setUp(self): method test_tensor_layout_creation (line 97) | def test_tensor_layout_creation(self): method test_tensor_layout_validation (line 104) | def test_tensor_layout_validation(self): method test_lazy_device_mesh_injection (line 111) | def test_lazy_device_mesh_injection(self): method test_lazy_device_mesh_validation (line 123) | def test_lazy_device_mesh_validation(self): class DistributionTest (line 136) | class DistributionTest(testing.TestCase): method setUp (line 137) | def setUp(self): method test_init_with_device_mesh (line 147) | def test_init_with_device_mesh(self): method test_scope (line 151) | def test_scope(self): class DataParallelDistributionTest (line 170) | class DataParallelDistributionTest(testing.TestCase): method setUp (line 171) | def setUp(self): method test_create_with_device_mesh (line 181) | def test_create_with_device_mesh(self): method test_create_with_devices (line 195) | def test_create_with_devices(self): method test_create_with_list_devices (line 207) | def test_create_with_list_devices(self, mock_list_devices): method test_get_data_layout (line 216) | def test_get_data_layout(self): method test_get_variable_layout (line 227) | def test_get_variable_layout(self): method test_get_variable_layout_with_explicit_layout (line 238) | def test_get_variable_layout_with_explicit_layout(self): method test_get_tensor_layout (line 252) | def test_get_tensor_layout(self): method test_distribute_dataset (line 261) | def test_distribute_dataset(self): class ModelParallelDistributionTest (line 275) | class ModelParallelDistributionTest(testing.TestCase): method setUp (line 276) | def setUp(self): method test_distribute_weights (line 287) | def test_distribute_weights(self): method test_distribute_data (line 311) | def test_distribute_data(self): method test_get_tensor_layout (line 322) | def test_get_tensor_layout(self): method test_get_variable_layout_with_explicit_layout (line 339) | def test_get_variable_layout_with_explicit_layout(self): method test_distribute_dataset (line 354) | def test_distribute_dataset(self): class LayoutMapTest (line 365) | class LayoutMapTest(testing.TestCase): method setUp (line 366) | def setUp(self): method test_add (line 381) | def test_add(self): method test_get (line 410) | def test_get(self): method test_delete (line 434) | def test_delete(self): method test_len (line 450) | def test_len(self): method test_iter (line 459) | def test_iter(self): FILE: keras/src/dtype_policies/__init__.py function serialize (line 28) | def serialize(dtype_policy): function deserialize (line 43) | def deserialize(config, custom_objects=None): function get (line 65) | def get(identifier): FILE: keras/src/dtype_policies/dtype_policy.py class DTypePolicy (line 17) | class DTypePolicy: method __init__ (line 60) | def __init__(self, name=None): method _parse_name (line 68) | def _parse_name(self, name): method variable_dtype (line 98) | def variable_dtype(self): method compute_dtype (line 115) | def compute_dtype(self): method name (line 136) | def name(self): method quantization_mode (line 141) | def quantization_mode(self): method convert_input (line 150) | def convert_input(self, x, autocast, dtype): method get_config (line 177) | def get_config(self): method from_config (line 181) | def from_config(cls, config): method __repr__ (line 184) | def __repr__(self): method __eq__ (line 190) | def __eq__(self, other): method _should_cast (line 199) | def _should_cast(self, x, autocast, dtype): class FloatDTypePolicy (line 210) | class FloatDTypePolicy(DTypePolicy): class QuantizedDTypePolicy (line 216) | class QuantizedDTypePolicy(DTypePolicy): method __init__ (line 217) | def __init__(self, mode, source_name=None): method __eq__ (line 231) | def __eq__(self, other): method get_config (line 239) | def get_config(self): method _check_quantization_mode (line 245) | def _check_quantization_mode(self, mode, compute_dtype): class QuantizedFloat8DTypePolicy (line 260) | class QuantizedFloat8DTypePolicy(QuantizedDTypePolicy): method __init__ (line 263) | def __init__(self, mode, source_name=None, amax_history_length=1024): method amax_history_length (line 273) | def amax_history_length(self): method __eq__ (line 280) | def __eq__(self, other): method get_config (line 285) | def get_config(self): class Int4DTypePolicy (line 292) | class Int4DTypePolicy(QuantizedDTypePolicy): method __init__ (line 309) | def __init__( method __eq__ (line 351) | def __eq__(self, other): method get_config (line 356) | def get_config(self): class GPTQDTypePolicy (line 365) | class GPTQDTypePolicy(QuantizedDTypePolicy): method __init__ (line 385) | def __init__( method __eq__ (line 436) | def __eq__(self, other): method get_config (line 444) | def get_config(self): class AWQDTypePolicy (line 453) | class AWQDTypePolicy(QuantizedDTypePolicy): method __init__ (line 472) | def __init__( method __eq__ (line 523) | def __eq__(self, other): method get_config (line 531) | def get_config(self): function set_dtype_policy (line 546) | def set_dtype_policy(policy): function dtype_policy (line 577) | def dtype_policy(): function _get_quantized_dtype_policy_by_str (line 586) | def _get_quantized_dtype_policy_by_str(policy): FILE: keras/src/dtype_policies/dtype_policy_map.py class DTypePolicyMap (line 10) | class DTypePolicyMap(DTypePolicy, MutableMapping): method __init__ (line 88) | def __init__(self, default_policy=None, policy_map=None): method name (line 101) | def name(self): method default_policy (line 105) | def default_policy(self): method variable_dtype (line 114) | def variable_dtype(self): method compute_dtype (line 118) | def compute_dtype(self): method quantization_mode (line 122) | def quantization_mode(self): method __getitem__ (line 125) | def __getitem__(self, key): method __setitem__ (line 214) | def __setitem__(self, key, policy): method __delitem__ (line 237) | def __delitem__(self, key): method __contains__ (line 241) | def __contains__(self, key): method get_config (line 244) | def get_config(self): method from_config (line 266) | def from_config(cls, config, custom_objects=None): method __len__ (line 275) | def __len__(self): method __iter__ (line 278) | def __iter__(self): method __repr__ (line 281) | def __repr__(self): FILE: keras/src/dtype_policies/dtype_policy_map_test.py class DTypePolicyMapTest (line 15) | class DTypePolicyMapTest(testing.TestCase): method setUp (line 16) | def setUp(self): method tearDown (line 20) | def tearDown(self): method test_basic_usage (line 25) | def test_basic_usage(self): method test_add (line 86) | def test_add(self): method test_get (line 126) | def test_get(self): method test_delete (line 185) | def test_delete(self): method test_len (line 209) | def test_len(self): method test_iter (line 221) | def test_iter(self): method test_in (line 248) | def test_in(self): method test_default_policy (line 261) | def test_default_policy(self): method test_serialization (line 314) | def test_serialization(self): method test_repr (line 338) | def test_repr(self): method test_invalid_policy_map (line 350) | def test_invalid_policy_map(self): FILE: keras/src/dtype_policies/dtype_policy_test.py class DTypePolicyTest (line 17) | class DTypePolicyTest(test_case.TestCase): method setUp (line 23) | def setUp(self): method tearDown (line 28) | def tearDown(self): method test_initialization_valid_name (line 33) | def test_initialization_valid_name(self): method test_initialization_from_global (line 50) | def test_initialization_from_global( method test_initialization_invalid_name (line 68) | def test_initialization_invalid_name(self): method test_initialization_non_string_name (line 76) | def test_initialization_non_string_name(self): method test_properties_mixed_float16 (line 84) | def test_properties_mixed_float16(self): method test_properties_mixed_bfloat16 (line 94) | def test_properties_mixed_bfloat16(self): method test_initialization_with_invalid_name_behaviour (line 104) | def test_initialization_with_invalid_name_behaviour(self): method test_properties (line 112) | def test_properties(self): method test_properties_uint8 (line 126) | def test_properties_uint8(self): method test_repr (line 138) | def test_repr(self): method test_get_config_from_config (line 146) | def test_get_config_from_config(self): method test_serialization (line 162) | def test_serialization(self): method test_python_serialization (line 179) | def test_python_serialization(self): method test_eq (line 218) | def test_eq(self): class QuantizedDTypePolicyTest (line 232) | class QuantizedDTypePolicyTest(test_case.TestCase): method setUp (line 233) | def setUp(self): method tearDown (line 238) | def tearDown(self): method test_initialization_for_int8 (line 248) | def test_initialization_for_int8( method test_initialization_for_int8_from_global (line 263) | def test_initialization_for_int8_from_global( method test_initialization_for_float8 (line 284) | def test_initialization_for_float8( method test_initialization_for_float8_from_global (line 303) | def test_initialization_for_float8_from_global( method test_initialization_with_invalid_name (line 321) | def test_initialization_with_invalid_name(self, invalid_name): method test_initialization_with_invalid_mode (line 331) | def test_initialization_with_invalid_mode(self, invalid_mode): method test_initialization_with_invalid_compute_dtype (line 341) | def test_initialization_with_invalid_compute_dtype(self, invalid_name): method test_initialization_non_string_name (line 345) | def test_initialization_non_string_name(self): method test_properties (line 352) | def test_properties(self): method test_invalid_properties_for_float8 (line 381) | def test_invalid_properties_for_float8(self): method test_get_config_from_config (line 391) | def test_get_config_from_config(self): method test_serialization (line 418) | def test_serialization(self): method test_python_serialization (line 451) | def test_python_serialization(self, mode, source_name, repr_str): method test_serialization_for_float8 (line 482) | def test_serialization_for_float8(self): method test_eq (line 500) | def test_eq(self): method test_get_quantized_dtype_policy_by_str (line 517) | def test_get_quantized_dtype_policy_by_str(self, name): method test_invalid_get_quantized_dtype_policy_by_str (line 525) | def test_invalid_get_quantized_dtype_policy_by_str(self): class DTypePolicyGlobalFunctionsTest (line 539) | class DTypePolicyGlobalFunctionsTest(test_case.TestCase): method setUp (line 540) | def setUp(self): method test_set_dtype_policy_valid_string (line 544) | def test_set_dtype_policy_valid_string(self): method test_set_dtype_policy_valid_string_quantized (line 550) | def test_set_dtype_policy_valid_string_quantized(self): method test_set_dtype_policy_valid_policy (line 556) | def test_set_dtype_policy_valid_policy(self): method test_set_dtype_policy_valid_policy_quantized (line 563) | def test_set_dtype_policy_valid_policy_quantized(self): method test_set_dtype_policy_invalid (line 572) | def test_set_dtype_policy_invalid(self): method test_dtype_policy_default (line 577) | def test_dtype_policy_default(self): method test_get_valid_policy (line 582) | def test_get_valid_policy(self): method test_get_valid_policy_quantized (line 595) | def test_get_valid_policy_quantized(self): method test_get_invalid_policy (line 608) | def test_get_invalid_policy(self): method test_get_invalid_policy_quantized (line 616) | def test_get_invalid_policy_quantized(self): class DTypePolicyEdgeCasesTest (line 627) | class DTypePolicyEdgeCasesTest(test_case.TestCase): method test_empty_name (line 628) | def test_empty_name(self): method test_special_character_name (line 633) | def test_special_character_name(self): method test_very_long_name (line 638) | def test_very_long_name(self): method test_almost_valid_name (line 643) | def test_almost_valid_name(self): class QuantizedDTypePolicyEdgeCasesTest (line 649) | class QuantizedDTypePolicyEdgeCasesTest(test_case.TestCase): method test_empty_name (line 650) | def test_empty_name(self): method test_special_character_name (line 655) | def test_special_character_name(self): method test_very_long_name (line 662) | def test_very_long_name(self): method test_almost_valid_name (line 669) | def test_almost_valid_name(self): class DTypePolicyGlobalFunctionsEdgeCasesTest (line 677) | class DTypePolicyGlobalFunctionsEdgeCasesTest(test_case.TestCase): method setUp (line 678) | def setUp(self): method test_set_policy_multiple_times (line 682) | def test_set_policy_multiple_times(self): method test_set_policy_none (line 692) | def test_set_policy_none(self): class GPTQConfigErrorHandlingTest (line 698) | class GPTQConfigErrorHandlingTest(test_case.TestCase): method test_invalid_weight_bits (line 701) | def test_invalid_weight_bits(self): method test_negative_num_samples (line 709) | def test_negative_num_samples(self): method test_zero_sequence_length (line 719) | def test_zero_sequence_length(self): method test_invalid_hessian_damping (line 729) | def test_invalid_hessian_damping(self): method test_invalid_group_size (line 739) | def test_invalid_group_size(self): class AWQDTypePolicyTest (line 750) | class AWQDTypePolicyTest(test_case.TestCase): method test_awq_dtype_policy_creation (line 753) | def test_awq_dtype_policy_creation(self): method test_awq_dtype_policy_invalid_bits (line 760) | def test_awq_dtype_policy_invalid_bits(self): method test_awq_dtype_policy_invalid_format (line 765) | def test_awq_dtype_policy_invalid_format(self): FILE: keras/src/export/export_utils.py function get_input_signature (line 9) | def get_input_signature(model): function _infer_input_signature_from_model (line 51) | def _infer_input_signature_from_model(model): function make_input_spec (line 82) | def make_input_spec(x): function make_tf_tensor_spec (line 105) | def make_tf_tensor_spec(x, dynamic_batch=False): function convert_spec_to_tensor (line 137) | def convert_spec_to_tensor(spec, replace_none_number=None): FILE: keras/src/export/litert.py function export_litert (line 9) | def export_litert( class LiteRTExporter (line 34) | class LiteRTExporter: method __init__ (line 43) | def __init__( method export (line 61) | def export(self, filepath): method _create_nested_inputs_adapter (line 137) | def _create_nested_inputs_adapter(self, input_signature_struct): method _convert_to_tflite (line 196) | def _convert_to_tflite(self, input_signature): method _apply_converter_kwargs (line 226) | def _apply_converter_kwargs(self, converter): FILE: keras/src/export/litert_test.py class CustomModel (line 46) | class CustomModel(models.Model): method __init__ (line 47) | def __init__(self, layer_list): method call (line 51) | def call(self, input): function get_model (line 58) | def get_model(type="sequential", input_shape=(10,), layer_list=None): function _convert_to_numpy (line 119) | def _convert_to_numpy(structure): function _normalize_name (line 125) | def _normalize_name(name): function _set_interpreter_inputs (line 132) | def _set_interpreter_inputs(interpreter, inputs): function _get_interpreter_outputs (line 164) | def _get_interpreter_outputs(interpreter): class ExportLitertTest (line 176) | class ExportLitertTest(testing.TestCase): method test_standard_model_export (line 184) | def test_standard_model_export(self, model_type): method test_model_with_input_structure (line 216) | def test_model_with_input_structure(self, struct_type): method test_model_with_multiple_inputs (line 276) | def test_model_with_multiple_inputs(self): method test_export_with_custom_input_signature (line 324) | def test_export_with_custom_input_signature(self): method test_multi_output_model_export (line 347) | def test_multi_output_model_export(self): method test_export_with_verbose (line 382) | def test_export_with_verbose(self): method test_export_error_handling (line 405) | def test_export_error_handling(self): method test_export_invalid_filepath (line 419) | def test_export_invalid_filepath(self): method test_export_subclass_model (line 431) | def test_export_subclass_model(self): method test_export_with_optimizations_default (line 458) | def test_export_with_optimizations_default(self): method test_export_with_optimizations_sparsity (line 490) | def test_export_with_optimizations_sparsity(self): method test_export_with_optimizations_size (line 521) | def test_export_with_optimizations_size(self): method test_export_with_optimizations_latency (line 551) | def test_export_with_optimizations_latency(self): method test_export_with_multiple_optimizations (line 581) | def test_export_with_multiple_optimizations(self): method test_export_with_representative_dataset (line 614) | def test_export_with_representative_dataset(self): method test_export_with_multiple_kwargs (line 651) | def test_export_with_multiple_kwargs(self): method test_export_optimization_file_size_comparison (line 687) | def test_export_optimization_file_size_comparison(self): method test_signature_def_with_named_model (line 737) | def test_signature_def_with_named_model(self): method test_signature_def_with_functional_model (line 816) | def test_signature_def_with_functional_model(self): method test_signature_def_with_multi_input_model (line 892) | def test_signature_def_with_multi_input_model(self): method test_signature_def_with_multi_output_model (line 976) | def test_signature_def_with_multi_output_model(self): method test_dict_input_adapter_creation (line 1042) | def test_dict_input_adapter_creation(self): method test_dict_input_signature_inference (line 1090) | def test_dict_input_signature_inference(self): method test_dict_input_with_custom_signature (line 1124) | def test_dict_input_with_custom_signature(self): method test_dict_input_numerical_accuracy (line 1175) | def test_dict_input_numerical_accuracy(self): method test_dict_input_preserves_variable_sharing (line 1223) | def test_dict_input_preserves_variable_sharing(self): method test_dict_input_multi_output_model (line 1279) | def test_dict_input_multi_output_model(self): FILE: keras/src/export/neptune_model_export_archive.py class NeptuneModelExportArchive (line 4) | class NeptuneModelExportArchive: method __init__ (line 5) | def __init__(self): method track (line 11) | def track(self, resource): method add_endpoint (line 14) | def add_endpoint(self, name, fn, input_signature=None, **kwargs): method track_and_add_endpoint (line 17) | def track_and_add_endpoint(self, name, resource, input_signature, **kw... method add_variable_collection (line 20) | def add_variable_collection(self, name, variables): method write_out (line 23) | def write_out(self, filepath, options=None, verbose=True): FILE: keras/src/export/onnx.py function export_onnx (line 14) | def export_onnx( function _check_jax_kwargs (line 260) | def _check_jax_kwargs(kwargs): function get_concrete_fn (line 288) | def get_concrete_fn(model, input_signature, **kwargs): FILE: keras/src/export/onnx_test.py class CustomModel (line 22) | class CustomModel(models.Model): method __init__ (line 23) | def __init__(self, layer_list): method call (line 27) | def call(self, input): function get_model (line 34) | def get_model(type="sequential", input_shape=(10,), layer_list=None): class ExportONNXTest (line 85) | class ExportONNXTest(testing.TestCase): method test_standard_model_export (line 91) | def test_standard_model_export(self, model_type): method test_model_with_input_structure (line 121) | def test_model_with_input_structure(self, struct_type): method test_model_with_multiple_inputs (line 205) | def test_model_with_multiple_inputs(self): method test_export_with_opset_version (line 243) | def test_export_with_opset_version(self, opset_version): method test_export_with_input_names (line 266) | def test_export_with_input_names(self): method test_dynamic_shapes_export (line 300) | def test_dynamic_shapes_export(self, model_type, dynamic_type): method test_multi_input_dynamic_shapes (line 371) | def test_multi_input_dynamic_shapes(self): FILE: keras/src/export/openvino.py function export_openvino (line 13) | def export_openvino( function collect_names (line 146) | def collect_names(structure): function set_names (line 163) | def set_names(model, inputs): function _check_jax_kwargs (line 170) | def _check_jax_kwargs(kwargs): function get_concrete_fn (line 196) | def get_concrete_fn(model, input_signature, **kwargs): FILE: keras/src/export/openvino_test.py class CustomModel (line 23) | class CustomModel(models.Model): method __init__ (line 24) | def __init__(self, layer_list): method call (line 28) | def call(self, input): function get_model (line 35) | def get_model(type="sequential", input_shape=(10,), layer_list=None): class ExportOpenVINOTest (line 86) | class ExportOpenVINOTest(testing.TestCase): method test_standard_model_export (line 92) | def test_standard_model_export(self, model_type): method test_model_with_input_structure (line 130) | def test_model_with_input_structure(self, struct_type): method test_model_with_multiple_inputs (line 216) | def test_model_with_multiple_inputs(self): FILE: keras/src/export/saved_model.py function export_saved_model (line 43) | def export_saved_model( class ExportArchive (line 113) | class ExportArchive: method __new__ (line 179) | def __new__(cls, format="saved_model", **kwargs): method track (line 187) | def track(self, resource): method add_endpoint (line 204) | def add_endpoint(self, name, fn, input_signature=None, **kwargs): method track_and_add_endpoint (line 351) | def track_and_add_endpoint(self, name, resource, input_signature, **kw... method add_variable_collection (line 383) | def add_variable_collection(self, name, variables): method write_out (line 416) | def write_out(self, filepath, options=None, verbose=True): FILE: keras/src/export/saved_model_export_archive.py class SavedModelExportArchive (line 10) | class SavedModelExportArchive: method __init__ (line 22) | def __init__(self): method _backend_init (line 41) | def _backend_init(self): method variables (line 46) | def variables(self): method trainable_variables (line 50) | def trainable_variables(self): method non_trainable_variables (line 54) | def non_trainable_variables(self): method track (line 57) | def track(self, resource): method _backend_track_layer (line 93) | def _backend_track_layer(self, layer): method add_endpoint (line 98) | def add_endpoint(self, name, fn, input_signature=None, **kwargs): method _backend_add_endpoint (line 155) | def _backend_add_endpoint(self, name, fn, input_signature, **kwargs): method track_and_add_endpoint (line 160) | def track_and_add_endpoint(self, name, resource, input_signature, **kw... method add_variable_collection (line 193) | def add_variable_collection(self, name, variables): method write_out (line 243) | def write_out(self, filepath, options=None, verbose=True): method _convert_to_tf_variable (line 299) | def _convert_to_tf_variable(self, backend_variable): method _get_concrete_fn (line 313) | def _get_concrete_fn(self, endpoint): method _get_variables_used_by_endpoints (line 323) | def _get_variables_used_by_endpoints(self): method _filter_and_track_resources (line 327) | def _filter_and_track_resources(self): function _print_signature (line 356) | def _print_signature(fn, name, verbose=True): function _list_variables_used_by_fns (line 365) | def _list_variables_used_by_fns(fns): FILE: keras/src/export/saved_model_test.py class CustomModel (line 22) | class CustomModel(models.Model): method __init__ (line 23) | def __init__(self, layer_list): method call (line 27) | def call(self, input): function get_model (line 34) | def get_model(type="sequential", input_shape=(10,), layer_list=None): class ExportSavedModelTest (line 66) | class ExportSavedModelTest(testing.TestCase): method test_standard_model_export (line 70) | def test_standard_model_export(self, model_type): method test_model_with_rng_export (line 93) | def test_model_with_rng_export(self, model_type): method test_model_with_non_trainable_state_export (line 129) | def test_model_with_non_trainable_state_export(self, model_type): method test_model_with_tf_data_layer (line 160) | def test_model_with_tf_data_layer(self, model_type): method test_model_with_input_structure (line 176) | def test_model_with_input_structure(self, struct_type): method test_model_with_multiple_inputs (line 235) | def test_model_with_multiple_inputs(self): method test_input_signature (line 273) | def test_input_signature(self, model_type, input_signature): method test_input_signature_error (line 292) | def test_input_signature_error(self): method test_jax_specific_kwargs (line 315) | def test_jax_specific_kwargs(self, model_type, is_static, jax2tf_kwargs): class ExportArchiveTest (line 344) | class ExportArchiveTest(testing.TestCase): method test_low_level_model_export (line 348) | def test_low_level_model_export(self, model_type): method test_low_level_model_export_with_alias (line 375) | def test_low_level_model_export_with_alias(self): method test_low_level_model_export_with_dynamic_dims (line 408) | def test_low_level_model_export_with_dynamic_dims(self, model_type): method test_low_level_model_export_with_jax2tf_kwargs (line 447) | def test_low_level_model_export_with_jax2tf_kwargs(self): method test_low_level_model_export_with_jax2tf_polymorphic_shapes (line 487) | def test_low_level_model_export_with_jax2tf_polymorphic_shapes(self): method test_endpoint_registration_tf_function (line 529) | def test_endpoint_registration_tf_function(self): method test_jax_endpoint_registration_tf_function (line 567) | def test_jax_endpoint_registration_tf_function(self): method test_jax_multi_unknown_endpoint_registration (line 628) | def test_jax_multi_unknown_endpoint_registration(self): method test_layer_export (line 698) | def test_layer_export(self): method test_multi_input_output_functional_model (line 716) | def test_multi_input_output_functional_model(self): method test_model_with_lookup_table (line 761) | def test_model_with_lookup_table(self): method test_model_with_tracked_collection (line 784) | def test_model_with_tracked_collection(self): method test_track_multiple_layers (line 810) | def test_track_multiple_layers(self): method test_non_standard_layer_signature (line 835) | def test_non_standard_layer_signature(self): method test_non_standard_layer_signature_with_kwargs (line 856) | def test_non_standard_layer_signature_with_kwargs(self): method test_variable_collection (line 881) | def test_variable_collection(self): method test_export_saved_model_errors (line 909) | def test_export_saved_model_errors(self): method test_export_archive_errors (line 923) | def test_export_archive_errors(self): method test_export_no_assets (line 979) | def test_export_no_assets(self): method test_model_export_method (line 996) | def test_model_export_method(self, model_type): method test_model_combined_with_tf_preprocessing (line 1008) | def test_model_combined_with_tf_preprocessing(self): FILE: keras/src/export/tf2onnx_lib.py function patch_tf2onnx (line 10) | def patch_tf2onnx(): FILE: keras/src/export/tfsm_layer.py class TFSMLayer (line 10) | class TFSMLayer(layers.Layer): method __init__ (line 49) | def __init__( method _add_existing_weight (line 123) | def _add_existing_weight(self, weight): method call (line 135) | def call(self, inputs, training=False, **kwargs): method get_config (line 141) | def get_config(self): method from_config (line 152) | def from_config(cls, config, custom_objects=None, safe_mode=None): FILE: keras/src/export/tfsm_layer_test.py class TestTFSMLayer (line 22) | class TestTFSMLayer(testing.TestCase): method test_reloading_export_archive (line 23) | def test_reloading_export_archive(self): method test_reloading_default_saved_model (line 41) | def test_reloading_default_saved_model(self): method test_call_training (line 69) | def test_call_training(self): method test_serialization (line 106) | def test_serialization(self): method test_safe_mode_blocks_model_loading (line 131) | def test_safe_mode_blocks_model_loading(self): method test_errors (line 159) | def test_errors(self): FILE: keras/src/initializers/__init__.py function serialize (line 67) | def serialize(initializer): function deserialize (line 73) | def deserialize(config, custom_objects=None): function get (line 83) | def get(identifier): FILE: keras/src/initializers/constant_initializers.py class Constant (line 10) | class Constant(Initializer): method __init__ (line 31) | def __init__(self, value=0.0): method __call__ (line 34) | def __call__(self, shape, dtype=None): method get_config (line 40) | def get_config(self): method from_config (line 44) | def from_config(cls, config): class Zeros (line 50) | class Zeros(Initializer): method __call__ (line 64) | def __call__(self, shape, dtype=None): class Ones (line 79) | class Ones(Initializer): method __call__ (line 95) | def __call__(self, shape, dtype=None): class Identity (line 116) | class Identity(Initializer): method __init__ (line 135) | def __init__(self, gain=1.0): method __call__ (line 138) | def __call__(self, shape, dtype=None): class STFT (line 164) | class STFT(Initializer): method __init__ (line 198) | def __init__( method __call__ (line 216) | def __call__(self, shape, dtype=None): method get_config (line 278) | def get_config(self): FILE: keras/src/initializers/constant_initializers_test.py class ConstantInitializersTest (line 10) | class ConstantInitializersTest(testing.TestCase): method test_zeros_initializer (line 11) | def test_zeros_initializer(self): method test_ones_initializer (line 22) | def test_ones_initializer(self): method test_constant_initializer (line 33) | def test_constant_initializer(self): method test_constant_initializer_array_value (line 47) | def test_constant_initializer_array_value(self): method test_identity_initializer (line 62) | def test_identity_initializer(self): method test_stft_initializer (line 79) | def test_stft_initializer(self): FILE: keras/src/initializers/initializer.py class Initializer (line 5) | class Initializer: method __call__ (line 44) | def __call__(self, shape, dtype=None): method get_config (line 55) | def get_config(self): method from_config (line 64) | def from_config(cls, config): method clone (line 83) | def clone(self): FILE: keras/src/initializers/random_initializers.py class RandomInitializer (line 10) | class RandomInitializer(Initializer): method __init__ (line 11) | def __init__(self, seed=None): method get_config (line 25) | def get_config(self): class RandomNormal (line 36) | class RandomNormal(RandomInitializer): method __init__ (line 66) | def __init__(self, mean=0.0, stddev=0.05, seed=None): method __call__ (line 71) | def __call__(self, shape, dtype=None): method get_config (line 80) | def get_config(self): class TruncatedNormal (line 92) | class TruncatedNormal(RandomInitializer): method __init__ (line 125) | def __init__(self, mean=0.0, stddev=0.05, seed=None): method __call__ (line 130) | def __call__(self, shape, dtype=None): method get_config (line 139) | def get_config(self): class RandomUniform (line 151) | class RandomUniform(RandomInitializer): method __init__ (line 181) | def __init__(self, minval=-0.05, maxval=0.05, seed=None): method __call__ (line 186) | def __call__(self, shape, dtype=None): method get_config (line 195) | def get_config(self): class VarianceScaling (line 207) | class VarianceScaling(RandomInitializer): method __init__ (line 249) | def __init__( method __call__ (line 285) | def __call__(self, shape, dtype=None): method get_config (line 310) | def get_config(self): class GlorotUniform (line 326) | class GlorotUniform(VarianceScaling): method __init__ (line 358) | def __init__(self, seed=None): method get_config (line 363) | def get_config(self): class GlorotNormal (line 375) | class GlorotNormal(VarianceScaling): method __init__ (line 408) | def __init__(self, seed=None): method get_config (line 416) | def get_config(self): class LecunNormal (line 428) | class LecunNormal(VarianceScaling): method __init__ (line 464) | def __init__(self, seed=None): method get_config (line 469) | def get_config(self): class LecunUniform (line 481) | class LecunUniform(VarianceScaling): method __init__ (line 513) | def __init__(self, seed=None): method get_config (line 518) | def get_config(self): class HeNormal (line 525) | class HeNormal(VarianceScaling): method __init__ (line 557) | def __init__(self, seed=None): method get_config (line 562) | def get_config(self): class HeUniform (line 569) | class HeUniform(VarianceScaling): method __init__ (line 601) | def __init__(self, seed=None): method get_config (line 606) | def get_config(self): function compute_fans (line 612) | def compute_fans(shape): class Orthogonal (line 647) | class Orthogonal(RandomInitializer): method __init__ (line 681) | def __init__(self, gain=1.0, seed=None): method __call__ (line 685) | def __call__(self, shape, dtype=None): method get_config (line 712) | def get_config(self): FILE: keras/src/initializers/random_initializers_test.py class RandomInitializersTest (line 11) | class RandomInitializersTest(testing.TestCase): method test_random_normal (line 12) | def test_random_normal(self): method test_random_uniform (line 76) | def test_random_uniform(self): method test_variance_scaling (line 95) | def test_variance_scaling(self): method test_orthogonal (line 129) | def test_orthogonal(self): method test_get_method (line 157) | def test_get_method(self): method test_get_method_with_tensor (line 170) | def test_get_method_with_tensor(self): method test_variance_scaling_invalid_scale (line 189) | def test_variance_scaling_invalid_scale(self): method test_variance_scaling_invalid_mode (line 197) | def test_variance_scaling_invalid_mode(self): method test_variance_scaling_invalid_distribution (line 206) | def test_variance_scaling_invalid_distribution(self): method test_serialization_with_seed_generator (line 220) | def test_serialization_with_seed_generator(self): FILE: keras/src/layers/__init__.py function serialize (line 234) | def serialize(layer): function deserialize (line 247) | def deserialize(config, custom_objects=None): FILE: keras/src/layers/activations/activation.py class Activation (line 7) | class Activation(Layer): method __init__ (line 25) | def __init__(self, activation, **kwargs): method call (line 32) | def call(self, inputs): method compute_output_shape (line 35) | def compute_output_shape(self, input_shape): method get_config (line 38) | def get_config(self): FILE: keras/src/layers/activations/activation_test.py class ActivationTest (line 8) | class ActivationTest(testing.TestCase): method test_activation_basics (line 10) | def test_activation_basics(self): FILE: keras/src/layers/activations/elu.py class ELU (line 7) | class ELU(Layer): method __init__ (line 22) | def __init__(self, alpha=1.0, **kwargs): method call (line 29) | def call(self, inputs): method compute_output_shape (line 32) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/activations/elu_test.py class ELUTest (line 8) | class ELUTest(testing.TestCase): method test_config (line 9) | def test_config(self): method test_elu (line 14) | def test_elu(self): method test_correctness (line 23) | def test_correctness(self): FILE: keras/src/layers/activations/leaky_relu.py class LeakyReLU (line 9) | class LeakyReLU(Layer): method __init__ (line 38) | def __init__(self, negative_slope=0.3, **kwargs): method call (line 56) | def call(self, inputs): method get_config (line 61) | def get_config(self): method compute_output_shape (line 66) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/activations/leaky_relu_test.py class LeakyReLUTest (line 8) | class LeakyReLUTest(testing.TestCase): method test_leaky_relu (line 10) | def test_leaky_relu(self): method test_leaky_relu_correctness (line 21) | def test_leaky_relu_correctness(self): method test_invalid_usage (line 28) | def test_invalid_usage(self): FILE: keras/src/layers/activations/prelu.py class PReLU (line 11) | class PReLU(Layer): method __init__ (line 34) | def __init__( method build (line 54) | def build(self, input_shape): method call (line 74) | def call(self, inputs): method get_config (line 79) | def get_config(self): method compute_output_shape (line 97) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/activations/prelu_test.py class PReLUTest (line 8) | class PReLUTest(testing.TestCase): method test_prelu (line 10) | def test_prelu(self): method test_prelu_correctness (line 23) | def test_prelu_correctness(self): FILE: keras/src/layers/activations/relu.py class ReLU (line 7) | class ReLU(Layer): method __init__ (line 40) | def __init__( method call (line 67) | def call(self, inputs): method get_config (line 75) | def get_config(self): method compute_output_shape (line 86) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/activations/relu_test.py class ReLUTest (line 8) | class ReLUTest(testing.TestCase): method test_relu (line 10) | def test_relu(self): method test_normal_relu_correctness (line 23) | def test_normal_relu_correctness(self): method test_leaky_relu_correctness (line 30) | def test_leaky_relu_correctness(self): method test_threshold_relu_correctness (line 37) | def test_threshold_relu_correctness(self): method test_invalid_usage (line 44) | def test_invalid_usage(self): FILE: keras/src/layers/activations/softmax.py function _large_negative_number (line 7) | def _large_negative_number(dtype): class Softmax (line 15) | class Softmax(Layer): method __init__ (line 48) | def __init__(self, axis=-1, **kwargs): method call (line 55) | def call(self, inputs, mask=None): method get_config (line 109) | def get_config(self): method compute_output_shape (line 114) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/activations/softmax_test.py class SoftmaxTest (line 8) | class SoftmaxTest(testing.TestCase): method test_softmax (line 10) | def test_softmax(self): method test_softmax_correctness (line 19) | def test_softmax_correctness(self): method test_softmax_correctness_with_mask (line 31) | def test_softmax_correctness_with_mask(self): method test_softmax_correctness_with_axis (line 41) | def test_softmax_correctness_with_axis(self): method test_softmax_masked_values_are_zero_including_fully_masked (line 53) | def test_softmax_masked_values_are_zero_including_fully_masked(self): method test_softmax_mask_broadcastable (line 90) | def test_softmax_mask_broadcastable(self): method test_softmax_mask_broadcastable_fewer_dims (line 99) | def test_softmax_mask_broadcastable_fewer_dims(self): method test_softmax_mask_shape_mismatch (line 107) | def test_softmax_mask_shape_mismatch(self): method test_softmax_mask_too_many_dims (line 115) | def test_softmax_mask_too_many_dims(self): FILE: keras/src/layers/attention/additive_attention.py class AdditiveAttention (line 7) | class AdditiveAttention(Attention): method __init__ (line 60) | def __init__( method build (line 68) | def build(self, input_shape): method _calculate_scores (line 81) | def _calculate_scores(self, query, key): method get_config (line 99) | def get_config(self): FILE: keras/src/layers/attention/additive_attention_test.py class AdditiveAttentionTest (line 7) | class AdditiveAttentionTest(testing.TestCase): method test_attention_basics (line 8) | def test_attention_basics(self): method test_attention_correctness (line 42) | def test_attention_correctness(self): method test_attention_with_mask (line 65) | def test_attention_with_mask(self): method test_attention_errors (line 79) | def test_attention_errors(self): FILE: keras/src/layers/attention/attention.py class Attention (line 9) | class Attention(Layer): method __init__ (line 66) | def __init__( method build (line 90) | def build(self, input_shape): method _calculate_scores (line 111) | def _calculate_scores(self, query, key): method _apply_scores (line 144) | def _apply_scores(self, scores, value, scores_mask=None, training=False): method _calculate_score_mask (line 192) | def _calculate_score_mask(self, scores, v_mask, use_causal_mask): method call (line 215) | def call( method compute_mask (line 246) | def compute_mask(self, inputs, mask=None): method compute_output_shape (line 252) | def compute_output_shape(self, input_shape): method compute_output_spec (line 263) | def compute_output_spec( method _validate_inputs (line 297) | def _validate_inputs(self, inputs, mask=None): method get_config (line 324) | def get_config(self): FILE: keras/src/layers/attention/attention_test.py class AttentionTest (line 8) | class AttentionTest(testing.TestCase): method test_attention_basics (line 9) | def test_attention_basics(self): method test_attention_correctness (line 44) | def test_attention_correctness(self): method test_attention_with_mask (line 91) | def test_attention_with_mask(self): method test_attention_2D_mask_shape_mismatch (line 105) | def test_attention_2D_mask_shape_mismatch(self): method test_attention_errors (line 122) | def test_attention_errors(self): method test_attention_with_dropout (line 137) | def test_attention_with_dropout(self): method test_attention_invalid_score_mode (line 152) | def test_attention_invalid_score_mode(self): method test_attention_calculate_scores_with_scale (line 160) | def test_attention_calculate_scores_with_scale(self): method test_attention_calculate_score_mask_no_causal_no_vmask (line 172) | def test_attention_calculate_score_mask_no_causal_no_vmask(self): method test_attention_calculate_score_mask_with_causal_no_vmask (line 184) | def test_attention_calculate_score_mask_with_causal_no_vmask(self): method test_attention_calculate_score_mask_with_causal_and_vmask (line 196) | def test_attention_calculate_score_mask_with_causal_and_vmask(self): method test_attention_compute_mask_with_no_mask (line 212) | def test_attention_compute_mask_with_no_mask(self): method test_attention_compute_mask_with_first_element_none (line 223) | def test_attention_compute_mask_with_first_element_none(self): method test_attention_compute_mask_does_not_return_none_with_valid_mask (line 235) | def test_attention_compute_mask_does_not_return_none_with_valid_mask(s... method test_attention_compute_mask_returns_correct_tensor_with_valid_mask (line 250) | def test_attention_compute_mask_returns_correct_tensor_with_valid_mask( method test_attention_compute_mask_returns_correct_tensor_with_all_true_mask (line 267) | def test_attention_compute_mask_returns_correct_tensor_with_all_true_m... method test_attention_compute_mask_returns_correct_tensor_with_all_false_mask (line 282) | def test_attention_compute_mask_returns_correct_tensor_with_all_false_... method test_attention_compute_mask_with_tolerance_1e_3 (line 297) | def test_attention_compute_mask_with_tolerance_1e_3(self): method test_attention_compute_mask_with_tolerance_1e_5 (line 310) | def test_attention_compute_mask_with_tolerance_1e_5(self): method test_attention_compute_mask_with_tolerance_1e_7 (line 323) | def test_attention_compute_mask_with_tolerance_1e_7(self): method test_attention_compute_mask_with_single_element_masks (line 336) | def test_attention_compute_mask_with_single_element_masks(self): method test_attention_compute_mask_with_non_boolean_masks (line 346) | def test_attention_compute_mask_with_non_boolean_masks(self): method test_attention_compute_mask_with_edge_case_masks (line 355) | def test_attention_compute_mask_with_edge_case_masks(self): method test_attention_compute_mask_with_different_input_shapes (line 370) | def test_attention_compute_mask_with_different_input_shapes(self): method test_attention_compute_output_shape (line 381) | def test_attention_compute_output_shape(self): method test_return_attention_scores_true (line 397) | def test_return_attention_scores_true(self): method test_return_attention_scores_true_and_tuple (line 417) | def test_return_attention_scores_true_and_tuple(self): method test_return_attention_scores_true_tuple_then_unpack (line 435) | def test_return_attention_scores_true_tuple_then_unpack(self): method test_return_attention_scores_with_symbolic_tensors (line 456) | def test_return_attention_scores_with_symbolic_tensors(self): FILE: keras/src/layers/attention/grouped_query_attention.py class GroupedQueryAttention (line 16) | class GroupedQueryAttention(Layer): method __init__ (line 96) | def __init__( method build (line 148) | def build( method _get_common_kwargs_for_sublayer (line 219) | def _get_common_kwargs_for_sublayer(self): method call (line 241) | def call( method _compute_attention_mask (line 297) | def _compute_attention_mask( method _compute_causal_mask (line 365) | def _compute_causal_mask(self, query, value=None): method _compute_attention (line 394) | def _compute_attention( method _masked_softmax (line 459) | def _masked_softmax(self, scores, attention_mask=None): method compute_output_shape (line 473) | def compute_output_shape( method get_config (line 499) | def get_config(self): FILE: keras/src/layers/attention/grouped_query_attention_test.py class GroupedQueryAttentionTest (line 14) | class GroupedQueryAttentionTest(testing.TestCase): method setUp (line 15) | def setUp(self): method tearDown (line 21) | def tearDown(self): method test_basics (line 25) | def test_basics(self): method test_basics_with_flash_attention (line 105) | def test_basics_with_flash_attention(self): method test_compute_output_shape (line 200) | def test_compute_output_shape( method test_shape_mismatch_error (line 232) | def test_shape_mismatch_error(self, query_shape, value_shape, key_shape): method test_initializer (line 242) | def test_initializer(self): method test_query_mask_propagation (line 276) | def test_query_mask_propagation(self): method test_masking (line 303) | def test_masking(self, use_causal_mask): method test_correctness (line 364) | def test_correctness(self, flash_attention): method test_flash_attention_with_errors (line 432) | def test_flash_attention_with_errors(self): FILE: keras/src/layers/attention/multi_head_attention.py class MultiHeadAttention (line 20) | class MultiHeadAttention(Layer): method __init__ (line 109) | def __init__( method num_heads (line 178) | def num_heads(self): method key_dim (line 182) | def key_dim(self): method value_dim (line 186) | def value_dim(self): method dropout (line 190) | def dropout(self): method use_bias (line 194) | def use_bias(self): method attention_axes (line 201) | def attention_axes(self): method get_config (line 204) | def get_config(self): method build (line 232) | def build( method query_dense (line 330) | def query_dense(self): method key_dense (line 334) | def key_dense(self): method value_dense (line 338) | def value_dense(self): method output_dense (line 342) | def output_dense(self): method _get_common_kwargs_for_sublayer (line 345) | def _get_common_kwargs_for_sublayer(self): method _make_output_dense (line 367) | def _make_output_dense(self, query_shape, common_kwargs, name=None): method _build_attention (line 394) | def _build_attention(self, rank): method _masked_softmax (line 426) | def _masked_softmax(self, attention_scores, attention_mask=None): method _compute_attention (line 442) | def _compute_attention( method call (line 543) | def call( method _compute_attention_mask (line 613) | def _compute_attention_mask( method _compute_causal_mask (line 684) | def _compute_causal_mask(self, query, value=None): method compute_output_shape (line 713) | def compute_output_shape( method compute_output_spec (line 736) | def compute_output_spec( function _index_to_einsum_variable (line 768) | def _index_to_einsum_variable(i): function _build_attention_equation (line 776) | def _build_attention_equation(rank, attn_axes): function _build_proj_equation (line 834) | def _build_proj_equation(free_dims, bound_dims, output_dims): function _get_output_shape (line 863) | def _get_output_shape(output_rank, known_last_dims): FILE: keras/src/layers/attention/multi_head_attention_test.py class MultiHeadAttentionTest (line 23) | class MultiHeadAttentionTest(testing.TestCase): method setUp (line 24) | def setUp(self): method tearDown (line 30) | def tearDown(self): method test_basics (line 34) | def test_basics(self): method test_basics_with_flash_attention (line 112) | def test_basics_with_flash_attention(self): method test_high_dim_attention (line 216) | def test_high_dim_attention( method test_attention_axes_negative_indexing (line 263) | def test_attention_axes_negative_indexing(self): method test_compute_output_shape (line 341) | def test_compute_output_shape( method test_shape_mismatch_error (line 383) | def test_shape_mismatch_error(self, query_shape, value_shape, key_shape): method test_initializer (line 397) | def test_initializer(self): method test_query_mask_propagation (line 429) | def test_query_mask_propagation(self): method test_masking (line 445) | def test_masking(self, use_causal_mask): method test_masking_with_different_shapes (line 471) | def test_masking_with_different_shapes(self): method test_no_warning_with_keras_mask (line 490) | def test_no_warning_with_keras_mask(self): method test_correctness (line 504) | def test_correctness(self, flash_attention): method test_mha_constraints (line 569) | def test_mha_constraints(self): method test_lora (line 615) | def test_lora(self): method test_symbolic_return_attention_scores (line 689) | def test_symbolic_return_attention_scores(self, shape): method test_dtype_policy_map (line 703) | def test_dtype_policy_map(self): method test_flash_attention_with_errors (line 726) | def test_flash_attention_with_errors(self): method test_multi_head_attention_output_shape_as_int (line 757) | def test_multi_head_attention_output_shape_as_int(self): method test_multi_head_attention_output_shape_as_tuple (line 766) | def test_multi_head_attention_output_shape_as_tuple(self): method test_multi_head_attention_output_shape_error (line 777) | def test_multi_head_attention_output_shape_error(self): method test_quantize_int8 (line 781) | def test_quantize_int8(self): FILE: keras/src/layers/convolutional/base_conv.py class BaseConv (line 16) | class BaseConv(Layer): method __init__ (line 90) | def __init__( method build (line 176) | def build(self, input_shape): method kernel (line 228) | def kernel(self): method convolution_op (line 239) | def convolution_op(self, inputs, kernel): method call (line 249) | def call(self, inputs): method compute_output_shape (line 266) | def compute_output_shape(self, input_shape): method enable_lora (line 277) | def enable_lora( method save_own_variables (line 317) | def save_own_variables(self, store): method load_own_variables (line 327) | def load_own_variables(self, store): method get_config (line 342) | def get_config(self): method _check_load_own_variables (line 381) | def _check_load_own_variables(self, store): FILE: keras/src/layers/convolutional/base_conv_transpose.py class BaseConvTranspose (line 18) | class BaseConvTranspose(Layer): method __init__ (line 71) | def __init__( method build (line 178) | def build(self, input_shape): method call (line 215) | def call(self, inputs): method compute_output_shape (line 238) | def compute_output_shape(self, input_shape): method get_config (line 250) | def get_config(self): FILE: keras/src/layers/convolutional/base_depthwise_conv.py class BaseDepthwiseConv (line 16) | class BaseDepthwiseConv(Layer): method __init__ (line 84) | def __init__( method build (line 158) | def build(self, input_shape): method _get_input_channel (line 194) | def _get_input_channel(self, input_shape): method call (line 201) | def call(self, inputs): method compute_output_shape (line 228) | def compute_output_shape(self, input_shape): method get_config (line 240) | def get_config(self): FILE: keras/src/layers/convolutional/base_separable_conv.py class BaseSeparableConv (line 16) | class BaseSeparableConv(Layer): method __init__ (line 78) | def __init__( method build (line 167) | def build(self, input_shape): method call (line 217) | def call(self, inputs): method compute_output_shape (line 240) | def compute_output_shape(self, input_shape): method get_config (line 251) | def get_config(self): FILE: keras/src/layers/convolutional/conv1d.py class Conv1D (line 7) | class Conv1D(BaseConv): method __init__ (line 95) | def __init__( method _compute_causal_padding (line 136) | def _compute_causal_padding(self): method call (line 144) | def call(self, inputs): FILE: keras/src/layers/convolutional/conv1d_transpose.py class Conv1DTranspose (line 11) | class Conv1DTranspose(BaseConvTranspose): method __init__ (line 101) | def __init__( FILE: keras/src/layers/convolutional/conv2d.py class Conv2D (line 6) | class Conv2D(BaseConv): method __init__ (line 98) | def __init__( FILE: keras/src/layers/convolutional/conv2d_transpose.py class Conv2DTranspose (line 11) | class Conv2DTranspose(BaseConvTranspose): method __init__ (line 109) | def __init__( FILE: keras/src/layers/convolutional/conv3d.py class Conv3D (line 6) | class Conv3D(BaseConv): method __init__ (line 95) | def __init__( FILE: keras/src/layers/convolutional/conv3d_transpose.py class Conv3DTranspose (line 11) | class Conv3DTranspose(BaseConvTranspose): method __init__ (line 113) | def __init__( FILE: keras/src/layers/convolutional/conv_test.py function _same_padding (line 17) | def _same_padding(input_size, kernel_size, stride): function np_conv1d (line 25) | def np_conv1d( function np_conv2d (line 98) | def np_conv2d( function np_conv3d (line 179) | def np_conv3d( class ConvBasicTest (line 280) | class ConvBasicTest(testing.TestCase): method test_conv1d_basic (line 328) | def test_conv1d_basic( method test_conv2d_basic (line 395) | def test_conv2d_basic( method test_conv3d_basic (line 462) | def test_conv3d_basic( method test_bad_init_args (line 493) | def test_bad_init_args(self): method test_enable_lora (line 628) | def test_enable_lora( method test_lora_weight_name (line 720) | def test_lora_weight_name(self): method test_enable_lora_with_alpha (line 740) | def test_enable_lora_with_alpha(self): method test_lora_rank_argument (line 790) | def test_lora_rank_argument(self): method test_conv_symbolic_invalid_configuration (line 815) | def test_conv_symbolic_invalid_configuration( class ConvCorrectnessTest (line 829) | class ConvCorrectnessTest(testing.TestCase): method test_conv1d (line 877) | def test_conv1d( method test_conv2d (line 975) | def test_conv2d( method test_conv3d (line 1066) | def test_conv3d( method test_conv_constraints (line 1110) | def test_conv_constraints(self): method test_conv_raises_exception_on_zero_dims (line 1126) | def test_conv_raises_exception_on_zero_dims(self): FILE: keras/src/layers/convolutional/conv_transpose_test.py function np_conv1d_transpose (line 19) | def np_conv1d_transpose( function np_conv2d_transpose (line 92) | def np_conv2d_transpose( function np_conv3d_transpose (line 181) | def np_conv3d_transpose( class ConvTransposeBasicTest (line 289) | class ConvTransposeBasicTest(testing.TestCase): method test_conv1d_transpose_basic (line 326) | def test_conv1d_transpose_basic( method test_conv2d_transpose_basic (line 404) | def test_conv2d_transpose_basic( method test_conv3d_transpose_basic (line 477) | def test_conv3d_transpose_basic( method test_bad_init_args (line 508) | def test_bad_init_args(self): class ConvTransposeCorrectnessTest (line 604) | class ConvTransposeCorrectnessTest(testing.TestCase): method test_conv1d_transpose (line 634) | def test_conv1d_transpose( method test_conv2d_transpose (line 716) | def test_conv2d_transpose( method test_conv3d_transpose (line 789) | def test_conv3d_transpose( method test_conv1d_transpose_consistency (line 839) | def test_conv1d_transpose_consistency( method test_shape_inference_static_unknown_shape (line 939) | def test_shape_inference_static_unknown_shape( FILE: keras/src/layers/convolutional/depthwise_conv1d.py class DepthwiseConv1D (line 6) | class DepthwiseConv1D(BaseDepthwiseConv): method __init__ (line 100) | def __init__( FILE: keras/src/layers/convolutional/depthwise_conv2d.py class DepthwiseConv2D (line 6) | class DepthwiseConv2D(BaseDepthwiseConv): method __init__ (line 101) | def __init__( FILE: keras/src/layers/convolutional/depthwise_conv_test.py function _same_padding (line 10) | def _same_padding(input_size, kernel_size, stride): function np_depthwise_conv1d (line 18) | def np_depthwise_conv1d( function np_depthwise_conv2d (line 89) | def np_depthwise_conv2d( class DepthwiseConvBasicTest (line 169) | class DepthwiseConvBasicTest(testing.TestCase): method test_depthwise_conv1d_basic (line 203) | def test_depthwise_conv1d_basic( method test_depthwise_conv2d_basic (line 265) | def test_depthwise_conv2d_basic( method test_bad_init_args (line 294) | def test_bad_init_args(self): class DepthwiseConvCorrectnessTest (line 339) | class DepthwiseConvCorrectnessTest(testing.TestCase): method test_depthwise_conv1d (line 366) | def test_depthwise_conv1d( method test_depthwise_conv2d (line 431) | def test_depthwise_conv2d( FILE: keras/src/layers/convolutional/separable_conv1d.py class SeparableConv1D (line 11) | class SeparableConv1D(BaseSeparableConv): method __init__ (line 98) | def __init__( FILE: keras/src/layers/convolutional/separable_conv2d.py class SeparableConv2D (line 11) | class SeparableConv2D(BaseSeparableConv): method __init__ (line 99) | def __init__( FILE: keras/src/layers/convolutional/separable_conv_test.py class SeparableConvBasicTest (line 17) | class SeparableConvBasicTest(testing.TestCase): method test_separable_conv1d_basic (line 54) | def test_separable_conv1d_basic( method test_separable_conv2d_basic (line 121) | def test_separable_conv2d_basic( method test_bad_init_args (line 152) | def test_bad_init_args(self): class SeparableConvCorrectnessTest (line 211) | class SeparableConvCorrectnessTest(testing.TestCase): method test_separable_conv1d (line 241) | def test_separable_conv1d( method test_separable_conv2d (line 335) | def test_separable_conv2d( FILE: keras/src/layers/core/dense.py class Dense (line 21) | class Dense(Layer): method __init__ (line 84) | def __init__( method build (line 124) | def build(self, input_shape): method kernel (line 159) | def kernel(self): method call (line 216) | def call(self, inputs, training=None): method compute_output_shape (line 224) | def compute_output_shape(self, input_shape): method enable_lora (line 229) | def enable_lora( method save_own_variables (line 286) | def save_own_variables(self, store): method load_own_variables (line 323) | def load_own_variables(self, store): method get_config (line 356) | def get_config(self): method from_config (line 382) | def from_config(cls, config): method variable_serialization_spec (line 392) | def variable_serialization_spec(self): method quantized_build (line 443) | def quantized_build(self, kernel_shape, mode, config=None): method _int8_build (line 458) | def _int8_build(self, kernel_shape, config=None): method _gptq_build (line 479) | def _gptq_build(self, kernel_shape, config): method _gptq_call (line 528) | def _gptq_call(self, inputs, training=False): method _awq_build (line 563) | def _awq_build(self, kernel_shape, config): method _awq_call (line 620) | def _awq_call(self, inputs, training=False): method _int4_build (line 654) | def _int4_build(self, kernel_shape, config=None): method _float8_build (line 727) | def _float8_build(self): method _int8_call (line 770) | def _int8_call(self, inputs, training=None): method _int4_call (line 819) | def _int4_call(self, inputs, training=None): method _float8_call (line 928) | def _float8_call(self, inputs, training=None): method quantize (line 1019) | def quantize(self, mode=None, type_check=True, config=None): method _get_kernel_with_merged_lora (line 1111) | def _get_kernel_with_merged_lora(self): FILE: keras/src/layers/core/dense_test.py class DenseTest (line 27) | class DenseTest(testing.TestCase): method test_dense_quantize_config (line 38) | def test_dense_quantize_config( method test_dense_basics (line 85) | def test_dense_basics(self): method test_dense_invalid_units_raises (line 129) | def test_dense_invalid_units_raises(self, units): method test_dense_correctness (line 133) | def test_dense_correctness(self): method test_dense_errors (line 162) | def test_dense_errors(self): method test_dense_sparse (line 172) | def test_dense_sparse(self): method test_dense_no_activation (line 231) | def test_dense_no_activation(self): method test_dense_without_activation_set (line 245) | def test_dense_without_activation_set(self): method test_dense_with_activation (line 260) | def test_dense_with_activation(self): method test_dense_constraints (line 276) | def test_dense_constraints(self): method test_enable_lora (line 285) | def test_enable_lora(self): method test_enable_lora_with_alpha (line 351) | def test_enable_lora_with_alpha(self): method test_lora_weight_name (line 377) | def test_lora_weight_name(self): method test_lora_rank_argument (line 397) | def test_lora_rank_argument(self): method test_enable_lora_with_kernel_constraint (line 415) | def test_enable_lora_with_kernel_constraint(self): method test_enable_lora_on_unbuilt_layer (line 422) | def test_enable_lora_on_unbuilt_layer(self): method test_enable_lora_when_already_enabled (line 429) | def test_enable_lora_when_already_enabled(self): method test_quantize_int (line 442) | def test_quantize_int(self, mode, error_threshold): method test_quantize_on_unbuilt_layer (line 490) | def test_quantize_on_unbuilt_layer(self, mode): method test_quantize_on_subclass (line 502) | def test_quantize_on_subclass(self, mode): method test_quantize_when_already_quantized (line 518) | def test_quantize_when_already_quantized(self, mode): method test_quantize_by_setting_dtype_policy (line 544) | def test_quantize_by_setting_dtype_policy( method test_quantize_invalid_mode (line 556) | def test_quantize_invalid_mode(self, mode): method test_quantize_dtype_argument (line 593) | def test_quantize_dtype_argument( method test_quantize_lora_integration (line 616) | def test_quantize_lora_integration( method test_quantize_float8 (line 706) | def test_quantize_float8(self): method test_quantize_float8_fitting (line 821) | def test_quantize_float8_fitting(self): method test_quantize_float8_inference (line 874) | def test_quantize_float8_inference(self): method test_gptq_serialization (line 887) | def test_gptq_serialization(self): method test_awq_serialization (line 903) | def test_awq_serialization(self): method test_int4_kernel_returns_unpacked_form (line 919) | def test_int4_kernel_returns_unpacked_form(self): method test_legacy_load_own_variables (line 931) | def test_legacy_load_own_variables(self): method test_int4_gptq_kernel_returns_unpacked_form (line 1045) | def test_int4_gptq_kernel_returns_unpacked_form(self): method test_gptq_kernel_packing (line 1062) | def test_gptq_kernel_packing(self): method test_int4_awq_kernel_returns_unpacked_form (line 1079) | def test_int4_awq_kernel_returns_unpacked_form(self): method test_awq_kernel_packing (line 1096) | def test_awq_kernel_packing(self): method _check_quantizer_config (line 1113) | def _check_quantizer_config( method test_dense_int8_custom_quantizer (line 1123) | def test_dense_int8_custom_quantizer(self): method test_dense_int8_weight_only_quantizer (line 1163) | def test_dense_int8_weight_only_quantizer(self): method test_dense_int4_custom_quantizer (line 1192) | def test_dense_int4_custom_quantizer(self): method test_int4_quantization_block_size (line 1243) | def test_int4_quantization_block_size(self, block_size): method test_int4_block_size_serialization (line 1283) | def test_int4_block_size_serialization(self, block_size): method test_int4_block_size_with_lora (line 1323) | def test_int4_block_size_with_lora(self, block_size): method test_int4_grouped_vs_perchannel_scale_shapes (line 1342) | def test_int4_grouped_vs_perchannel_scale_shapes(self): method test_int4_subchannel_g_idx_created (line 1374) | def test_int4_subchannel_g_idx_created(self, block_size): method test_int4_perchannel_no_g_idx (line 1396) | def test_int4_perchannel_no_g_idx(self): method test_int4_subchannel_g_idx_serialization (line 1410) | def test_int4_subchannel_g_idx_serialization(self): FILE: keras/src/layers/core/einsum_dense.py class EinsumDense (line 26) | class EinsumDense(Layer): method __init__ (line 126) | def __init__( method build (line 164) | def build(self, input_shape): method kernel (line 213) | def kernel(self): method compute_output_shape (line 273) | def compute_output_shape(self, _): method call (line 276) | def call(self, inputs, training=None): method enable_lora (line 284) | def enable_lora( method save_own_variables (line 338) | def save_own_variables(self, store): method load_own_variables (line 375) | def load_own_variables(self, store): method get_config (line 408) | def get_config(self): method from_config (line 440) | def from_config(cls, config): method variable_serialization_spec (line 450) | def variable_serialization_spec(self): method quantized_build (line 501) | def quantized_build(self, kernel_shape, mode, config=None): method _int8_build (line 516) | def _int8_build(self, kernel_shape, config=None): method _gptq_build (line 542) | def _gptq_build(self, kernel_shape, config): method _gptq_call (line 622) | def _gptq_call(self, inputs, training=False): method _awq_build (line 658) | def _awq_build(self, kernel_shape, config): method _awq_call (line 743) | def _awq_call(self, inputs, training=False): method _int4_build (line 779) | def _int4_build(self, kernel_shape, config=None): method _float8_build (line 857) | def _float8_build(self): method _int8_call (line 900) | def _int8_call(self, inputs, training=None): method _int4_call (line 989) | def _int4_call(self, inputs, training=None): method _float8_call (line 1132) | def _float8_call(self, inputs, training=None): method quantize (line 1224) | def quantize(self, mode=None, type_check=True, config=None): method _get_kernel_scale_shape (line 1320) | def _get_kernel_scale_shape(self, kernel_shape, block_size=None): method _get_kernel_with_merged_lora (line 1364) | def _get_kernel_with_merged_lora(self): method _adjust_scale_for_dequant (line 1496) | def _adjust_scale_for_dequant(self, scale): method _adjust_scale_for_quant (line 1521) | def _adjust_scale_for_quant(self, scale, tensor_type="kernel"): method _set_quantization_info (line 1553) | def _set_quantization_info(self): function _analyze_einsum_string (line 1571) | def _analyze_einsum_string(equation, bias_axes, input_shape, output_shape): function _analyze_split_string (line 1632) | def _analyze_split_string( function _analyze_quantization_info (line 1766) | def _analyze_quantization_info(equation, input_shape): FILE: keras/src/layers/core/einsum_dense_test.py class EinsumDenseTest (line 27) | class EinsumDenseTest(testing.TestCase): method test_einsum_dense_quantize (line 44) | def test_einsum_dense_quantize( method test_einsum_dense_basics (line 317) | def test_einsum_dense_basics( method test_einsum_dense_constraints (line 352) | def test_einsum_dense_constraints(self): method test_enable_lora (line 365) | def test_enable_lora(self): method test_enable_lora_with_alpha (line 439) | def test_enable_lora_with_alpha(self): method test_lora_rank_argument (line 484) | def test_lora_rank_argument(self): method test_quantize_int (line 508) | def test_quantize_int(self, mode, error_threshold): method test_quantize_with_specific_equations (line 622) | def test_quantize_with_specific_equations( method test_quantize_on_unbuilt_layer (line 645) | def test_quantize_on_unbuilt_layer(self, mode): method test_quantize_on_subclass (line 661) | def test_quantize_on_subclass(self, mode): method test_quantize_when_already_quantized (line 681) | def test_quantize_when_already_quantized(self, mode): method test_quantize_by_setting_dtype_policy (line 713) | def test_quantize_by_setting_dtype_policy( method test_quantize_invalid_mode (line 730) | def test_quantize_invalid_mode(self, mode): method test_quantize_dtype_argument (line 768) | def test_quantize_dtype_argument( method test_quantize_lora_integration (line 812) | def test_quantize_lora_integration( method test_quantize_float8 (line 901) | def test_quantize_float8(self): method test_quantize_float8_fitting (line 1020) | def test_quantize_float8_fitting(self): method test_quantize_float8_inference (line 1077) | def test_quantize_float8_inference(self): method test_gptq_serialization (line 1094) | def test_gptq_serialization(self): method test_awq_serialization (line 1115) | def test_awq_serialization(self): method test_int4_kernel_returns_unpacked_form (line 1136) | def test_int4_kernel_returns_unpacked_form(self): method test_legacy_load_own_variables (line 1153) | def test_legacy_load_own_variables(self): method test_int4_gptq_kernel_returns_unpacked_form (line 1274) | def test_int4_gptq_kernel_returns_unpacked_form(self): method test_gptq_kernel_packing (line 1294) | def test_gptq_kernel_packing(self): method test_int4_awq_kernel_returns_unpacked_form (line 1319) | def test_int4_awq_kernel_returns_unpacked_form(self): method test_awq_kernel_packing (line 1339) | def test_awq_kernel_packing(self): method test_einsum_dense_int8_custom_quantizer (line 1364) | def test_einsum_dense_int8_custom_quantizer(self): method test_int4_quantization_block_size (line 1404) | def test_int4_quantization_block_size(self, block_size): method test_int4_block_size_serialization (line 1452) | def test_int4_block_size_serialization(self, block_size): method test_int4_block_size_with_lora (line 1496) | def test_int4_block_size_with_lora(self, block_size): method test_int4_grouped_vs_perchannel_scale_shapes (line 1518) | def test_int4_grouped_vs_perchannel_scale_shapes(self): method test_int4_block_size_various_equations (line 1558) | def test_int4_block_size_various_equations( method test_int4_grouped_multi_reduced_axes (line 1595) | def test_int4_grouped_multi_reduced_axes( method test_int4_multi_reduced_axes_scale_shape (line 1623) | def test_int4_multi_reduced_axes_scale_shape(self): method test_int4_multi_reduced_axes_serialization (line 1650) | def test_int4_multi_reduced_axes_serialization(self): method test_int4_multi_reduced_vs_single_reduced (line 1678) | def test_int4_multi_reduced_vs_single_reduced(self): method test_int4_subchannel_g_idx_created (line 1723) | def test_int4_subchannel_g_idx_created(self, block_size): method test_int4_perchannel_no_g_idx (line 1748) | def test_int4_perchannel_no_g_idx(self): method test_int4_subchannel_g_idx_serialization (line 1766) | def test_int4_subchannel_g_idx_serialization(self): FILE: keras/src/layers/core/embedding.py class Embedding (line 21) | class Embedding(Layer): method __init__ (line 87) | def __init__( method build (line 126) | def build(self, input_shape=None): method embeddings (line 150) | def embeddings(self): method call (line 166) | def call(self, inputs): method compute_mask (line 172) | def compute_mask(self, inputs, mask=None): method compute_output_shape (line 177) | def compute_output_shape(self, input_shape): method compute_output_spec (line 180) | def compute_output_spec(self, inputs): method enable_lora (line 187) | def enable_lora( method save_own_variables (line 227) | def save_own_variables(self, store): method load_own_variables (line 269) | def load_own_variables(self, store): method get_config (line 308) | def get_config(self): method from_config (line 336) | def from_config(cls, config): method _quantization_mode_error (line 345) | def _quantization_mode_error(self, mode): method variable_serialization_spec (line 352) | def variable_serialization_spec(self): method quantized_build (line 375) | def quantized_build(self, embeddings_shape, mode, config=None): method _int8_build (line 384) | def _int8_build(self, embeddings_shape, config=None): method _int4_build (line 402) | def _int4_build(self, embeddings_shape, config=None): method _int8_call (line 463) | def _int8_call(self, inputs, training=None): method _int4_call (line 483) | def _int4_call(self, inputs, training=None): method quantize (line 524) | def quantize(self, mode=None, type_check=True, config=None): method _get_embeddings_with_merged_lora (line 623) | def _get_embeddings_with_merged_lora(self): FILE: keras/src/layers/core/embedding_test.py class EmbeddingTest (line 23) | class EmbeddingTest(test_case.TestCase): method test_embedding_quantize_config (line 33) | def test_embedding_quantize_config(self, mode, weight_quantizer_args): method test_embedding_basics (line 65) | def test_embedding_basics(self): method test_sparse (line 95) | def test_sparse(self): method test_ragged (line 114) | def test_ragged(self): method test_correctness (line 131) | def test_correctness(self): method test_correctness_sparse (line 142) | def test_correctness_sparse(self): method test_masking (line 168) | def test_masking(self): method test_compute_mask_no_masking (line 174) | def test_compute_mask_no_masking(self): method test_embedding_constraints (line 180) | def test_embedding_constraints(self): method test_weights_constructor_arg (line 185) | def test_weights_constructor_arg(self): method test_enable_lora (line 192) | def test_enable_lora(self): method test_enable_lora_with_alpha (line 258) | def test_enable_lora_with_alpha(self): method test_lora_rank_argument (line 292) | def test_lora_rank_argument(self): method test_enable_lora_with_embeddings_constraint (line 306) | def test_enable_lora_with_embeddings_constraint(self): method test_enable_lora_when_already_enabled (line 315) | def test_enable_lora_when_already_enabled(self): method test_quantize_int (line 328) | def test_quantize_int(self, mode): method test_quantize_on_unbuilt_layer (line 384) | def test_quantize_on_unbuilt_layer(self, mode): method test_quantize_on_subclass (line 395) | def test_quantize_on_subclass(self, mode): method test_quantize_when_already_quantized (line 410) | def test_quantize_when_already_quantized(self, mode): method test_quantize_by_setting_dtype_policy (line 432) | def test_quantize_by_setting_dtype_policy( method test_quantize_invalid_mode (line 444) | def test_quantize_invalid_mode(self, mode): method test_quantize_dtype_argument (line 482) | def test_quantize_dtype_argument( method test_quantize_lora_integration (line 520) | def test_quantize_lora_integration( method test_legacy_load_own_variables (line 604) | def test_legacy_load_own_variables(self): method test_embedding_int8_custom_quantizer (line 639) | def test_embedding_int8_custom_quantizer(self): method test_int4_quantization_block_size (line 674) | def test_int4_quantization_block_size(self, block_size): method test_int4_block_size_serialization (line 712) | def test_int4_block_size_serialization(self, block_size): method test_int4_block_size_with_lora (line 752) | def test_int4_block_size_with_lora(self, block_size): method test_int4_grouped_vs_perchannel_scale_shapes (line 768) | def test_int4_grouped_vs_perchannel_scale_shapes(self): method test_int4_subchannel_g_idx_created (line 802) | def test_int4_subchannel_g_idx_created(self, block_size): method test_int4_perchannel_no_g_idx (line 824) | def test_int4_perchannel_no_g_idx(self): method test_int4_subchannel_g_idx_serialization (line 838) | def test_int4_subchannel_g_idx_serialization(self): FILE: keras/src/layers/core/identity.py class Identity (line 8) | class Identity(Layer): method __init__ (line 15) | def __init__(self, **kwargs): method call (line 21) | def call(self, inputs): method compute_output_shape (line 24) | def compute_output_shape(self, input_shape): method compute_output_spec (line 27) | def compute_output_spec(self, inputs): FILE: keras/src/layers/core/identity_test.py class IdentityTest (line 9) | class IdentityTest(testing.TestCase): method test_identity_basics (line 17) | def test_identity_basics(self, sparse): FILE: keras/src/layers/core/input_layer.py class InputLayer (line 10) | class InputLayer(Layer): method __init__ (line 11) | def __init__( method call (line 123) | def call(self): method batch_shape (line 127) | def batch_shape(self): method dtype (line 131) | def dtype(self): method get_config (line 134) | def get_config(self): function Input (line 146) | def Input( FILE: keras/src/layers/core/input_layer_test.py class InputLayerTest (line 10) | class InputLayerTest(testing.TestCase): method test_input_basic (line 19) | def test_input_basic(self, sparse=False, ragged=False): method test_input_error1 (line 61) | def test_input_error1(self): method test_input_error2 (line 70) | def test_input_error2(self): method test_input_error3 (line 80) | def test_input_error3(self): method test_input_tensor_error (line 85) | def test_input_tensor_error(self): method testing_input_tensor (line 100) | def testing_input_tensor(self): method test_input_shape_deprecated (line 117) | def test_input_shape_deprecated(self): method test_call_method (line 135) | def test_call_method(self): method test_numpy_shape (line 140) | def test_numpy_shape(self): method test_invalid_arg_combinations (line 144) | def test_invalid_arg_combinations(self): FILE: keras/src/layers/core/lambda_layer.py class Lambda (line 13) | class Lambda(Layer): method __init__ (line 62) | def __init__( method compute_output_shape (line 84) | def compute_output_shape(self, input_shape): method call (line 112) | def call(self, inputs, mask=None, training=None): method compute_mask (line 122) | def compute_mask(self, inputs, mask=None): method get_config (line 127) | def get_config(self): method _serialize_function_to_config (line 151) | def _serialize_function_to_config(self, fn): method _raise_for_lambda_deserialization (line 170) | def _raise_for_lambda_deserialization(safe_mode): method from_config (line 183) | def from_config(cls, config, custom_objects=None, safe_mode=None): FILE: keras/src/layers/core/lambda_layer_test.py class LambdaTest (line 9) | class LambdaTest(testing.TestCase): method test_lambda_basics (line 11) | def test_lambda_basics(self): method test_correctness (line 74) | def test_correctness(self): method test_correctness_lambda_shape (line 85) | def test_correctness_lambda_shape(self): FILE: keras/src/layers/core/masking.py class Masking (line 9) | class Masking(Layer): method __init__ (line 47) | def __init__(self, mask_value=0.0, **kwargs): method compute_mask (line 57) | def compute_mask(self, inputs, mask=None): method call (line 60) | def call(self, inputs): method compute_output_shape (line 70) | def compute_output_shape(self, input_shape): method get_config (line 73) | def get_config(self): FILE: keras/src/layers/core/masking_test.py class MaskingTest (line 13) | class MaskingTest(testing.TestCase): method test_masking_basics (line 15) | def test_masking_basics(self): method test_masking_correctness (line 30) | def test_masking_correctness(self): method test_masking_with_tensor (line 66) | def test_masking_with_tensor(self): FILE: keras/src/layers/core/reversible_embedding.py class ReversibleEmbedding (line 17) | class ReversibleEmbedding(layers.Embedding): method __init__ (line 83) | def __init__( method build (line 109) | def build(self, inputs_shape=None): method call (line 122) | def call(self, inputs, reverse=False): method compute_mask (line 146) | def compute_mask(self, inputs, mask=None): method compute_output_shape (line 150) | def compute_output_shape(self, input_shape, reverse=False): method compute_output_spec (line 158) | def compute_output_spec(self, inputs, reverse=False): method get_config (line 166) | def get_config(self): method variable_serialization_spec (line 178) | def variable_serialization_spec(self): method quantized_build (line 191) | def quantized_build(self, embeddings_shape, mode, config=None): method _int8_build (line 200) | def _int8_build(self, embeddings_shape, config=None): method _int4_build (line 225) | def _int4_build(self, embeddings_shape, config=None): method _int8_call (line 272) | def _int8_call(self, inputs, reverse=False): method _int4_call (line 298) | def _int4_call(self, inputs, reverse=False): method quantize (line 383) | def quantize(self, mode=None, type_check=True, config=None): FILE: keras/src/layers/core/reversible_embedding_test.py class ReversibleEmbeddingTest (line 21) | class ReversibleEmbeddingTest(test_case.TestCase): method test_reversible_embedding_quantize (line 32) | def test_reversible_embedding_quantize( method test_reversible_embedding_basics (line 79) | def test_reversible_embedding_basics(self, tie_weights): method test_saving (line 98) | def test_saving(self, tie_weights): method test_correctness (line 116) | def test_correctness(self): method test_reverse_dtype (line 137) | def test_reverse_dtype(self): method test_quantize_int (line 159) | def test_quantize_int(self, mode, tie_weights): method test_quantize_dtype_argument (line 216) | def test_quantize_dtype_argument( method test_reversible_embedding_int8_custom_quantizer (line 239) | def test_reversible_embedding_int8_custom_quantizer(self): method test_masking (line 267) | def test_masking(self): method test_int4_quantization_block_size (line 285) | def test_int4_quantization_block_size(self, block_size, tie_weights): method test_int4_block_size_serialization (line 344) | def test_int4_block_size_serialization(self, block_size, tie_weights): method test_int4_grouped_vs_perchannel_scale_shapes (line 395) | def test_int4_grouped_vs_perchannel_scale_shapes( method test_int4_subchannel_g_idx_created (line 443) | def test_int4_subchannel_g_idx_created(self, block_size): method test_int4_perchannel_no_g_idx (line 467) | def test_int4_perchannel_no_g_idx(self): method test_int4_subchannel_g_idx_serialization (line 481) | def test_int4_subchannel_g_idx_serialization(self): FILE: keras/src/layers/core/wrapper.py class Wrapper (line 7) | class Wrapper(Layer): method __init__ (line 18) | def __init__(self, layer, **kwargs): method build (line 28) | def build(self, input_shape=None): method get_config (line 33) | def get_config(self): method from_config (line 39) | def from_config(cls, config, custom_objects=None): FILE: keras/src/layers/core/wrapper_test.py class ExampleWrapper (line 8) | class ExampleWrapper(layers.Wrapper): method call (line 11) | def call(self, inputs, **kwargs): class WrapperTest (line 15) | class WrapperTest(testing.TestCase): method test_wrapper_basics (line 17) | def test_wrapper_basics(self): method test_wrapper_invalid_layer (line 72) | def test_wrapper_invalid_layer(self): FILE: keras/src/layers/input_spec.py class InputSpec (line 7) | class InputSpec: method __init__ (line 51) | def __init__( method __repr__ (line 95) | def __repr__(self): method get_config (line 106) | def get_config(self): method from_config (line 118) | def from_config(cls, config): function assert_input_compatibility (line 122) | def assert_input_compatibility(input_spec, inputs, layer_name): FILE: keras/src/layers/layer.py class Layer (line 72) | class Layer(BackendLayer, Operation): method __new__ (line 223) | def __new__(cls, *args, **kwargs): method __init__ (line 265) | def __init__( method _initialize_tracker (line 343) | def _initialize_tracker(self): method _build_at_init (line 395) | def _build_at_init(self): method path (line 408) | def path(self): method input_spec (line 416) | def input_spec(self): method input_spec (line 420) | def input_spec(self, value): method build (line 424) | def build(self, input_shape): method _lock_state (line 437) | def _lock_state(self): method get_build_config (line 450) | def get_build_config(self): method build_from_config (line 474) | def build_from_config(self, config): method _obj_type (line 491) | def _obj_type(self): method add_variable (line 494) | def add_variable( method add_weight (line 520) | def add_weight( method trainable (line 635) | def trainable(self): method trainable (line 640) | def trainable(self, value): method variables (line 660) | def variables(self): method trainable_variables (line 687) | def trainable_variables(self): method non_trainable_variables (line 697) | def non_trainable_variables(self): method weights (line 708) | def weights(self): method trainable_weights (line 729) | def trainable_weights(self): method non_trainable_weights (line 739) | def non_trainable_weights(self): method metrics (line 751) | def metrics(self): method metrics_variables (line 759) | def metrics_variables(self): method get_weights (line 766) | def get_weights(self): method set_weights (line 770) | def set_weights(self, weights): method dtype_policy (line 789) | def dtype_policy(self): method dtype_policy (line 793) | def dtype_policy(self, value): method dtype (line 815) | def dtype(self): method compute_dtype (line 820) | def compute_dtype(self): method variable_dtype (line 829) | def variable_dtype(self): method quantization_mode (line 838) | def quantization_mode(self): method input_dtype (line 847) | def input_dtype(self): method supports_masking (line 852) | def supports_masking(self): method supports_masking (line 857) | def supports_masking(self, value): method compute_mask (line 861) | def compute_mask(self, inputs, previous_mask): method symbolic_call (line 864) | def symbolic_call(self, *args, **kwargs): method __call__ (line 869) | def __call__(self, *args, **kwargs): method call (line 1058) | def call(self, *args, **kwargs): method _resolve_and_populate_arg (line 1061) | def _resolve_and_populate_arg( method stateless_call (line 1085) | def stateless_call( method compute_output_spec (line 1198) | def compute_output_spec(self, *args, **kwargs): method compute_output_shape (line 1245) | def compute_output_shape(self, *args, **kwargs): method add_loss (line 1251) | def add_loss(self, loss): method _get_own_losses (line 1281) | def _get_own_losses(self): method _get_regularization_losses (line 1292) | def _get_regularization_losses(self): method losses (line 1308) | def losses(self): method _clear_losses (line 1319) | def _clear_losses(self): method quantized_build (line 1336) | def quantized_build(self, input_shape, mode): method quantize (line 1339) | def quantize(self, mode=None, type_check=True, config=None): method _check_quantize_args (line 1342) | def _check_quantize_args(self, mode, compute_dtype): method quantized_call (line 1369) | def quantized_call(self, *args, **kwargs): method _int4_call (line 1396) | def _int4_call(self, *args, **kwargs): method _int8_call (line 1399) | def _int8_call(self, *args, **kwargs): method _float8_call (line 1402) | def _float8_call(self, *args, **kwargs): method _gptq_call (line 1405) | def _gptq_call(self, *args, **kwargs): method _awq_call (line 1408) | def _awq_call(self, *args, **kwargs): method _not_implemented_error (line 1411) | def _not_implemented_error(self, attr, msg=None): method _quantization_mode_error (line 1424) | def _quantization_mode_error(self, mode): method save_own_variables (line 1431) | def save_own_variables(self, store): method _check_load_own_variables (line 1444) | def _check_load_own_variables(self, store): method load_own_variables (line 1478) | def load_own_variables(self, store): method _track_variable (line 1492) | def _track_variable(self, variable): method _untrack_variable (line 1501) | def _untrack_variable(self, variable): method add_metric (line 1509) | def add_metric(self, *args, **kwargs): method count_params (line 1519) | def count_params(self): method _maybe_build (line 1535) | def _maybe_build(self, call_spec): method _build_by_run_for_single_pos_arg (line 1583) | def _build_by_run_for_single_pos_arg(self, input_shape): method _build_by_run_for_kwargs (line 1594) | def _build_by_run_for_kwargs(self, shapes_dict): method __repr__ (line 1612) | def __repr__(self): method __str__ (line 1617) | def __str__(self): method __setattr__ (line 1620) | def __setattr__(self, name, value): method __delattr__ (line 1640) | def __delattr__(self, name): method _check_super_called (line 1654) | def _check_super_called(self): method _assert_input_compatibility (line 1662) | def _assert_input_compatibility(self, arg_0): method _get_call_context (line 1678) | def _get_call_context(self): method _maybe_reset_call_context (line 1690) | def _maybe_reset_call_context(self): method _flatten_layers (line 1695) | def _flatten_layers(self, include_self=True, recursive=True): method _set_mask_metadata (line 1712) | def _set_mask_metadata(self, inputs, outputs, previous_mask): method get_config (line 1737) | def get_config(self): method _open_name_scope (line 1750) | def _open_name_scope(self): method rematerialized_call (line 1763) | def rematerialized_call(self, layer_call, *args, **kwargs): method _register_call_context_args (line 1819) | def _register_call_context_args(self, *names): function is_backend_tensor_or_symbolic (line 1882) | def is_backend_tensor_or_symbolic(x, allow_none=False): class CallSpec (line 1888) | class CallSpec: method __init__ (line 1889) | def __init__(self, signature, call_context_args, args, kwargs): function get_arguments_dict (line 1949) | def get_arguments_dict(fn, args, kwargs): function get_shapes_dict (line 1959) | def get_shapes_dict(call_spec): function update_shapes_dict_for_target_fn (line 1990) | def update_shapes_dict_for_target_fn( class CallContext (line 2066) | class CallContext: method __init__ (line 2067) | def __init__(self, entry_layer): method get_value (line 2070) | def get_value(self, arg_name, default=None): method set_value (line 2074) | def set_value(self, arg_name, value): function is_shape_tuple (line 2079) | def is_shape_tuple(s): function might_have_unbuilt_state (line 2085) | def might_have_unbuilt_state(layer): FILE: keras/src/layers/layer_test.py class MockRemat (line 21) | class MockRemat: method __init__ (line 24) | def __init__(self): method __call__ (line 27) | def __call__(self, func): class LayerTest (line 36) | class LayerTest(testing.TestCase): method test_compute_output_spec (line 37) | def test_compute_output_spec(self): method test_positional_arg_error (line 146) | def test_positional_arg_error(self): method test_not_implemented_error (line 174) | def test_not_implemented_error(self, method, args): method test_layer_with_remat (line 187) | def test_layer_with_remat(self): method test_quantized_layer_with_remat (line 216) | def test_quantized_layer_with_remat(self): method test_gptq_quantization_by_setting_dtype (line 235) | def test_gptq_quantization_by_setting_dtype(self): method test_functional_model_with_remat (line 249) | def test_functional_model_with_remat(self): method test_remat_wrapper_list_of_layers (line 278) | def test_remat_wrapper_list_of_layers(self): method test_remat_larger_than_mode (line 309) | def test_remat_larger_than_mode(self): method test_remat_larger_than_mode_high_threshold (line 335) | def test_remat_larger_than_mode_high_threshold(self): method test_rng_seed_tracking (line 360) | def test_rng_seed_tracking(self): method test_layer_tracking (line 399) | def test_layer_tracking(self): method test_metric_tracking (line 448) | def test_metric_tracking(self): method test_build_on_call (line 497) | def test_build_on_call(self): method test_activity_regularization (line 570) | def test_activity_regularization(self): method test_activity_regularization_batch_normalization (line 596) | def test_activity_regularization_batch_normalization(self, batch_size): method test_add_loss (line 608) | def test_add_loss(self): method test_training_arg_value_resolution (line 637) | def test_training_arg_value_resolution(self): method test_mixed_precision (line 711) | def test_mixed_precision(self): method test_autocast (line 731) | def test_autocast(self): method test_autocast_with_np_array (line 810) | def test_autocast_with_np_array(self): method test_keras_mask_with_autocast (line 828) | def test_keras_mask_with_autocast(self): method test_end_to_end_masking (line 854) | def test_end_to_end_masking(self): method test_masking (line 871) | def test_masking(self): method test_masking_with_explicit_kwarg_propagation (line 976) | def test_masking_with_explicit_kwarg_propagation(self): method test_stateless_call (line 1009) | def test_stateless_call(self): method test_trainable_setting (line 1079) | def test_trainable_setting(self): method test_build_signature_errors (line 1151) | def test_build_signature_errors(self): method test_training_arg_not_specified (line 1223) | def test_training_arg_not_specified(self): method test_tracker_locking (line 1238) | def test_tracker_locking(self): method test_init_after_state_tracking (line 1251) | def test_init_after_state_tracking(self): method test_add_weight_defaults (line 1261) | def test_add_weight_defaults(self): method test_add_weight_string_as_first_positional_arg (line 1295) | def test_add_weight_string_as_first_positional_arg(self): method test_remove_weight (line 1362) | def test_remove_weight(self): method test_trainable_init_arg (line 1390) | def test_trainable_init_arg(self): method test_dtype_policy_setter (line 1411) | def test_dtype_policy_setter(self): method test_pickle_layer (line 1436) | def test_pickle_layer(self): method test_serialize_dtype (line 1441) | def test_serialize_dtype(self): method test_serialize_activity_regularizer (line 1479) | def test_serialize_activity_regularizer(self): method test_custom_layer_add_weight_in_init_name (line 1492) | def test_custom_layer_add_weight_in_init_name(self): method test_custom_layer_add_weight_in_build_name (line 1528) | def test_custom_layer_add_weight_in_build_name(self): method test_layer_variable_tracking_correct (line 1585) | def test_layer_variable_tracking_correct(self): method test_torch_params_create_deterministic (line 1706) | def test_torch_params_create_deterministic(self): method test_complex_dtype_support (line 1727) | def test_complex_dtype_support(self): method test_call_context_args_with_custom_layers (line 1747) | def test_call_context_args_with_custom_layers(self): method test_register_call_context_arguments (line 1771) | def test_register_call_context_arguments(self): method test_register_call_context_arguments_after_call (line 1786) | def test_register_call_context_arguments_after_call(self): method test_context_args_with_triple_nesting_and_priority (line 1802) | def test_context_args_with_triple_nesting_and_priority(self): method test_context_arg_propagation_without_declaration (line 1842) | def test_context_arg_propagation_without_declaration(self): method test_call_context_args_with_func_seq_models_as_layers (line 1867) | def test_call_context_args_with_func_seq_models_as_layers(self): method test_layer_build_with_attention_mask_arg (line 1925) | def test_layer_build_with_attention_mask_arg(self): FILE: keras/src/layers/merging/add.py class Add (line 7) | class Add(Merge): method _merge_function (line 33) | def _merge_function(self, inputs): function add (line 41) | def add(inputs, **kwargs): FILE: keras/src/layers/merging/average.py class Average (line 7) | class Average(Merge): method _merge_function (line 33) | def _merge_function(self, inputs): function average (line 41) | def average(inputs, **kwargs): FILE: keras/src/layers/merging/base_merge.py class Merge (line 7) | class Merge(Layer): method __init__ (line 16) | def __init__(self, **kwargs): method _merge_function (line 20) | def _merge_function(self, inputs): method _apply_merge_op_and_or_mask (line 23) | def _apply_merge_op_and_or_mask(self, op_fn, inputs): method _compute_elemwise_op_output_shape (line 60) | def _compute_elemwise_op_output_shape(self, shape1, shape2): method build (line 100) | def build(self, input_shape): method call (line 143) | def call(self, inputs): method compute_output_shape (line 227) | def compute_output_shape(self, input_shape): method compute_output_spec (line 248) | def compute_output_spec(self, inputs): method compute_mask (line 255) | def compute_mask(self, inputs, mask=None): method get_config (line 279) | def get_config(self): FILE: keras/src/layers/merging/concatenate.py class Concatenate (line 9) | class Concatenate(Merge): method __init__ (line 36) | def __init__(self, axis=-1, **kwargs): method build (line 42) | def build(self, input_shape): method _merge_function (line 101) | def _merge_function(self, inputs): method compute_output_shape (line 104) | def compute_output_shape(self, input_shape): method compute_mask (line 122) | def compute_mask(self, inputs, mask=None): method get_config (line 160) | def get_config(self): function concatenate (line 167) | def concatenate(inputs, axis=-1, **kwargs): FILE: keras/src/layers/merging/dot.py function batch_dot (line 7) | def batch_dot(x, y, axes=None): class Dot (line 199) | class Dot(Merge): method __init__ (line 242) | def __init__(self, axes, normalize=False, **kwargs): method build (line 265) | def build(self, input_shape): method _merge_function (line 294) | def _merge_function(self, inputs): method compute_output_shape (line 325) | def compute_output_shape(self, input_shape): method compute_mask (line 348) | def compute_mask(self, inputs, mask=None): method get_config (line 351) | def get_config(self): function dot (line 361) | def dot(inputs, axes=-1, **kwargs): FILE: keras/src/layers/merging/maximum.py class Maximum (line 7) | class Maximum(Merge): method _merge_function (line 33) | def _merge_function(self, inputs): function maximum (line 38) | def maximum(inputs, **kwargs): FILE: keras/src/layers/merging/merging_test.py function np_dot (line 12) | def np_dot(a, b, axes): class MergingLayersTest (line 81) | class MergingLayersTest(testing.TestCase): method test_basic (line 83) | def test_basic( method test_correctness_static (line 104) | def test_correctness_static( method test_correctness_dynamic (line 142) | def test_correctness_dynamic( method test_errors (line 179) | def test_errors( method test_subtract_layer_inputs_length_errors (line 210) | def test_subtract_layer_inputs_length_errors(self): method test_dot_higher_dim (line 225) | def test_dot_higher_dim(self): method test_add_with_mask (line 238) | def test_add_with_mask(self): method test_subtract_with_mask (line 252) | def test_subtract_with_mask(self): method test_average_with_mask (line 266) | def test_average_with_mask(self): method test_multiply_with_mask (line 280) | def test_multiply_with_mask(self): method test_maximum_with_mask (line 294) | def test_maximum_with_mask(self): method test_minimum_with_mask (line 310) | def test_minimum_with_mask(self): method test_concatenate_with_mask (line 324) | def test_concatenate_with_mask(self): method test_concatenate_with_mask_symbolic (line 343) | def test_concatenate_with_mask_symbolic(self): method test_concatenate_errors (line 355) | def test_concatenate_errors(self): method test_sparse (line 389) | def test_sparse( FILE: keras/src/layers/merging/minimum.py class Minimum (line 7) | class Minimum(Merge): method _merge_function (line 33) | def _merge_function(self, inputs): function minimum (line 38) | def minimum(inputs, **kwargs): FILE: keras/src/layers/merging/multiply.py class Multiply (line 8) | class Multiply(Merge): method _merge_function (line 34) | def _merge_function(self, inputs): function multiply (line 62) | def multiply(inputs, **kwargs): FILE: keras/src/layers/merging/subtract.py class Subtract (line 7) | class Subtract(Merge): method build (line 34) | def build(self, input_shape): method _merge_function (line 42) | def _merge_function(self, inputs): function subtract (line 52) | def subtract(inputs, **kwargs): FILE: keras/src/layers/normalization/batch_normalization.py function _clone_initializer (line 12) | def _clone_initializer(initializer): class BatchNormalization (line 32) | class BatchNormalization(Layer): method __init__ (line 160) | def __init__( method build (line 240) | def build(self, input_shape): method compute_output_shape (line 319) | def compute_output_shape(self, input_shape): method call (line 334) | def call(self, inputs, training=None, mask=None): method get_config (line 407) | def get_config(self): method _moments (line 434) | def _moments(self, inputs, mask): method _renorm_correction_and_moments (line 472) | def _renorm_correction_and_moments(self, mean, variance): method _compose_transforms (line 513) | def _compose_transforms(self, r, d, gamma, beta, dtype): method _update_renorm_statistics (line 545) | def _update_renorm_statistics(self, mean, variance): FILE: keras/src/layers/normalization/batch_normalization_test.py class BatchNormalizationTest (line 15) | class BatchNormalizationTest(testing.TestCase): method test_bn_basics (line 17) | def test_bn_basics(self): method test_correctness (line 74) | def test_correctness( method test_input_fully_masked (line 142) | def test_input_fully_masked(self, synchronized): method test_bachnorm_ignore_masked_values (line 155) | def test_bachnorm_ignore_masked_values(self, run_eagerly, mask_value): method test_trainable_behavior (line 183) | def test_trainable_behavior(self): method test_large_value_within_autocast_scope (line 216) | def test_large_value_within_autocast_scope(self): method test_masked_broadcast_normalization (line 225) | def test_masked_broadcast_normalization(self): method test_renorm_basics (line 244) | def test_renorm_basics(self): method test_renorm_invalid_clipping_keys (line 283) | def test_renorm_invalid_clipping_keys(self): method test_renorm_stddev_initializer (line 297) | def test_renorm_stddev_initializer(self): method test_renorm_inference (line 309) | def test_renorm_inference(self): method test_renorm_correctness (line 330) | def test_renorm_correctness(self): method test_serialization (line 426) | def test_serialization(self): FILE: keras/src/layers/normalization/group_normalization.py class GroupNormalization (line 12) | class GroupNormalization(Layer): method __init__ (line 67) | def __init__( method build (line 96) | def build(self, input_shape): method call (line 149) | def call(self, inputs): method _reshape_into_groups (line 156) | def _reshape_into_groups(self, inputs): method _apply_normalization (line 169) | def _apply_normalization(self, reshaped_inputs, input_shape): method _create_broadcast_shape (line 204) | def _create_broadcast_shape(self, input_shape): method compute_output_shape (line 210) | def compute_output_shape(self, input_shape): method get_config (line 225) | def get_config(self): FILE: keras/src/layers/normalization/group_normalization_test.py class GroupNormalizationTest (line 10) | class GroupNormalizationTest(testing.TestCase): method test_groupnorm (line 12) | def test_groupnorm(self): method test_undefined_dim_error (line 44) | def test_undefined_dim_error(self): method test_groups_bigger_than_dim_error (line 56) | def test_groups_bigger_than_dim_error(self): method test_groups_not_a_multiple_of_dim_error (line 65) | def test_groups_not_a_multiple_of_dim_error(self): method test_groups_instance_norm (line 74) | def test_groups_instance_norm(self): method test_correctness_instance_norm (line 89) | def test_correctness_instance_norm(self): method test_correctness_1d (line 106) | def test_correctness_1d(self): method test_correctness_2d (line 134) | def test_correctness_2d(self): method test_broadcasting_2d_channels_first (line 163) | def test_broadcasting_2d_channels_first(self): FILE: keras/src/layers/normalization/layer_normalization.py class LayerNormalization (line 12) | class LayerNormalization(Layer): method __init__ (line 105) | def __init__( method build (line 153) | def build(self, input_shape): method call (line 186) | def call(self, inputs): method compute_output_shape (line 197) | def compute_output_shape(self, input_shape): method get_config (line 212) | def get_config(self): FILE: keras/src/layers/normalization/layer_normalization_test.py class LayerNormalizationTest (line 11) | class LayerNormalizationTest(testing.TestCase): method test_ln_basics (line 13) | def test_ln_basics(self): method test_invalid_axis (line 87) | def test_invalid_axis(self): method test_correctness (line 94) | def test_correctness(self): method test_output (line 108) | def test_output(self): method test_output_with_rms_scaling (line 118) | def test_output_with_rms_scaling(self): method test_large_value_within_autocast_scope (line 128) | def test_large_value_within_autocast_scope(self): method test_unsorted_axis (line 137) | def test_unsorted_axis(self): FILE: keras/src/layers/normalization/rms_normalization.py class RMSNormalization (line 7) | class RMSNormalization(Layer): method __init__ (line 45) | def __init__(self, axis=-1, epsilon=1e-6, **kwargs): method build (line 50) | def build(self, input_shape): method call (line 64) | def call(self, x): method compute_output_shape (line 78) | def compute_output_shape(self, input_shape): method get_config (line 93) | def get_config(self): FILE: keras/src/layers/normalization/rms_normalization_test.py class RMSNormalizationTest (line 9) | class RMSNormalizationTest(testing.TestCase): method test_ln_basics (line 11) | def test_ln_basics(self): method test_correctness (line 31) | def test_correctness(self): method test_output (line 51) | def test_output(self): method test_unsorted_axis (line 73) | def test_unsorted_axis(self): FILE: keras/src/layers/normalization/spectral_normalization.py class SpectralNormalization (line 10) | class SpectralNormalization(Wrapper): method __init__ (line 44) | def __init__(self, layer, power_iterations=1, **kwargs): method build (line 53) | def build(self, input_shape): method call (line 77) | def call(self, inputs, training=False): method compute_output_shape (line 90) | def compute_output_shape(self, input_shape): method normalized_weights (line 93) | def normalized_weights(self): method get_config (line 118) | def get_config(self): FILE: keras/src/layers/normalization/spectral_normalization_test.py class SpectralNormalizationTest (line 11) | class SpectralNormalizationTest(testing.TestCase): method test_basic_spectralnorm (line 13) | def test_basic_spectralnorm(self): method test_spectralnorm_higher_dim (line 39) | def test_spectralnorm_higher_dim(self): method test_invalid_power_iterations (line 52) | def test_invalid_power_iterations(self): method test_invalid_layer (line 58) | def test_invalid_layer(self): method test_apply_layer (line 66) | def test_apply_layer(self): method test_end_to_end (line 86) | def test_end_to_end(self): FILE: keras/src/layers/normalization/unit_normalization.py class UnitNormalization (line 7) | class UnitNormalization(Layer): method __init__ (line 27) | def __init__(self, axis=-1, **kwargs): method call (line 43) | def call(self, inputs): method compute_output_shape (line 46) | def compute_output_shape(self, input_shape): method get_config (line 61) | def get_config(self): FILE: keras/src/layers/normalization/unit_normalization_test.py function squared_l2_norm (line 9) | def squared_l2_norm(x): class UnitNormalizationTest (line 14) | class UnitNormalizationTest(testing.TestCase): method test_un_basics (line 16) | def test_un_basics(self): method test_invalid_axis (line 34) | def test_invalid_axis(self): method test_correctness (line 44) | def test_correctness(self): FILE: keras/src/layers/pooling/adaptive_average_pooling1d.py class AdaptiveAveragePooling1D (line 10) | class AdaptiveAveragePooling1D(BaseAdaptiveAveragePooling): method __init__ (line 49) | def __init__(self, output_size, data_format=None, **kwargs): FILE: keras/src/layers/pooling/adaptive_average_pooling2d.py class AdaptiveAveragePooling2D (line 10) | class AdaptiveAveragePooling2D(BaseAdaptiveAveragePooling): method __init__ (line 51) | def __init__(self, output_size, data_format=None, **kwargs): FILE: keras/src/layers/pooling/adaptive_average_pooling3d.py class AdaptiveAveragePooling3D (line 10) | class AdaptiveAveragePooling3D(BaseAdaptiveAveragePooling): method __init__ (line 51) | def __init__(self, output_size, data_format=None, **kwargs): FILE: keras/src/layers/pooling/adaptive_max_pooling1d.py class AdaptiveMaxPooling1D (line 10) | class AdaptiveMaxPooling1D(BaseAdaptiveMaxPooling): method __init__ (line 49) | def __init__(self, output_size, data_format=None, **kwargs): FILE: keras/src/layers/pooling/adaptive_max_pooling2d.py class AdaptiveMaxPooling2D (line 10) | class AdaptiveMaxPooling2D(BaseAdaptiveMaxPooling): method __init__ (line 51) | def __init__(self, output_size, data_format=None, **kwargs): FILE: keras/src/layers/pooling/adaptive_max_pooling3d.py class AdaptiveMaxPooling3D (line 10) | class AdaptiveMaxPooling3D(BaseAdaptiveMaxPooling): method __init__ (line 51) | def __init__(self, output_size, data_format=None, **kwargs): FILE: keras/src/layers/pooling/adaptive_pooling1d_test.py class AdaptivePooling1DLayerTest (line 7) | class AdaptivePooling1DLayerTest(testing.TestCase): method _run_layer_test (line 10) | def _run_layer_test(self, layer_class, x_np, output_size, data_format): method test_average_pooling_basic_shapes (line 17) | def test_average_pooling_basic_shapes(self): method test_max_pooling_basic_shapes (line 28) | def test_max_pooling_basic_shapes(self): method test_average_pooling_channels_last (line 39) | def test_average_pooling_channels_last(self): method test_max_pooling_channels_last (line 50) | def test_max_pooling_channels_last(self): method test_average_pooling_compute_output_shape (line 61) | def test_average_pooling_compute_output_shape(self): method test_max_pooling_compute_output_shape (line 70) | def test_max_pooling_compute_output_shape(self): method test_average_pooling_get_config (line 79) | def test_average_pooling_get_config(self): method test_max_pooling_get_config (line 88) | def test_max_pooling_get_config(self): method test_average_pooling_numerical (line 97) | def test_average_pooling_numerical(self): method test_max_pooling_numerical (line 109) | def test_max_pooling_numerical(self): FILE: keras/src/layers/pooling/adaptive_pooling2d_test.py class AdaptivePooling2DLayerTest (line 7) | class AdaptivePooling2DLayerTest(testing.TestCase): method _run_layer_test (line 10) | def _run_layer_test(self, layer_class, x_np, output_size, data_format): method test_average_pooling_basic_shapes (line 17) | def test_average_pooling_basic_shapes(self): method test_max_pooling_basic_shapes (line 28) | def test_max_pooling_basic_shapes(self): method test_average_pooling_channels_last (line 39) | def test_average_pooling_channels_last(self): method test_max_pooling_channels_last (line 50) | def test_max_pooling_channels_last(self): method test_average_pooling_tuple_output_size (line 61) | def test_average_pooling_tuple_output_size(self): method test_max_pooling_tuple_output_size (line 72) | def test_max_pooling_tuple_output_size(self): method test_average_pooling_compute_output_shape (line 83) | def test_average_pooling_compute_output_shape(self): method test_max_pooling_compute_output_shape (line 92) | def test_max_pooling_compute_output_shape(self): method test_average_pooling_get_config (line 101) | def test_average_pooling_get_config(self): method test_max_pooling_get_config (line 110) | def test_max_pooling_get_config(self): method test_average_pooling2d_numerical (line 119) | def test_average_pooling2d_numerical(self): method test_max_pooling2d_numerical (line 142) | def test_max_pooling2d_numerical(self): FILE: keras/src/layers/pooling/adaptive_pooling3d_test.py class AdaptivePooling3DLayerTest (line 7) | class AdaptivePooling3DLayerTest(testing.TestCase): method _run_layer_test (line 10) | def _run_layer_test(self, layer_class, x_np, output_size, data_format): method test_average_pooling_basic_shapes (line 17) | def test_average_pooling_basic_shapes(self): method test_max_pooling_basic_shapes (line 28) | def test_max_pooling_basic_shapes(self): method test_average_pooling_channels_last (line 39) | def test_average_pooling_channels_last(self): method test_max_pooling_channels_last (line 50) | def test_max_pooling_channels_last(self): method test_average_pooling_tuple_output_size (line 61) | def test_average_pooling_tuple_output_size(self): method test_max_pooling_tuple_output_size (line 72) | def test_max_pooling_tuple_output_size(self): method test_average_pooling_compute_output_shape (line 83) | def test_average_pooling_compute_output_shape(self): method test_max_pooling_compute_output_shape (line 92) | def test_max_pooling_compute_output_shape(self): method test_average_pooling_get_config (line 101) | def test_average_pooling_get_config(self): method test_max_pooling_get_config (line 110) | def test_max_pooling_get_config(self): method test_average_pooling3d_numerical (line 119) | def test_average_pooling3d_numerical(self): method test_max_pooling3d_numerical (line 136) | def test_max_pooling3d_numerical(self): FILE: keras/src/layers/pooling/average_pooling1d.py class AveragePooling1D (line 6) | class AveragePooling1D(BasePooling): method __init__ (line 74) | def __init__( FILE: keras/src/layers/pooling/average_pooling2d.py class AveragePooling2D (line 6) | class AveragePooling2D(BasePooling): method __init__ (line 91) | def __init__( FILE: keras/src/layers/pooling/average_pooling3d.py class AveragePooling3D (line 6) | class AveragePooling3D(BasePooling): method __init__ (line 67) | def __init__( FILE: keras/src/layers/pooling/average_pooling_test.py function _same_padding (line 11) | def _same_padding(input_size, pool_size, stride): function np_avgpool1d (line 18) | def np_avgpool1d(x, pool_size, strides, padding, data_format): function np_avgpool2d (line 52) | def np_avgpool2d(x, pool_size, strides, padding, data_format): function np_avgpool3d (line 91) | def np_avgpool3d(x, pool_size, strides, padding, data_format): class AveragePoolingBasicTest (line 138) | class AveragePoolingBasicTest(testing.TestCase): method test_average_pooling1d (line 144) | def test_average_pooling1d( method test_average_pooling2d (line 179) | def test_average_pooling2d( method test_average_pooling3d (line 217) | def test_average_pooling3d( class AveragePoolingCorrectnessTest (line 246) | class AveragePoolingCorrectnessTest(testing.TestCase): method test_average_pooling1d (line 253) | def test_average_pooling1d(self, pool_size, strides, padding, data_for... method test_average_pooling1d_same_padding (line 278) | def test_average_pooling1d_same_padding( method test_average_pooling2d (line 299) | def test_average_pooling2d(self, pool_size, strides, padding, data_for... method test_average_pooling2d_same_padding (line 323) | def test_average_pooling2d_same_padding( method test_average_pooling3d (line 345) | def test_average_pooling3d(self, pool_size, strides, padding, data_for... method test_average_pooling3d_same_padding (line 370) | def test_average_pooling3d_same_padding( FILE: keras/src/layers/pooling/base_adaptive_pooling.py class BaseAdaptivePooling (line 8) | class BaseAdaptivePooling(Layer): method __init__ (line 11) | def __init__(self, output_size, data_format=None, **kwargs): method compute_output_shape (line 29) | def compute_output_shape(self, input_shape): method get_config (line 39) | def get_config(self): class BaseAdaptiveAveragePooling (line 48) | class BaseAdaptiveAveragePooling(BaseAdaptivePooling): method call (line 51) | def call(self, inputs): class BaseAdaptiveMaxPooling (line 57) | class BaseAdaptiveMaxPooling(BaseAdaptivePooling): method call (line 60) | def call(self, inputs): FILE: keras/src/layers/pooling/base_global_pooling.py class BaseGlobalPooling (line 6) | class BaseGlobalPooling(Layer): method __init__ (line 9) | def __init__( method call (line 20) | def call(self, inputs): method compute_output_shape (line 23) | def compute_output_shape(self, input_shape): method get_config (line 42) | def get_config(self): FILE: keras/src/layers/pooling/base_pooling.py class BasePooling (line 9) | class BasePooling(Layer): method __init__ (line 12) | def __init__( method call (line 40) | def call(self, inputs): method compute_output_shape (line 63) | def compute_output_shape(self, input_shape): method get_config (line 72) | def get_config(self): FILE: keras/src/layers/pooling/global_average_pooling1d.py class GlobalAveragePooling1D (line 13) | class GlobalAveragePooling1D(BaseGlobalPooling): method __init__ (line 62) | def __init__(self, data_format=None, keepdims=False, **kwargs): method call (line 71) | def call(self, inputs, mask=None): method compute_mask (line 85) | def compute_mask(self, inputs, mask=None): FILE: keras/src/layers/pooling/global_average_pooling2d.py class GlobalAveragePooling2D (line 12) | class GlobalAveragePooling2D(BaseGlobalPooling): method __init__ (line 57) | def __init__(self, data_format=None, keepdims=False, **kwargs): method call (line 65) | def call(self, inputs): FILE: keras/src/layers/pooling/global_average_pooling3d.py class GlobalAveragePooling3D (line 12) | class GlobalAveragePooling3D(BaseGlobalPooling): method __init__ (line 58) | def __init__(self, data_format=None, keepdims=False, **kwargs): method call (line 66) | def call(self, inputs): FILE: keras/src/layers/pooling/global_average_pooling_test.py class GlobalAveragePoolingBasicTest (line 10) | class GlobalAveragePoolingBasicTest(testing.TestCase): method test_global_average_pooling1d (line 16) | def test_global_average_pooling1d( method test_global_average_pooling2d (line 43) | def test_global_average_pooling2d( method test_global_average_pooling3d (line 70) | def test_global_average_pooling3d( class GlobalAveragePoolingCorrectnessTest (line 93) | class GlobalAveragePoolingCorrectnessTest(testing.TestCase): method test_global_average_pooling1d (line 100) | def test_global_average_pooling1d(self, data_format, keepdims): method test_global_average_pooling2d (line 138) | def test_global_average_pooling2d(self, data_format, keepdims): method test_global_average_pooling3d (line 161) | def test_global_average_pooling3d(self, data_format, keepdims): FILE: keras/src/layers/pooling/global_max_pooling1d.py class GlobalMaxPooling1D (line 12) | class GlobalMaxPooling1D(BaseGlobalPooling): method __init__ (line 56) | def __init__(self, data_format=None, keepdims=False, **kwargs): method call (line 64) | def call(self, inputs): FILE: keras/src/layers/pooling/global_max_pooling2d.py class GlobalMaxPooling2D (line 12) | class GlobalMaxPooling2D(BaseGlobalPooling): method __init__ (line 57) | def __init__(self, data_format=None, keepdims=False, **kwargs): method call (line 65) | def call(self, inputs): FILE: keras/src/layers/pooling/global_max_pooling3d.py class GlobalMaxPooling3D (line 12) | class GlobalMaxPooling3D(BaseGlobalPooling): method __init__ (line 58) | def __init__(self, data_format=None, keepdims=False, **kwargs): method call (line 66) | def call(self, inputs): FILE: keras/src/layers/pooling/global_max_pooling_test.py class GlobalMaxPoolingBasicTest (line 10) | class GlobalMaxPoolingBasicTest(testing.TestCase): method test_global_max_pooling1d (line 16) | def test_global_max_pooling1d( method test_global_max_pooling2d (line 43) | def test_global_max_pooling2d( method test_global_max_pooling3d (line 70) | def test_global_max_pooling3d( class GlobalMaxPoolingCorrectnessTest (line 93) | class GlobalMaxPoolingCorrectnessTest(testing.TestCase): method test_global_max_pooling1d (line 100) | def test_global_max_pooling1d(self, data_format, keepdims): method test_global_max_pooling2d (line 123) | def test_global_max_pooling2d(self, data_format, keepdims): method test_global_max_pooling3d (line 146) | def test_global_max_pooling3d(self, data_format, keepdims): FILE: keras/src/layers/pooling/max_pooling1d.py class MaxPooling1D (line 6) | class MaxPooling1D(BasePooling): method __init__ (line 75) | def __init__( FILE: keras/src/layers/pooling/max_pooling2d.py class MaxPooling2D (line 6) | class MaxPooling2D(BasePooling): method __init__ (line 91) | def __init__( FILE: keras/src/layers/pooling/max_pooling3d.py class MaxPooling3D (line 6) | class MaxPooling3D(BasePooling): method __init__ (line 67) | def __init__( FILE: keras/src/layers/pooling/max_pooling_test.py function _same_padding (line 10) | def _same_padding(input_size, pool_size, stride): function np_maxpool1d (line 17) | def np_maxpool1d(x, pool_size, strides, padding, data_format): function np_maxpool2d (line 51) | def np_maxpool2d(x, pool_size, strides, padding, data_format): function np_maxpool3d (line 90) | def np_maxpool3d(x, pool_size, strides, padding, data_format): class MaxPoolingBasicTest (line 137) | class MaxPoolingBasicTest(testing.TestCase): method test_max_pooling1d (line 143) | def test_max_pooling1d( method test_max_pooling2d (line 174) | def test_max_pooling2d( method test_max_pooling3d (line 212) | def test_max_pooling3d( class MaxPoolingCorrectnessTest (line 241) | class MaxPoolingCorrectnessTest(testing.TestCase): method test_max_pooling1d (line 250) | def test_max_pooling1d(self, pool_size, strides, padding, data_format): method test_max_pooling2d (line 272) | def test_max_pooling2d(self, pool_size, strides, padding, data_format): method test_max_pooling3d (line 293) | def test_max_pooling3d(self, pool_size, strides, padding, data_format): FILE: keras/src/layers/preprocessing/category_encoding.py class CategoryEncoding (line 9) | class CategoryEncoding(DataLayer): method __init__ (line 88) | def __init__( method _encode (line 117) | def _encode(self, inputs, count_weights=None): method compute_output_shape (line 129) | def compute_output_shape(self, input_shape): method compute_output_spec (line 141) | def compute_output_spec(self, inputs, count_weights=None): method get_config (line 147) | def get_config(self): method call (line 155) | def call(self, inputs, count_weights=None): FILE: keras/src/layers/preprocessing/category_encoding_test.py class CategoryEncodingTest (line 14) | class CategoryEncodingTest(testing.TestCase): method test_count_output (line 16) | def test_count_output(self, sparse): method test_count_weighted_output (line 40) | def test_count_weighted_output(self, sparse): method test_batched_count_output (line 77) | def test_batched_count_output(self, sparse): method test_multi_hot (line 101) | def test_multi_hot(self, sparse): method test_batched_multi_hot (line 125) | def test_batched_multi_hot(self, sparse): method test_one_hot (line 159) | def test_one_hot(self, sparse): method test_batched_one_hot (line 218) | def test_batched_one_hot(self, sparse): method test_tf_data_compatibility (line 256) | def test_tf_data_compatibility(self): method test_category_encoding_without_num_tokens (line 274) | def test_category_encoding_without_num_tokens(self): method test_category_encoding_with_invalid_num_tokens (line 280) | def test_category_encoding_with_invalid_num_tokens(self): method test_category_encoding_with_unnecessary_count_weights (line 287) | def test_category_encoding_with_unnecessary_count_weights(self): method test_invalid_output_mode_raises_error (line 296) | def test_invalid_output_mode_raises_error(self): method test_encode_one_hot_single_sample (line 302) | def test_encode_one_hot_single_sample(self): method test_encode_one_hot_batched_samples (line 316) | def test_encode_one_hot_batched_samples(self): method test_count_single_sample (line 328) | def test_count_single_sample(self): method test_count_batched_samples (line 335) | def test_count_batched_samples(self): FILE: keras/src/layers/preprocessing/data_layer.py class DataLayer (line 10) | class DataLayer(Layer): method __init__ (line 94) | def __init__(self, **kwargs): method __call__ (line 99) | def __call__(self, inputs, **kwargs): method _get_seed_generator (line 137) | def _get_seed_generator(self, backend=None): method convert_weight (line 153) | def convert_weight(self, weight): FILE: keras/src/layers/preprocessing/data_layer_test.py class RandomRGBToHSVLayer (line 12) | class RandomRGBToHSVLayer(DataLayer): method __init__ (line 13) | def __init__(self, data_format=None, seed=None, **kwargs): method call (line 19) | def call(self, inputs): method compute_output_shape (line 37) | def compute_output_shape(self, input_shape): class DataLayerTest (line 41) | class DataLayerTest(testing.TestCase): method test_layer (line 43) | def test_layer(self): method test_tf_data_compatibility (line 66) | def test_tf_data_compatibility(self): method test_grain_compatibility (line 79) | def test_grain_compatibility(self): FILE: keras/src/layers/preprocessing/discretization.py class Discretization (line 12) | class Discretization(DataLayer): method __init__ (line 88) | def __init__( method input_dtype (line 152) | def input_dtype(self): method output_dtype (line 156) | def output_dtype(self): method adapt (line 159) | def adapt(self, data, steps=None): method update_state (line 199) | def update_state(self, data): method finalize_state (line 204) | def finalize_state(self): method reset_state (line 211) | def reset_state(self): method compute_output_shape (line 216) | def compute_output_shape(self, input_shape): method compute_output_spec (line 244) | def compute_output_spec(self, inputs): method load_own_variables (line 248) | def load_own_variables(self, store): method call (line 254) | def call(self, inputs): method get_config (line 272) | def get_config(self): method from_config (line 284) | def from_config(cls, config, custom_objects=None): function summarize (line 301) | def summarize(values, epsilon): function merge_summaries (line 334) | def merge_summaries(prev_summary, next_summary, epsilon): function get_bin_boundaries (line 354) | def get_bin_boundaries(summary, num_bins): function compress_summary (line 358) | def compress_summary(summary, epsilon): FILE: keras/src/layers/preprocessing/discretization_test.py class DiscretizationTest (line 16) | class DiscretizationTest(testing.TestCase): method test_discretization_basics (line 17) | def test_discretization_basics(self): method test_adapt_flow (line 33) | def test_adapt_flow(self): method test_correctness (line 93) | def test_correctness( method test_tf_data_compatibility (line 112) | def test_tf_data_compatibility(self): method test_serialization (line 134) | def test_serialization(self): method test_saving (line 160) | def test_saving(self): method test_init_num_bins_and_bin_boundaries_raises (line 193) | def test_init_num_bins_and_bin_boundaries_raises(self): method test_call_before_adapt_raises (line 204) | def test_call_before_adapt_raises(self): method test_model_call_vs_predict_consistency (line 209) | def test_model_call_vs_predict_consistency(self): method test_symbolic_tensor_output_shape (line 266) | def test_symbolic_tensor_output_shape( method test_compute_output_shape_modes (line 325) | def test_compute_output_shape_modes( method test_compute_output_shape_edge_cases (line 335) | def test_compute_output_shape_edge_cases(self): method test_compute_output_spec_method (line 353) | def test_compute_output_spec_method(self): method test_batch_dimension_consistency (line 372) | def test_batch_dimension_consistency(self, batch_size): method test_compute_output_shape_num_bins (line 461) | def test_compute_output_shape_num_bins( FILE: keras/src/layers/preprocessing/feature_space.py class Cross (line 15) | class Cross(KerasSaveable): method __init__ (line 16) | def __init__(self, feature_names, crossing_dim, output_mode="one_hot"): method _obj_type (line 27) | def _obj_type(self): method name (line 31) | def name(self): method get_config (line 34) | def get_config(self): method from_config (line 42) | def from_config(cls, config): class Feature (line 46) | class Feature(KerasSaveable): method __init__ (line 47) | def __init__(self, dtype, preprocessor, output_mode): method _obj_type (line 62) | def _obj_type(self): method get_config (line 65) | def get_config(self): method from_config (line 75) | def from_config(cls, config): class FeatureSpace (line 80) | class FeatureSpace(Layer): method cross (line 279) | def cross(cls, feature_names, crossing_dim, output_mode="one_hot"): method feature (line 283) | def feature(cls, dtype, preprocessor, output_mode): method float (line 287) | def float(cls, name=None): method float_rescaled (line 295) | def float_rescaled(cls, scale=1.0, offset=0.0, name=None): method float_normalized (line 305) | def float_normalized(cls, name=None): method float_discretized (line 315) | def float_discretized( method integer_categorical (line 329) | def integer_categorical( method string_categorical (line 347) | def string_categorical( method string_hashed (line 365) | def string_hashed(cls, num_bins, output_mode="one_hot", name=None): method integer_hashed (line 375) | def integer_hashed(cls, num_bins, output_mode="one_hot", name=None): method __init__ (line 384) | def __init__( method _feature_to_input (line 457) | def _feature_to_input(self, name, feature): method _standardize_feature (line 460) | def _standardize_feature(self, name, feature): method _cross_to_crosser (line 488) | def _cross_to_crosser(self, cross): method _list_adaptable_preprocessors (line 491) | def _list_adaptable_preprocessors(self): method adapt (line 508) | def adapt(self, dataset): method get_inputs (line 548) | def get_inputs(self): method get_encoded_features (line 552) | def get_encoded_features(self): method _preprocess_features (line 564) | def _preprocess_features(self, features): method _cross_features (line 570) | def _cross_features(self, features): method _merge_features (line 578) | def _merge_features(self, preprocessed_features, crossed_features): method _check_if_adapted (line 686) | def _check_if_adapted(self): method _check_if_built (line 696) | def _check_if_built(self): method _convert_input (line 703) | def _convert_input(self, x): method __call__ (line 710) | def __call__(self, data): method get_config (line 773) | def get_config(self): method from_config (line 784) | def from_config(cls, config): method get_build_config (line 787) | def get_build_config(self): method build_from_config (line 793) | def build_from_config(self, config): method save (line 800) | def save(self, filepath): method save_own_variables (line 812) | def save_own_variables(self, store): method load_own_variables (line 815) | def load_own_variables(self, store): class TFDConcat (line 819) | class TFDConcat(DataLayer): method __init__ (line 820) | def __init__(self, axis, **kwargs): method call (line 824) | def call(self, xs): class TFDIdentity (line 828) | class TFDIdentity(DataLayer): method call (line 829) | def call(self, x): FILE: keras/src/layers/preprocessing/feature_space_test.py class FeatureSpaceTest (line 15) | class FeatureSpaceTest(testing.TestCase): method _get_train_data_dict (line 16) | def _get_train_data_dict( method test_basic_usage_no_strings (line 68) | def test_basic_usage_no_strings(self): method test_output_mode_dict_no_strings (line 119) | def test_output_mode_dict_no_strings(self): method test_output_mode_dict_of_ints_no_strings (line 163) | def test_output_mode_dict_of_ints_no_strings(self): method test_basic_usage (line 204) | def test_basic_usage(self): method test_output_mode_dict (line 248) | def test_output_mode_dict(self): method test_output_mode_dict_of_ints (line 293) | def test_output_mode_dict_of_ints(self): method test_functional_api_sync_processing (line 341) | def test_functional_api_sync_processing(self): method test_tf_data_async_processing (line 369) | def test_tf_data_async_processing(self): method test_advanced_usage (line 406) | def test_advanced_usage(self): method test_manual_kpl (line 434) | def test_manual_kpl(self): method test_no_adapt (line 454) | def test_no_adapt(self): method test_saving (line 536) | def test_saving(self): method test_errors (line 590) | def test_errors(self): method test_adapt_with_dict (line 642) | def test_adapt_with_dict(self): FILE: keras/src/layers/preprocessing/hashed_crossing.py class HashedCrossing (line 12) | class HashedCrossing(Layer): method __init__ (line 72) | def __init__( method compute_output_shape (line 110) | def compute_output_shape(self, input_shape): method call (line 138) | def call(self, inputs): method get_config (line 178) | def get_config(self): method _check_at_least_two_inputs (line 187) | def _check_at_least_two_inputs(self, inputs): method _check_input_shape_and_type (line 199) | def _check_input_shape_and_type(self, inputs): FILE: keras/src/layers/preprocessing/hashed_crossing_test.py class HashedCrossingTest (line 12) | class HashedCrossingTest(testing.TestCase): method test_basics (line 13) | def test_basics(self): method test_correctness (line 53) | def test_correctness(self, sparse): method test_tf_data_compatibility (line 80) | def test_tf_data_compatibility(self): method test_static_shape_preserved (line 92) | def test_static_shape_preserved(self): method test_unsupported_shape_input_fails (line 109) | def test_unsupported_shape_input_fails(self): method test_cross_output_dtype (line 116) | def test_cross_output_dtype(self): method test_non_list_input_fails (line 142) | def test_non_list_input_fails(self): method test_single_input_fails (line 146) | def test_single_input_fails(self): method test_sparse_input_fails (line 154) | def test_sparse_input_fails(self): method test_float_input_fails (line 161) | def test_float_input_fails(self): method test_tf_string (line 173) | def test_tf_string(self): FILE: keras/src/layers/preprocessing/hashing.py class Hashing (line 11) | class Hashing(Layer): method __init__ (line 137) | def __init__( method call (line 212) | def call(self, inputs): method _hash_values_to_bins (line 237) | def _hash_values_to_bins(self, values): method compute_output_spec (line 265) | def compute_output_spec(self, inputs): method get_config (line 276) | def get_config(self): FILE: keras/src/layers/preprocessing/hashing_test.py class ArrayLike (line 15) | class ArrayLike: method __init__ (line 16) | def __init__(self, values): method __array__ (line 19) | def __array__(self): class HashingTest (line 26) | class HashingTest(testing.TestCase): method test_config (line 27) | def test_config(self): method test_correctness (line 34) | def test_correctness(self): method test_tf_data_compatibility (line 59) | def test_tf_data_compatibility(self): method test_tensor_like_inputs (line 72) | def test_tensor_like_inputs(self, data_fn): method test_hash_single_bin (line 80) | def test_hash_single_bin(self): method test_hash_dense_input_farmhash (line 86) | def test_hash_dense_input_farmhash(self): method test_hash_dense_input_mask_value_farmhash (line 95) | def test_hash_dense_input_mask_value_farmhash(self): method test_hash_dense_list_input_farmhash (line 109) | def test_hash_dense_list_input_farmhash(self): method test_hash_dense_int_input_farmhash (line 121) | def test_hash_dense_int_input_farmhash(self): method test_hash_dense_input_siphash (line 128) | def test_hash_dense_input_siphash(self): method test_hash_dense_int_input_siphash (line 143) | def test_hash_dense_int_input_siphash(self): method test_hash_sparse_input_farmhash (line 153) | def test_hash_sparse_input_farmhash(self): method test_hash_sparse_input_mask_value_farmhash (line 168) | def test_hash_sparse_input_mask_value_farmhash(self): method test_hash_sparse_int_input_farmhash (line 190) | def test_hash_sparse_int_input_farmhash(self): method test_hash_sparse_input_siphash (line 203) | def test_hash_sparse_input_siphash(self): method test_hash_sparse_int_input_siphash (line 224) | def test_hash_sparse_int_input_siphash(self): method test_invalid_inputs (line 234) | def test_invalid_inputs(self): method test_one_hot_output (line 252) | def test_one_hot_output(self): method test_multi_hot_output (line 273) | def test_multi_hot_output(self): method test_count_output (line 302) | def test_count_output(self, input_value, expected_output, output_shape): method test_int_output_dtype (line 321) | def test_int_output_dtype(self, dtype): method test_one_hot_output_dtype (line 331) | def test_one_hot_output_dtype(self, dtype): method test_config_with_custom_name (line 337) | def test_config_with_custom_name(self): method test_saving (line 346) | def test_saving(self): method test_hash_list_input (line 390) | def test_hash_list_input(self, input_data, expected): method test_hashing_invalid_num_bins (line 397) | def test_hashing_invalid_num_bins(self): method test_hashing_invalid_output_mode (line 412) | def test_hashing_invalid_output_mode(self): method test_hashing_invalid_dtype_for_int_mode (line 420) | def test_hashing_invalid_dtype_for_int_mode(self): method test_hashing_sparse_with_int_mode (line 427) | def test_hashing_sparse_with_int_mode(self): FILE: keras/src/layers/preprocessing/image_preprocessing/aug_mix.py class AugMix (line 40) | class AugMix(BaseImagePreprocessingLayer): method __init__ (line 86) | def __init__( method build (line 200) | def build(self, input_shape): method _sample_from_dirichlet (line 205) | def _sample_from_dirichlet(self, shape, alpha, seed): method get_random_transformation (line 215) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 269) | def transform_images(self, images, transformation, training=True): method transform_labels (line 302) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 305) | def transform_bounding_boxes( method transform_segmentation_masks (line 313) | def transform_segmentation_masks( method compute_output_shape (line 345) | def compute_output_shape(self, input_shape): method get_config (line 348) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/aug_mix_test.py class RandAugmentTest (line 10) | class RandAugmentTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_aug_mix_inference (line 31) | def test_aug_mix_inference(self): method test_random_augment_randomness (line 40) | def test_random_augment_randomness(self): method test_tf_data_compatibility (line 56) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/auto_contrast.py class AutoContrast (line 10) | class AutoContrast(BaseImagePreprocessingLayer): method __init__ (line 36) | def __init__( method _set_value_range (line 44) | def _set_value_range(self, value_range): method transform_images (line 57) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 90) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 93) | def transform_bounding_boxes( method transform_segmentation_masks (line 101) | def transform_segmentation_masks( method get_config (line 106) | def get_config(self): method compute_output_shape (line 111) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/auto_contrast_test.py class AutoContrastTest (line 9) | class AutoContrastTest(testing.TestCase): method test_layer (line 11) | def test_layer(self): method test_constant_channels_dont_get_nanned (line 22) | def test_constant_channels_dont_get_nanned(self): method test_auto_contrast_expands_value_range (line 34) | def test_auto_contrast_expands_value_range(self): method test_auto_contrast_different_values_per_channel (line 46) | def test_auto_contrast_different_values_per_channel(self): method test_auto_contrast_expands_value_range_uint8 (line 72) | def test_auto_contrast_expands_value_range_uint8(self): method test_auto_contrast_properly_converts_value_range (line 84) | def test_auto_contrast_properly_converts_value_range(self): FILE: keras/src/layers/preprocessing/image_preprocessing/base_image_preprocessing_layer.py class BaseImagePreprocessingLayer (line 10) | class BaseImagePreprocessingLayer(DataLayer): method __init__ (line 14) | def __init__( method _set_factor (line 29) | def _set_factor(self, factor): method get_random_transformation (line 58) | def get_random_transformation(self, data, training=True, seed=None): method _transform_images (line 61) | def _transform_images(self, images, transformation, interpolation): method transform_images (line 64) | def transform_images(self, images, transformation, training=True): method transform_labels (line 72) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 75) | def transform_bounding_boxes( method transform_segmentation_masks (line 83) | def transform_segmentation_masks( method transform_single_image (line 92) | def transform_single_image(self, image, transformation, training=True): method transform_single_label (line 99) | def transform_single_label(self, label, transformation, training=True): method transform_single_bounding_box (line 106) | def transform_single_bounding_box( method transform_single_segmentation_mask (line 121) | def transform_single_segmentation_mask( method _is_batched (line 132) | def _is_batched(self, maybe_image_batch): method call (line 143) | def call(self, data, training=True): method _format_single_input_bounding_box (line 231) | def _format_single_input_bounding_box(self, bounding_box): method _format_single_output_bounding_box (line 244) | def _format_single_output_bounding_box(self, bounding_boxes): method get_config (line 257) | def get_config(self): method _transform_value_range (line 267) | def _transform_value_range( method _unwrap_value_range (line 326) | def _unwrap_value_range(self, value_range, dtype="float32"): method _compute_affine_matrix (line 332) | def _compute_affine_matrix( FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/bounding_box.py class BoundingBox (line 18) | class BoundingBox: method __init__ (line 19) | def __init__(self): method convert_format (line 22) | def convert_format( method clip_to_image_size (line 106) | def clip_to_image_size( method affine (line 159) | def affine( method crop (line 226) | def crop(self, boxes, top, left, height, width): method pad (line 241) | def pad(self, boxes, top, left): method _xyxy_to_xyxy (line 254) | def _xyxy_to_xyxy(self, boxes, height=None, width=None): method _yxyx_to_xyxy (line 257) | def _yxyx_to_xyxy(self, boxes, height=None, width=None): method _xywh_to_xyxy (line 261) | def _xywh_to_xyxy(self, boxes, height=None, width=None): method _center_xywh_to_xyxy (line 267) | def _center_xywh_to_xyxy(self, boxes, height=None, width=None): method _center_yxhw_to_xyxy (line 278) | def _center_yxhw_to_xyxy(self, boxes, height=None, width=None): method _rel_xyxy_to_xyxy (line 289) | def _rel_xyxy_to_xyxy(self, boxes, height=None, width=None): method _rel_yxyx_to_xyxy (line 298) | def _rel_yxyx_to_xyxy(self, boxes, height=None, width=None): method _rel_xywh_to_xyxy (line 307) | def _rel_xywh_to_xyxy(self, boxes, height=None, width=None): method _rel_center_xywh_to_xyxy (line 316) | def _rel_center_xywh_to_xyxy(self, boxes, height=None, width=None): method _xyxy_to_yxyx (line 327) | def _xyxy_to_yxyx(self, boxes, height=None, width=None): method _xyxy_to_xywh (line 331) | def _xyxy_to_xywh(self, boxes, height=None, width=None): method _xyxy_to_center_xywh (line 337) | def _xyxy_to_center_xywh(self, boxes, height=None, width=None): method _xyxy_to_center_yxhw (line 345) | def _xyxy_to_center_yxhw(self, boxes, height=None, width=None): method _xyxy_to_rel_xyxy (line 353) | def _xyxy_to_rel_xyxy(self, boxes, height=None, width=None): method _xyxy_to_rel_yxyx (line 363) | def _xyxy_to_rel_yxyx(self, boxes, height=None, width=None): method _xyxy_to_rel_xywh (line 373) | def _xyxy_to_rel_xywh(self, boxes, height=None, width=None): method _xyxy_to_rel_center_xywh (line 383) | def _xyxy_to_rel_center_xywh(self, boxes, height=None, width=None): method _compute_area (line 394) | def _compute_area(self, boxes, format="xyxy"): method _compute_inverse_affine_matrix (line 404) | def _compute_inverse_affine_matrix( FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/converters.py function convert_format (line 11) | def convert_format( function clip_to_image_size (line 74) | def clip_to_image_size( function affine_transform (line 117) | def affine_transform( function crop (line 181) | def crop(boxes, top, left, height, width, bounding_box_format="xyxy"): function pad (line 225) | def pad(boxes, top, left, height=None, width=None, bounding_box_format="... function encode_box_to_deltas (line 256) | def encode_box_to_deltas( function decode_deltas_to_boxes (line 348) | def decode_deltas_to_boxes( FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/converters_test.py class ConvertersTest (line 19) | class ConvertersTest(testing.TestCase): method setUp (line 20) | def setUp(self): method test_convert_all_formats (line 81) | def test_convert_all_formats(self, source, target): method test_convert_format_invalid_source (line 95) | def test_convert_format_invalid_source(self): method test_convert_format_invalid_target (line 100) | def test_convert_format_invalid_target(self): method test_convert_format_missing_dimensions (line 105) | def test_convert_format_missing_dimensions(self): method test_clip_to_image_size (line 112) | def test_clip_to_image_size(self): method test_affine_identity (line 129) | def test_affine_identity(self): FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/formats.py class XYXY (line 1) | class XYXY: class REL_XYXY (line 20) | class REL_XYXY: class CENTER_XYWH (line 41) | class CENTER_XYWH: class XYWH (line 60) | class XYWH: class REL_XYWH (line 79) | class REL_XYWH: class YXYX (line 98) | class YXYX: class REL_YXYX (line 117) | class REL_YXYX: FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/iou.py function _compute_area (line 14) | def _compute_area(box): function _compute_intersection (line 27) | def _compute_intersection(boxes1, boxes2): function compute_iou (line 56) | def compute_iou( function compute_ciou (line 177) | def compute_ciou(boxes1, boxes2, bounding_box_format, image_shape=None): FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/iou_test.py class IoUTest (line 11) | class IoUTest(testing.TestCase): method test_compute_single_iou (line 12) | def test_compute_single_iou(self): method test_compute_iou (line 22) | def test_compute_iou(self): method test_batched_compute_iou (line 44) | def test_batched_compute_iou(self): method test_batched_boxes1_unbatched_boxes2 (line 84) | def test_batched_boxes1_unbatched_boxes2(self): method test_unbatched_boxes1_batched_boxes2 (line 113) | def test_unbatched_boxes1_batched_boxes2(self): class CIoUTest (line 153) | class CIoUTest(testing.TestCase): method test_compute_single_ciou (line 154) | def test_compute_single_ciou(self): method test_compute_ciou (line 161) | def test_compute_ciou(self): method test_batched_compute_ciou (line 178) | def test_batched_compute_ciou(self): method test_batched_boxes1_unbatched_boxes2 (line 197) | def test_batched_boxes1_unbatched_boxes2(self): method test_unbatched_boxes1_batched_boxes2 (line 216) | def test_unbatched_boxes1_batched_boxes2(self): FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/validation.py function _classes_shape (line 5) | def _classes_shape(batched, classes_shape, max_boxes): function _box_shape (line 13) | def _box_shape(batched, boxes_shape, max_boxes): function densify_bounding_boxes (line 24) | def densify_bounding_boxes( function validate_bounding_boxes (line 118) | def validate_bounding_boxes(bounding_boxes): FILE: keras/src/layers/preprocessing/image_preprocessing/bounding_boxes/validation_test.py class DensifyBoundingBoxesTest (line 15) | class DensifyBoundingBoxesTest(test_case.TestCase): method test_densify_ragged_bounding_boxes_batched (line 16) | def test_densify_ragged_bounding_boxes_batched(self): method test_densify_ragged_bounding_boxes_unbatched (line 51) | def test_densify_ragged_bounding_boxes_unbatched(self): FILE: keras/src/layers/preprocessing/image_preprocessing/center_crop.py class CenterCrop (line 15) | class CenterCrop(BaseImagePreprocessingLayer): method __init__ (line 57) | def __init__(self, height, width, data_format=None, **kwargs): method get_random_transformation (line 62) | def get_random_transformation(self, data, training=True, seed=None): method transform_labels (line 70) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 73) | def transform_bounding_boxes( method transform_segmentation_masks (line 177) | def transform_segmentation_masks( method transform_images (line 184) | def transform_images(self, images, transformation=None, training=True): method compute_output_shape (line 239) | def compute_output_shape(self, input_shape): method get_config (line 264) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/center_crop_test.py class CenterCropTest (line 12) | class CenterCropTest(testing.TestCase): method np_center_crop (line 13) | def np_center_crop(self, img, h_new, w_new, data_format="channels_last"): method test_center_crop_basics (line 37) | def test_center_crop_basics(self): method test_center_crop_correctness (line 77) | def test_center_crop_correctness(self, size, data_format): method test_input_smaller_than_crop_box (line 133) | def test_input_smaller_than_crop_box(self, size, data_format): method test_tf_data_compatibility (line 165) | def test_tf_data_compatibility(self): method test_image_stretch (line 202) | def test_image_stretch(self, size, data_format): method test_center_crop_bounding_boxes (line 228) | def test_center_crop_bounding_boxes(self, height, width, expected_boxes): method test_center_crop_tf_data_bounding_boxes (line 266) | def test_center_crop_tf_data_bounding_boxes( method test_dynamic_spatial_dims (line 299) | def test_dynamic_spatial_dims(self): FILE: keras/src/layers/preprocessing/image_preprocessing/clahe.py class ContrastLimitedAdaptiveHistogramEqualization (line 9) | class ContrastLimitedAdaptiveHistogramEqualization(BaseImagePreprocessin... method __init__ (line 75) | def __init__( method transform_images (line 89) | def transform_images(self, images, transformation=None, training=True): method _clahe (line 117) | def _clahe(self, images): method compute_output_shape (line 306) | def compute_output_shape(self, input_shape): method get_config (line 309) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/clahe_test.py class ContrastLimitedAdaptiveHistogramEqualizationTest (line 11) | class ContrastLimitedAdaptiveHistogramEqualizationTest(testing.TestCase): method assertAllInRange (line 12) | def assertAllInRange(self, array, min_val, max_val): method test_layer (line 17) | def test_layer(self): method test_clahe_identity (line 42) | def test_clahe_identity(self): method test_input_dtypes (line 56) | def test_input_dtypes(self, dtype): method test_output_range (line 67) | def test_output_range(self, lower, upper): method test_grayscale_images (line 77) | def test_grayscale_images(self): method test_tf_data_compatibility (line 86) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/cut_mix.py class CutMix (line 12) | class CutMix(BaseImagePreprocessingLayer): method __init__ (line 44) | def __init__(self, factor=1.0, seed=None, data_format=None, **kwargs): method get_random_transformation (line 59) | def get_random_transformation(self, data, training=True, seed=None): method _generate_batch_mask (line 102) | def _generate_batch_mask(self, images_shape, box_corners): method _compute_crop_bounds (line 151) | def _compute_crop_bounds(self, batch_size, image_length, crop_ratio, s... method _generate_mix_weight (line 168) | def _generate_mix_weight(self, batch_size, seed): method transform_images (line 184) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 199) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 212) | def transform_bounding_boxes( method transform_segmentation_masks (line 220) | def transform_segmentation_masks( method compute_output_shape (line 227) | def compute_output_shape(self, input_shape): method get_config (line 230) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/cut_mix_test.py class CutMixTest (line 10) | class CutMixTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_cut_mix_inference (line 26) | def test_cut_mix_inference(self): method test_cut_mix_basic (line 35) | def test_cut_mix_basic(self): method test_tf_data_compatibility (line 75) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/equalization.py class Equalization (line 9) | class Equalization(BaseImagePreprocessingLayer): method __init__ (line 66) | def __init__( method _set_value_range (line 74) | def _set_value_range(self, value_range): method _custom_histogram_fixed_width (line 87) | def _custom_histogram_fixed_width(self, values, value_range, nbins): method _scale_values (line 118) | def _scale_values(self, values, source_range, target_range): method _equalize_channel (line 125) | def _equalize_channel(self, channel, value_range): method _apply_equalization (line 143) | def _apply_equalization(self, channel, hist): method transform_images (line 173) | def transform_images(self, images, transformation, training=True): method compute_output_shape (line 199) | def compute_output_shape(self, input_shape): method compute_output_spec (line 202) | def compute_output_spec(self, inputs, **kwargs): method transform_bounding_boxes (line 205) | def transform_bounding_boxes( method transform_labels (line 213) | def transform_labels(self, labels, transformation, training=True): method transform_segmentation_masks (line 216) | def transform_segmentation_masks( method get_config (line 221) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/equalization_test.py class EqualizationTest (line 11) | class EqualizationTest(testing.TestCase): method assertAllInRange (line 12) | def assertAllInRange(self, array, min_val, max_val): method test_layer (line 17) | def test_layer(self): method test_equalizes_to_all_bins (line 40) | def test_equalizes_to_all_bins(self): method test_input_dtypes (line 53) | def test_input_dtypes(self, dtype): method test_output_range (line 65) | def test_output_range(self, lower, upper): method test_constant_regions (line 73) | def test_constant_regions(self): method test_grayscale_images (line 85) | def test_grayscale_images(self): method test_single_color_image (line 106) | def test_single_color_image(self): method test_different_bin_sizes (line 121) | def test_different_bin_sizes(self): method test_tf_data_compatibility (line 129) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/max_num_bounding_box.py class MaxNumBoundingBoxes (line 8) | class MaxNumBoundingBoxes(BaseImagePreprocessingLayer): method __init__ (line 43) | def __init__(self, max_number, fill_value=-1, **kwargs): method transform_images (line 48) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 51) | def transform_labels(self, labels, transformation=None, training=True): method transform_bounding_boxes (line 54) | def transform_bounding_boxes( method transform_segmentation_masks (line 88) | def transform_segmentation_masks( method compute_output_shape (line 93) | def compute_output_shape(self, input_shape): method get_config (line 112) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/max_num_bounding_box_test.py class MaxNumBoundingBoxesTest (line 9) | class MaxNumBoundingBoxesTest(testing.TestCase): method test_max_num_bounding_boxes_basics (line 10) | def test_max_num_bounding_boxes_basics(self): method test_output_shapes (line 27) | def test_output_shapes(self): method test_output_shapes_with_tf_data (line 51) | def test_output_shapes_with_tf_data(self): FILE: keras/src/layers/preprocessing/image_preprocessing/mix_up.py class MixUp (line 11) | class MixUp(BaseImagePreprocessingLayer): method __init__ (line 38) | def __init__(self, alpha=0.2, data_format=None, seed=None, **kwargs): method get_random_transformation (line 44) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 73) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 93) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 110) | def transform_bounding_boxes( method transform_segmentation_masks (line 150) | def transform_segmentation_masks( method compute_output_shape (line 174) | def compute_output_shape(self, input_shape): method get_config (line 177) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/mix_up_test.py class MixUpTest (line 11) | class MixUpTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_mix_up_inference (line 26) | def test_mix_up_inference(self): method test_mix_up_basic_functionality (line 34) | def test_mix_up_basic_functionality(self): method test_mix_up_basic_functionality_channel_first (line 52) | def test_mix_up_basic_functionality_channel_first(self): method test_tf_data_compatibility (line 70) | def test_tf_data_compatibility(self): method test_mix_up_bounding_boxes (line 77) | def test_mix_up_bounding_boxes(self): method test_mix_up_tf_data_bounding_boxes (line 114) | def test_mix_up_tf_data_bounding_boxes(self): FILE: keras/src/layers/preprocessing/image_preprocessing/rand_augment.py class RandAugment (line 14) | class RandAugment(BaseImagePreprocessingLayer): method __init__ (line 61) | def __init__( method build (line 163) | def build(self, input_shape): method get_random_transformation (line 168) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 202) | def transform_images(self, images, transformation, training=True): method transform_labels (line 220) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 223) | def transform_bounding_boxes( method transform_segmentation_masks (line 255) | def transform_segmentation_masks( method compute_output_shape (line 273) | def compute_output_shape(self, input_shape): method get_config (line 276) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/rand_augment_test.py class RandAugmentTest (line 10) | class RandAugmentTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_rand_augment_inference (line 28) | def test_rand_augment_inference(self): method test_rand_augment_basic (line 37) | def test_rand_augment_basic(self): method test_rand_augment_no_operations (line 48) | def test_rand_augment_no_operations(self): method test_random_augment_randomness (line 61) | def test_random_augment_randomness(self): method test_tf_data_compatibility (line 75) | def test_tf_data_compatibility(self): method test_rand_augment_tf_data_bounding_boxes (line 87) | def test_rand_augment_tf_data_bounding_boxes(self): method test_graph_issue (line 116) | def test_graph_issue(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_brightness.py class RandomBrightness (line 9) | class RandomBrightness(BaseImagePreprocessingLayer): method __init__ (line 71) | def __init__(self, factor, value_range=(0, 255), seed=None, **kwargs): method _set_value_range (line 77) | def _set_value_range(self, value_range): method get_random_transformation (line 90) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 122) | def transform_images(self, images, transformation, training=True): method transform_labels (line 132) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 135) | def transform_bounding_boxes( method transform_segmentation_masks (line 143) | def transform_segmentation_masks( method compute_output_shape (line 148) | def compute_output_shape(self, input_shape): method get_config (line 151) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_brightness_test.py class RandomBrightnessTest (line 10) | class RandomBrightnessTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_random_brightness_inference (line 25) | def test_random_brightness_inference(self): method test_correctness (line 33) | def test_correctness(self): method test_tf_data_compatibility (line 55) | def test_tf_data_compatibility(self): method test_value_range_incorrect_type (line 62) | def test_value_range_incorrect_type(self): method test_value_range_incorrect_length (line 69) | def test_value_range_incorrect_length(self): method test_set_factor_incorrect_length (line 76) | def test_set_factor_incorrect_length(self): method test_set_factor_incorrect_type (line 83) | def test_set_factor_incorrect_type(self): method test_factor_range_below_lower_bound (line 92) | def test_factor_range_below_lower_bound(self): method test_factor_range_above_upper_bound (line 99) | def test_factor_range_above_upper_bound(self): method test_randomly_adjust_brightness_input_incorrect_rank (line 106) | def test_randomly_adjust_brightness_input_incorrect_rank(self): method test_dict_input (line 118) | def test_dict_input(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_color_degeneration.py class RandomColorDegeneration (line 12) | class RandomColorDegeneration(BaseImagePreprocessingLayer): method __init__ (line 45) | def __init__( method _set_value_range (line 59) | def _set_value_range(self, value_range): method get_random_transformation (line 72) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 101) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 117) | def transform_labels(self, labels, transformation, training=True): method transform_segmentation_masks (line 120) | def transform_segmentation_masks( method transform_bounding_boxes (line 125) | def transform_bounding_boxes( method get_config (line 130) | def get_config(self): method compute_output_shape (line 141) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/random_color_degeneration_test.py class RandomColorDegenerationTest (line 11) | class RandomColorDegenerationTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_random_color_degeneration_value_range (line 26) | def test_random_color_degeneration_value_range(self): method test_random_color_degeneration_no_op (line 35) | def test_random_color_degeneration_no_op(self): method test_random_color_degeneration_factor_zero (line 46) | def test_random_color_degeneration_factor_zero(self): method test_random_color_degeneration_randomness (line 57) | def test_random_color_degeneration_randomness(self): method test_tf_data_compatibility (line 65) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_color_jitter.py class RandomColorJitter (line 17) | class RandomColorJitter(BaseImagePreprocessingLayer): method __init__ (line 72) | def __init__( method build (line 125) | def build(self, input_shape): method transform_images (line 138) | def transform_images(self, images, transformation, training=True): method transform_labels (line 191) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 194) | def transform_bounding_boxes( method transform_segmentation_masks (line 202) | def transform_segmentation_masks( method compute_output_shape (line 207) | def compute_output_shape(self, input_shape): method get_config (line 210) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_color_jitter_test.py class RandomColorJitterTest (line 10) | class RandomColorJitterTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_random_color_jitter_inference (line 28) | def test_random_color_jitter_inference(self): method test_brightness_only (line 43) | def test_brightness_only(self): method test_saturation_only (line 63) | def test_saturation_only(self): method test_hue_only (line 83) | def test_hue_only(self): method test_contrast_only (line 101) | def test_contrast_only(self): method test_tf_data_compatibility (line 119) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_contrast.py class RandomContrast (line 12) | class RandomContrast(BaseImagePreprocessingLayer): method __init__ (line 59) | def __init__(self, factor, value_range=(0, 255), seed=None, **kwargs): method get_random_transformation (line 66) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 100) | def transform_images(self, images, transformation, training=True): method transform_labels (line 111) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 114) | def transform_bounding_boxes( method transform_segmentation_masks (line 122) | def transform_segmentation_masks( method _adjust_contrast (line 127) | def _adjust_contrast(self, inputs, contrast_factor): method compute_output_shape (line 146) | def compute_output_shape(self, input_shape): method get_config (line 149) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_contrast_test.py class RandomContrastTest (line 10) | class RandomContrastTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_random_contrast_with_value_range_0_to_255 (line 37) | def test_random_contrast_with_value_range_0_to_255(self): method test_random_contrast_with_value_range_0_to_1 (line 70) | def test_random_contrast_with_value_range_0_to_1(self): method test_tf_data_compatibility (line 101) | def test_tf_data_compatibility(self): method test_dict_input (line 107) | def test_dict_input(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_crop.py class RandomCrop (line 19) | class RandomCrop(BaseImagePreprocessingLayer): method __init__ (line 59) | def __init__( method get_random_transformation (line 83) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 131) | def transform_images(self, images, transformation, training=True): method transform_labels (line 188) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 191) | def transform_bounding_boxes( method transform_segmentation_masks (line 262) | def transform_segmentation_masks( method compute_output_shape (line 267) | def compute_output_shape(self, input_shape, *args, **kwargs): method get_config (line 273) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_crop_test.py class RandomCropTest (line 9) | class RandomCropTest(testing.TestCase): method test_random_crop (line 10) | def test_random_crop(self): method test_random_crop_full (line 60) | def test_random_crop_full(self): method test_random_crop_partial (line 72) | def test_random_crop_partial(self): method test_predicting_with_longer_height (line 91) | def test_predicting_with_longer_height(self): method test_predicting_with_longer_width (line 110) | def test_predicting_with_longer_width(self): method test_tf_data_compatibility (line 129) | def test_tf_data_compatibility(self): method test_dict_input (line 142) | def test_dict_input(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_elastic_transform.py class RandomElasticTransform (line 12) | class RandomElasticTransform(BaseImagePreprocessingLayer): method __init__ (line 84) | def __init__( method _set_factor_by_name (line 127) | def _set_factor_by_name(self, factor, name): method get_random_transformation (line 156) | def get_random_transformation(self, data, training=True, seed=None): method get_elastic_transform_params (line 206) | def get_elastic_transform_params(self, height, width, factor): method _transform_images (line 215) | def _transform_images(self, images, transformation, interpolation): method transform_labels (line 262) | def transform_labels(self, labels, transformation, training=True): method compute_output_shape (line 265) | def compute_output_shape(self, input_shape): method get_config (line 268) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_elastic_transform_test.py class RandomElasticTransformTest (line 10) | class RandomElasticTransformTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_random_elastic_transform_inference (line 30) | def test_random_elastic_transform_inference(self): method test_random_elastic_transform_no_op (line 39) | def test_random_elastic_transform_no_op(self): method test_random_elastic_transform_basic (line 55) | def test_random_elastic_transform_basic(self): method test_tf_data_compatibility (line 77) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_erasing.py class RandomErasing (line 12) | class RandomErasing(BaseImagePreprocessingLayer): method __init__ (line 56) | def __init__( method _set_factor_by_name (line 83) | def _set_factor_by_name(self, factor, name): method _compute_crop_bounds (line 112) | def _compute_crop_bounds(self, batch_size, image_length, crop_ratio, s... method _generate_batch_mask (line 129) | def _generate_batch_mask(self, images_shape, box_corners): method _get_fill_value (line 178) | def _get_fill_value(self, images, images_shape, seed): method get_random_transformation (line 214) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 285) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 307) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 310) | def transform_bounding_boxes( method transform_segmentation_masks (line 318) | def transform_segmentation_masks( method compute_output_shape (line 323) | def compute_output_shape(self, input_shape): method get_config (line 326) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_erasing_test.py class RandomErasingTest (line 10) | class RandomErasingTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_random_erasing_inference (line 27) | def test_random_erasing_inference(self): method test_random_erasing_no_op (line 36) | def test_random_erasing_no_op(self): method test_random_erasing_basic (line 52) | def test_random_erasing_basic(self): method test_tf_data_compatibility (line 81) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_flip.py class RandomFlip (line 23) | class RandomFlip(BaseImagePreprocessingLayer): method __init__ (line 60) | def __init__( method get_random_transformation (line 74) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 96) | def transform_images(self, images, transformation, training=True): method transform_labels (line 102) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 105) | def transform_bounding_boxes( method transform_segmentation_masks (line 188) | def transform_segmentation_masks( method _flip_inputs (line 195) | def _flip_inputs(self, inputs, transformation): method compute_output_shape (line 231) | def compute_output_shape(self, input_shape): method get_config (line 234) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_flip_test.py class MockedRandomFlip (line 13) | class MockedRandomFlip(layers.RandomFlip): method call (line 14) | def call(self, inputs, training=True): class RandomFlipTest (line 29) | class RandomFlipTest(testing.TestCase): method test_random_flip (line 35) | def test_random_flip(self, mode): method test_random_flip_horizontal (line 48) | def test_random_flip_horizontal(self): method test_random_flip_vertical (line 88) | def test_random_flip_vertical(self): method test_tf_data_compatibility (line 136) | def test_tf_data_compatibility(self): method test_random_flip_bounding_boxes (line 189) | def test_random_flip_bounding_boxes(self, mode, expected_boxes): method test_random_flip_tf_data_bounding_boxes (line 242) | def test_random_flip_tf_data_bounding_boxes(self, mode, expected_boxes): FILE: keras/src/layers/preprocessing/image_preprocessing/random_gaussian_blur.py class RandomGaussianBlur (line 12) | class RandomGaussianBlur(BaseImagePreprocessingLayer): method __init__ (line 50) | def __init__( method _set_kernel_size (line 68) | def _set_kernel_size(self, factor, name): method _set_factor_by_name (line 90) | def _set_factor_by_name(self, factor, name): method get_random_transformation (line 119) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 173) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 200) | def transform_labels(self, labels, transformation, training=True): method transform_segmentation_masks (line 203) | def transform_segmentation_masks( method transform_bounding_boxes (line 208) | def transform_bounding_boxes( method compute_output_shape (line 213) | def compute_output_shape(self, input_shape): method get_config (line 216) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_gaussian_blur_test.py class RandomGaussianBlurTest (line 11) | class RandomGaussianBlurTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_random_erasing_inference (line 28) | def test_random_erasing_inference(self): method test_random_erasing_no_op (line 37) | def test_random_erasing_no_op(self): method test_random_erasing_basic (line 46) | def test_random_erasing_basic(self): method test_tf_data_compatibility (line 88) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_grayscale.py class RandomGrayscale (line 12) | class RandomGrayscale(BaseImagePreprocessingLayer): method __init__ (line 55) | def __init__(self, factor=0.5, data_format=None, seed=None, **kwargs): method get_random_transformation (line 66) | def get_random_transformation(self, images, training=True, seed=None): method transform_images (line 86) | def transform_images(self, images, transformation, training=True): method compute_output_shape (line 102) | def compute_output_shape(self, input_shape): method compute_output_spec (line 105) | def compute_output_spec(self, inputs, **kwargs): method transform_bounding_boxes (line 110) | def transform_bounding_boxes(self, bounding_boxes, **kwargs): method transform_labels (line 113) | def transform_labels(self, labels, transformations=None, **kwargs): method transform_segmentation_masks (line 116) | def transform_segmentation_masks( method get_config (line 121) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_grayscale_test.py class RandomGrayscaleTest (line 12) | class RandomGrayscaleTest(testing.TestCase): method test_layer (line 14) | def test_layer(self): method test_grayscale_conversion (line 40) | def test_grayscale_conversion(self, data_format): method test_invalid_factor (line 58) | def test_invalid_factor(self): method test_tf_data_compatibility (line 65) | def test_tf_data_compatibility(self): method test_grayscale_with_single_color_image (line 79) | def test_grayscale_with_single_color_image(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_hue.py class RandomHue (line 8) | class RandomHue(BaseImagePreprocessingLayer): method __init__ (line 49) | def __init__( method get_random_transformation (line 63) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 97) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 146) | def transform_labels(self, labels, transformation, training=True): method transform_segmentation_masks (line 149) | def transform_segmentation_masks( method transform_bounding_boxes (line 154) | def transform_bounding_boxes( method get_config (line 159) | def get_config(self): method compute_output_shape (line 170) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/random_hue_test.py class RandomHueTest (line 11) | class RandomHueTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_random_hue_inference (line 26) | def test_random_hue_inference(self): method test_random_hue_value_range_0_to_1 (line 34) | def test_random_hue_value_range_0_to_1(self): method test_random_hue_value_range_0_to_255 (line 43) | def test_random_hue_value_range_0_to_255(self): method test_random_hue_no_change_with_zero_factor (line 52) | def test_random_hue_no_change_with_zero_factor(self): method test_random_hue_randomness (line 63) | def test_random_hue_randomness(self): method test_tf_data_compatibility (line 71) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_invert.py class RandomInvert (line 11) | class RandomInvert(BaseImagePreprocessingLayer): method __init__ (line 45) | def __init__( method get_random_transformation (line 59) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 99) | def transform_images(self, images, transformation, training=True): method transform_labels (line 110) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 113) | def transform_bounding_boxes( method transform_segmentation_masks (line 121) | def transform_segmentation_masks( method compute_output_shape (line 126) | def compute_output_shape(self, input_shape): method get_config (line 129) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_invert_test.py class RandomInvertTest (line 10) | class RandomInvertTest(testing.TestCase): method test_layer (line 12) | def test_layer(self): method test_random_invert_inference (line 25) | def test_random_invert_inference(self): method test_random_invert_no_op (line 33) | def test_random_invert_no_op(self): method test_random_invert_basic (line 41) | def test_random_invert_basic(self): method test_tf_data_compatibility (line 56) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_perspective.py class RandomPerspective (line 19) | class RandomPerspective(BaseImagePreprocessingLayer): method __init__ (line 58) | def __init__( method get_random_transformation (line 100) | def get_random_transformation(self, data, training=True, seed=None): method _transform_images (line 169) | def _transform_images(self, images, transformation, interpolation): method transform_bounding_boxes (line 201) | def transform_bounding_boxes( method _get_transformed_coordinates (line 283) | def _get_transformed_coordinates( method transform_labels (line 316) | def transform_labels(self, labels, transformation, training=True): method compute_output_shape (line 319) | def compute_output_shape(self, input_shape): method get_config (line 322) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_perspective_test.py class RandomPerspectiveTest (line 11) | class RandomPerspectiveTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_random_perspective_inference (line 28) | def test_random_perspective_inference(self): method test_random_perspective_no_op (line 37) | def test_random_perspective_no_op(self): method test_random_perspective_basic (line 46) | def test_random_perspective_basic(self): method test_tf_data_compatibility (line 86) | def test_tf_data_compatibility(self): method test_random_perspective_bounding_boxes (line 134) | def test_random_perspective_bounding_boxes( method test_random_flip_tf_data_bounding_boxes (line 220) | def test_random_flip_tf_data_bounding_boxes( FILE: keras/src/layers/preprocessing/image_preprocessing/random_posterization.py class RandomPosterization (line 11) | class RandomPosterization(BaseImagePreprocessingLayer): method __init__ (line 41) | def __init__( method _set_value_range (line 55) | def _set_value_range(self, value_range): method get_random_transformation (line 68) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 105) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 136) | def transform_labels(self, labels, transformation, training=True): method transform_segmentation_masks (line 139) | def transform_segmentation_masks( method transform_bounding_boxes (line 144) | def transform_bounding_boxes( method get_config (line 149) | def get_config(self): method compute_output_shape (line 160) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/random_posterization_test.py class RandomPosterizationTest (line 11) | class RandomPosterizationTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_random_posterization_inference (line 26) | def test_random_posterization_inference(self): method test_random_posterization_basic (line 34) | def test_random_posterization_basic(self): method test_random_posterization_value_range_0_to_1 (line 49) | def test_random_posterization_value_range_0_to_1(self): method test_random_posterization_value_range_0_to_255 (line 58) | def test_random_posterization_value_range_0_to_255(self): method test_random_posterization_randomness (line 67) | def test_random_posterization_randomness(self): method test_tf_data_compatibility (line 75) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_rotation.py class RandomRotation (line 15) | class RandomRotation(BaseImagePreprocessingLayer): method __init__ (line 90) | def __init__( method _transform_images (line 119) | def _transform_images(self, images, transformation, interpolation): method transform_labels (line 129) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 132) | def transform_bounding_boxes( method get_random_transformation (line 172) | def get_random_transformation(self, data, training=True, seed=None): method compute_output_shape (line 233) | def compute_output_shape(self, input_shape): method get_config (line 236) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_rotation_test.py class RandomRotationTest (line 10) | class RandomRotationTest(testing.TestCase): method test_random_rotation_shapes (line 18) | def test_random_rotation_shapes(self, factor): method test_random_rotation_correctness (line 30) | def test_random_rotation_correctness(self): method test_training_false (line 52) | def test_training_false(self): method test_tf_data_compatibility (line 58) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_saturation.py class RandomSaturation (line 10) | class RandomSaturation(BaseImagePreprocessingLayer): method __init__ (line 49) | def __init__( method _set_value_range (line 63) | def _set_value_range(self, value_range): method get_random_transformation (line 76) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 105) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 142) | def transform_labels(self, labels, transformation, training=True): method transform_segmentation_masks (line 145) | def transform_segmentation_masks( method transform_bounding_boxes (line 150) | def transform_bounding_boxes( method get_config (line 155) | def get_config(self): method compute_output_shape (line 166) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/random_saturation_test.py class RandomSaturationTest (line 11) | class RandomSaturationTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_random_saturation_value_range (line 25) | def test_random_saturation_value_range(self): method test_random_saturation_no_op (line 34) | def test_random_saturation_no_op(self): method test_random_saturation_full_grayscale (line 45) | def test_random_saturation_full_grayscale(self): method test_random_saturation_full_saturation (line 61) | def test_random_saturation_full_saturation(self): method test_random_saturation_randomness (line 77) | def test_random_saturation_randomness(self): method test_tf_data_compatibility (line 85) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_sharpness.py class RandomSharpness (line 12) | class RandomSharpness(BaseImagePreprocessingLayer): method __init__ (line 51) | def __init__( method _set_value_range (line 65) | def _set_value_range(self, value_range): method get_random_transformation (line 78) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 106) | def transform_images(self, images, transformation=None, training=True): method transform_labels (line 153) | def transform_labels(self, labels, transformation, training=True): method transform_segmentation_masks (line 156) | def transform_segmentation_masks( method transform_bounding_boxes (line 161) | def transform_bounding_boxes( method get_config (line 166) | def get_config(self): method compute_output_shape (line 177) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/random_sharpness_test.py class RandomSharpnessTest (line 11) | class RandomSharpnessTest(testing.TestCase): method test_layer (line 13) | def test_layer(self): method test_random_sharpness_value_range (line 25) | def test_random_sharpness_value_range(self): method test_random_sharpness_no_op (line 34) | def test_random_sharpness_no_op(self): method test_random_sharpness_randomness (line 45) | def test_random_sharpness_randomness(self): method test_tf_data_compatibility (line 53) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_shear.py class RandomShear (line 19) | class RandomShear(BaseImagePreprocessingLayer): method __init__ (line 82) | def __init__( method _set_factor_with_name (line 115) | def _set_factor_with_name(self, factor, factor_name): method _check_factor_range (line 136) | def _check_factor_range(self, input_number): method get_random_transformation (line 143) | def get_random_transformation(self, data, training=True, seed=None): method _transform_images (line 197) | def _transform_images(self, images, transformation, interpolation): method _get_shear_matrix (line 220) | def _get_shear_matrix(self, shear_factors): method transform_labels (line 242) | def transform_labels(self, labels, transformation, training=True): method get_transformed_x_y (line 245) | def get_transformed_x_y(self, x, y, transform): method get_shifted_bbox (line 255) | def get_shifted_bbox(self, bounding_boxes, w_shift_factor, h_shift_fac... method transform_bounding_boxes (line 281) | def transform_bounding_boxes( method _shear_bboxes (line 337) | def _shear_bboxes(self, bounding_boxes, transformation): method get_config (line 384) | def get_config(self): method compute_output_shape (line 397) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/random_shear_test.py class RandomShearTest (line 13) | class RandomShearTest(testing.TestCase): method test_layer (line 15) | def test_layer(self): method test_random_posterization_inference (line 31) | def test_random_posterization_inference(self): method test_shear_pixel_level (line 39) | def test_shear_pixel_level(self): method test_tf_data_compatibility (line 68) | def test_tf_data_compatibility(self): method test_random_shear_bounding_boxes (line 97) | def test_random_shear_bounding_boxes(self, translation, expected_boxes): method test_random_shear_tf_data_bounding_boxes (line 153) | def test_random_shear_tf_data_bounding_boxes( FILE: keras/src/layers/preprocessing/image_preprocessing/random_translation.py class RandomTranslation (line 19) | class RandomTranslation(BaseImagePreprocessingLayer): method __init__ (line 107) | def __init__( method _set_factor (line 146) | def _set_factor(self, factor, factor_name): method _check_factor_range (line 167) | def _check_factor_range(self, input_number): method _transform_images (line 174) | def _transform_images(self, images, transformation, interpolation): method transform_labels (line 177) | def transform_labels(self, labels, transformation, training=True): method get_transformed_x_y (line 180) | def get_transformed_x_y(self, x, y, transform): method get_shifted_bbox (line 190) | def get_shifted_bbox(self, bounding_boxes, w_shift_factor, h_shift_fac... method transform_bounding_boxes (line 216) | def transform_bounding_boxes( method get_random_transformation (line 275) | def get_random_transformation(self, data, training=True, seed=None): method _translate_inputs (line 323) | def _translate_inputs(self, inputs, transformation, interpolation): method _get_translation_matrix (line 346) | def _get_translation_matrix(self, translations): method compute_output_shape (line 367) | def compute_output_shape(self, input_shape): method get_config (line 370) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_translation_test.py class RandomTranslationTest (line 11) | class RandomTranslationTest(testing.TestCase): method test_random_translation (line 17) | def test_random_translation(self, height_factor, width_factor): method test_random_translation_with_bad_factor (line 36) | def test_random_translation_with_bad_factor( method test_random_translation_with_inference_mode (line 52) | def test_random_translation_with_inference_mode(self): method test_random_translation_up_numeric_reflect (line 60) | def test_random_translation_up_numeric_reflect(self, data_format): method test_random_translation_up_numeric_constant (line 96) | def test_random_translation_up_numeric_constant(self, data_format): method test_random_translation_down_numeric_reflect (line 134) | def test_random_translation_down_numeric_reflect(self, data_format): method test_random_translation_asymmetric_size_numeric_reflect (line 171) | def test_random_translation_asymmetric_size_numeric_reflect( method test_random_translation_down_numeric_constant (line 213) | def test_random_translation_down_numeric_constant(self, data_format): method test_random_translation_left_numeric_reflect (line 252) | def test_random_translation_left_numeric_reflect(self, data_format): method test_random_translation_left_numeric_constant (line 289) | def test_random_translation_left_numeric_constant(self, data_format): method test_tf_data_compatibility (line 327) | def test_tf_data_compatibility(self): method test_random_flip_bounding_boxes (line 345) | def test_random_flip_bounding_boxes(self, translation, expected_boxes): method test_random_flip_tf_data_bounding_boxes (line 396) | def test_random_flip_tf_data_bounding_boxes( FILE: keras/src/layers/preprocessing/image_preprocessing/random_zoom.py class RandomZoom (line 17) | class RandomZoom(BaseImagePreprocessingLayer): method __init__ (line 108) | def __init__( method _set_factor (line 148) | def _set_factor(self, factor, factor_name): method _check_factor_range (line 169) | def _check_factor_range(self, input_number): method _transform_images (line 176) | def _transform_images(self, images, transformation, interpolation): method transform_labels (line 179) | def transform_labels(self, labels, transformation, training=True): method get_transformed_x_y (line 182) | def get_transformed_x_y(self, x, y, transform): method get_clipped_bbox (line 192) | def get_clipped_bbox(self, bounding_boxes, h_end, h_start, w_end, w_st... method transform_bounding_boxes (line 211) | def transform_bounding_boxes( method get_random_transformation (line 301) | def get_random_transformation(self, data, training=True, seed=None): method _zoom_inputs (line 343) | def _zoom_inputs(self, inputs, transformation, interpolation): method _get_zoom_matrix (line 379) | def _get_zoom_matrix(self, zooms, image_height, image_width): method compute_output_shape (line 406) | def compute_output_shape(self, input_shape): method get_config (line 409) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/random_zoom_test.py class RandomZoomTest (line 13) | class RandomZoomTest(testing.TestCase): method test_random_zoom (line 22) | def test_random_zoom(self, height_factor, width_factor): method test_random_zoom_out_correctness (line 35) | def test_random_zoom_out_correctness(self): method test_random_zoom_in_correctness (line 70) | def test_random_zoom_in_correctness(self): method test_tf_data_compatibility (line 103) | def test_tf_data_compatibility(self): method test_dynamic_shape (line 128) | def test_dynamic_shape(self): method test_connect_with_flatten (line 143) | def test_connect_with_flatten(self): method test_random_flip_bounding_boxes (line 172) | def test_random_flip_bounding_boxes(self, zoom, expected_boxes): method test_random_flip_tf_data_bounding_boxes (line 226) | def test_random_flip_tf_data_bounding_boxes(self, zoom, expected_boxes): FILE: keras/src/layers/preprocessing/image_preprocessing/resizing.py class Resizing (line 16) | class Resizing(BaseImagePreprocessingLayer): method __init__ (line 83) | def __init__( method _transform_images (line 113) | def _transform_images(self, images, transformation, interpolation): method transform_images (line 132) | def transform_images(self, images, transformation=None, training=True): method transform_segmentation_masks (line 137) | def transform_segmentation_masks( method transform_labels (line 144) | def transform_labels(self, labels, transformation=None, training=True): method get_random_transformation (line 147) | def get_random_transformation(self, data, training=True, seed=None): method transform_bounding_boxes (line 160) | def transform_bounding_boxes( method _transform_xyxy (line 210) | def _transform_xyxy(self, boxes, input_height, input_width): method _transform_boxes_pad_to_aspect_ratio (line 228) | def _transform_boxes_pad_to_aspect_ratio( method _transform_boxes_crop_to_aspect_ratio (line 248) | def _transform_boxes_crop_to_aspect_ratio( method _transform_boxes_stretch (line 279) | def _transform_boxes_stretch(self, boxes, input_height, input_width): method compute_output_shape (line 294) | def compute_output_shape(self, input_shape): method get_config (line 312) | def get_config(self): FILE: keras/src/layers/preprocessing/image_preprocessing/resizing_test.py class ResizingTest (line 14) | class ResizingTest(testing.TestCase): method test_resizing_basics (line 23) | def test_resizing_basics( method test_down_sampling_numeric (line 63) | def test_down_sampling_numeric(self, data_format): method test_up_sampling_numeric (line 80) | def test_up_sampling_numeric(self, data_format): method test_crop_to_aspect_ratio (line 100) | def test_crop_to_aspect_ratio(self, data_format): method test_unbatched_image (line 128) | def test_unbatched_image(self, data_format): method test_tf_data_compatibility (line 149) | def test_tf_data_compatibility(self): method test_grain_compatibility (line 162) | def test_grain_compatibility(self): method test_tf_data_compatibility_sequential (line 194) | def test_tf_data_compatibility_sequential(self): method test_data_stretch (line 216) | def test_data_stretch(self, size, data_format): method test_resize_bounding_boxes (line 243) | def test_resize_bounding_boxes( method test_resize_tf_data_bounding_boxes (line 291) | def test_resize_tf_data_bounding_boxes( FILE: keras/src/layers/preprocessing/image_preprocessing/solarization.py class Solarization (line 11) | class Solarization(BaseImagePreprocessingLayer): method __init__ (line 67) | def __init__( method _set_value_range (line 86) | def _set_value_range(self, value_range): method _set_factor (line 99) | def _set_factor(self, factor, factor_name): method _check_factor_range (line 119) | def _check_factor_range(self, input_number): method get_random_transformation (line 126) | def get_random_transformation(self, data, training=True, seed=None): method transform_images (line 160) | def transform_images(self, images, transformation, training=True): method transform_labels (line 193) | def transform_labels(self, labels, transformation, training=True): method transform_bounding_boxes (line 196) | def transform_bounding_boxes( method transform_segmentation_masks (line 201) | def transform_segmentation_masks( method get_config (line 206) | def get_config(self): method compute_output_shape (line 216) | def compute_output_shape(self, input_shape): FILE: keras/src/layers/preprocessing/image_preprocessing/solarization_test.py class SolarizationTest (line 11) | class SolarizationTest(testing.TestCase): method _test_input_output (line 12) | def _test_input_output(self, layer, input_value, expected_value, dtype): method test_layer (line 26) | def test_layer(self): method test_output_values (line 47) | def test_output_values(self, input_value, expected_value): method test_only_values_above_threshold_are_solarized (line 62) | def test_only_values_above_threshold_are_solarized( method test_random_augmentation_applied_per_sample (line 77) | def test_random_augmentation_applied_per_sample(self): FILE: keras/src/layers/preprocessing/index_lookup.py class IndexLookup (line 14) | class IndexLookup(Layer): method __init__ (line 102) | def __init__( method get_vocabulary (line 302) | def get_vocabulary(self, include_special_tokens=True): method vocabulary_size (line 340) | def vocabulary_size(self): method get_config (line 355) | def get_config(self): method _record_vocabulary_size (line 374) | def _record_vocabulary_size(self): method set_vocabulary (line 379) | def set_vocabulary(self, vocabulary, idf_weights=None): method get_build_config (line 572) | def get_build_config(self): method build_from_config (line 575) | def build_from_config(self, config): method compute_dtype (line 579) | def compute_dtype(self): method variable_dtype (line 583) | def variable_dtype(self): method compute_output_shape (line 586) | def compute_output_shape(self, input_shape): method compute_output_spec (line 605) | def compute_output_spec(self, inputs): method adapt (line 613) | def adapt(self, data, steps=None): method update_state (line 629) | def update_state(self, data): method finalize_state (line 670) | def finalize_state(self): method reset_state (line 735) | def reset_state(self): method call (line 746) | def call(self, inputs): method _lookup_dense (line 803) | def _lookup_dense(self, inputs): method save_own_variables (line 858) | def save_own_variables(self, store): method load_own_variables (line 862) | def load_own_variables(self, store): method save_assets (line 871) | def save_assets(self, dir_path): method load_assets (line 881) | def load_assets(self, dir_path): method _uninitialized_lookup_table (line 901) | def _uninitialized_lookup_table(self): method _lookup_table_from_tokens (line 908) | def _lookup_table_from_tokens(self, tokens): method _lookup_table_from_file (line 924) | def _lookup_table_from_file(self, filename): method _convert_to_ndarray (line 942) | def _convert_to_ndarray(self, x): method _expand_dims (line 945) | def _expand_dims(self, inputs, axis): method _oov_start_index (line 951) | def _oov_start_index(self): method _token_start_index (line 958) | def _token_start_index(self): method _ensure_known_vocab_size (line 961) | def _ensure_known_vocab_size(self): method _ensure_vocab_size_unchanged (line 973) | def _ensure_vocab_size_unchanged(self): method _find_repeated_tokens (line 992) | def _find_repeated_tokens(self, vocabulary): method _num_tokens (line 1004) | def _num_tokens(self, data): method _inverse_document_frequency (line 1015) | def _inverse_document_frequency(self, token_document_counts, num_docum... method _tensor_vocab_to_numpy (line 1028) | def _tensor_vocab_to_numpy(self, vocabulary): function get_null_initializer (line 1033) | def get_null_initializer(key_dtype, value_dtype): function listify_tensors (line 1064) | def listify_tensors(x): FILE: keras/src/layers/preprocessing/index_lookup_test.py class IndexLookupLayerTest (line 17) | class IndexLookupLayerTest(testing.TestCase): method test_basics_string_vocab (line 18) | def test_basics_string_vocab(self): method test_basics_integer_vocab (line 109) | def test_basics_integer_vocab(self): method test_max_tokens_adapt (line 190) | def test_max_tokens_adapt(self): method test_pad_to_max_tokens (line 212) | def test_pad_to_max_tokens(self): method test_output_modes (line 231) | def test_output_modes(self): method test_one_hot_symbolic_output_shape_with_higher_rank_input (line 283) | def test_one_hot_symbolic_output_shape_with_higher_rank_input(self): method test_one_hot_compute_output_shape_multi_hot_consistency (line 313) | def test_one_hot_compute_output_shape_multi_hot_consistency(self): method test_one_hot_compute_output_spec_preserves_input_dims (line 334) | def test_one_hot_compute_output_spec_preserves_input_dims(self): method test_sparse_outputs (line 345) | def test_sparse_outputs(self): method test_adapt_tf_idf (line 349) | def test_adapt_tf_idf(self): method test_invert (line 393) | def test_invert(self): method test_saving (line 421) | def test_saving(self): method test_adapt_with_tf_data (line 465) | def test_adapt_with_tf_data(self): method test_max_tokens_less_than_two (line 492) | def test_max_tokens_less_than_two(self): method test_max_tokens_none_with_pad_to_max_tokens (line 505) | def test_max_tokens_none_with_pad_to_max_tokens(self): method test_negative_num_oov_indices (line 519) | def test_negative_num_oov_indices(self): method test_invert_with_non_int_output_mode (line 532) | def test_invert_with_non_int_output_mode(self): method test_sparse_true_with_int_output_mode (line 546) | def test_sparse_true_with_int_output_mode(self): method test_idf_weights_set_with_non_tfidf_output_mode (line 561) | def test_idf_weights_set_with_non_tfidf_output_mode(self): method test_unrecognized_kwargs (line 580) | def test_unrecognized_kwargs(self): method test_non_tf_idf_with_idf_weights (line 595) | def test_non_tf_idf_with_idf_weights(self): method test_vocabulary_file_does_not_exist (line 614) | def test_vocabulary_file_does_not_exist(self): method test_repeated_tokens_in_vocabulary (line 630) | def test_repeated_tokens_in_vocabulary(self): method test_mask_token_in_wrong_position (line 643) | def test_mask_token_in_wrong_position(self): method test_ensure_known_vocab_size_without_vocabulary (line 661) | def test_ensure_known_vocab_size_without_vocabulary(self): method test_save_and_load_assets_string_vocab (line 682) | def test_save_and_load_assets_string_vocab(self): method test_save_and_load_assets_with_multiple_oov_indices (line 721) | def test_save_and_load_assets_with_multiple_oov_indices(self): method test_load_assets_handles_trailing_newlines (line 751) | def test_load_assets_handles_trailing_newlines(self): method test_oov_method_ignored_for_string_dtype (line 777) | def test_oov_method_ignored_for_string_dtype(self): FILE: keras/src/layers/preprocessing/integer_lookup.py class IntegerLookup (line 11) | class IntegerLookup(IndexLookup): method __init__ (line 328) | def __init__( method adapt (line 391) | def adapt(self, data, steps=None): method get_config (line 422) | def get_config(self): method call (line 432) | def call(self, inputs): FILE: keras/src/layers/preprocessing/integer_lookup_test.py class IntegerLookupTest (line 12) | class IntegerLookupTest(testing.TestCase): method test_config (line 13) | def test_config(self): method test_adapt_flow (line 22) | def test_adapt_flow(self): method test_fixed_vocabulary (line 79) | def test_fixed_vocabulary(self): method test_set_vocabulary (line 89) | def test_set_vocabulary(self): method test_tf_data_compatibility (line 99) | def test_tf_data_compatibility(self): method test_one_hot_output_with_higher_rank_input (line 109) | def test_one_hot_output_with_higher_rank_input(self): method test_multi_hot_output_shape (line 130) | def test_multi_hot_output_shape(self): method test_count_output_shape (line 139) | def test_count_output_shape(self): method test_tf_idf_output_shape (line 146) | def test_tf_idf_output_shape(self): method test_max_tokens (line 158) | def test_max_tokens(self): method test_mask_token (line 164) | def test_mask_token(self): method test_invert (line 173) | def test_invert(self): method test_pad_to_max_tokens (line 181) | def test_pad_to_max_tokens(self): method test_num_oov_indices (line 191) | def test_num_oov_indices(self): method test_get_vocabulary (line 203) | def test_get_vocabulary(self): method test_invalid_max_tokens (line 210) | def test_invalid_max_tokens(self): method test_invalid_num_oov_indices (line 214) | def test_invalid_num_oov_indices(self): method test_sparse_output (line 222) | def test_sparse_output(self): method test_invalid_vocabulary_dtype (line 231) | def test_invalid_vocabulary_dtype(self): method test_num_oov_indices_zero (line 235) | def test_num_oov_indices_zero(self): method test_adapt_with_steps (line 244) | def test_adapt_with_steps(self): method test_vocabulary_from_file (line 251) | def test_vocabulary_from_file(self): method test_oov_method_farmhash (line 263) | def test_oov_method_farmhash(self): method test_oov_method_invalid_value (line 276) | def test_oov_method_invalid_value(self): method test_oov_method_ignored_when_single_oov_index (line 284) | def test_oov_method_ignored_when_single_oov_index(self): method test_oov_method_farmhash_output_is_correct (line 297) | def test_oov_method_farmhash_output_is_correct(self): FILE: keras/src/layers/preprocessing/mel_spectrogram.py class MelSpectrogram (line 10) | class MelSpectrogram(DataLayer): method __init__ (line 87) | def __init__( method call (line 119) | def call(self, inputs): method _spectrogram (line 135) | def _spectrogram(self, inputs): method _melscale (line 153) | def _melscale(self, inputs): method _dbscale (line 163) | def _dbscale(self, inputs): method _hertz_to_mel (line 180) | def _hertz_to_mel(self, frequencies_hertz): method linear_to_mel_weight_matrix (line 196) | def linear_to_mel_weight_matrix( method compute_output_shape (line 331) | def compute_output_shape(self, input_shape): method get_config (line 355) | def get_config(self): FILE: keras/src/layers/preprocessing/mel_spectrogram_test.py class MelSpectrogramTest (line 10) | class MelSpectrogramTest(testing.TestCase): method test_mel_spectrogram_basics (line 12) | def test_mel_spectrogram_basics(self): method test_output_shape (line 58) | def test_output_shape( method test_tf_data_compatibility (line 90) | def test_tf_data_compatibility(self): FILE: keras/src/layers/preprocessing/normalization.py function _extract_batch (line 14) | def _extract_batch(batch): class Normalization (line 22) | class Normalization(DataLayer): method __init__ (line 110) | def __init__( method build (line 153) | def build(self, input_shape): method adapt (line 251) | def adapt(self, data): method finalize_state (line 399) | def finalize_state(self): method call (line 410) | def call(self, inputs): method compute_output_shape (line 445) | def compute_output_shape(self, input_shape): method get_config (line 448) | def get_config(self): method load_own_variables (line 460) | def load_own_variables(self, store): method get_build_config (line 465) | def get_build_config(self): method build_from_config (line 469) | def build_from_config(self, config): FILE: keras/src/layers/preprocessing/normalization_test.py class NormalizationTest (line 12) | class NormalizationTest(testing.TestCase): method test_normalization_basics (line 14) | def test_normalization_basics(self): method test_normalization_adapt (line 61) | def test_normalization_adapt(self, input_type): method test_call_on_meta_device_after_built (line 101) | def test_call_on_meta_device_after_built(self): method test_normalization_with_mean_only_raises_error (line 108) | def test_normalization_with_mean_only_raises_error(self): method test_normalization_with_variance_only_raises_error (line 115) | def test_normalization_with_variance_only_raises_error(self): method test_normalization_axis_too_high (line 122) | def test_normalization_axis_too_high(self): method test_normalization_axis_too_low (line 129) | def test_normalization_axis_too_low(self): method test_normalization_unknown_axis_shape (line 136) | def test_normalization_unknown_axis_shape(self): method test_normalization_adapt_with_incompatible_shape (line 141) | def test_normalization_adapt_with_incompatible_shape(self): method test_tf_data_compatibility (line 149) | def test_tf_data_compatibility(self): method test_normalization_with_scalar_mean_var (line 169) | def test_normalization_with_scalar_mean_var(self): method test_adapt_pydataset_compat (line 175) | def test_adapt_pydataset_compat(self, pydataset_type): method test_broadcast_non_scalar_middle_axis (line 206) | def test_broadcast_non_scalar_middle_axis(self): method test_broadcast_multiple_axes (line 226) | def test_broadcast_multiple_axes(self): method test_broadcast_partial_keep_axis (line 245) | def test_broadcast_partial_keep_axis(self): method test_scalar_broadcast (line 271) | def test_scalar_broadcast(self): method test_adapt_list_of_batches (line 283) | def test_adapt_list_of_batches(self): method test_adapt_generator (line 294) | def test_adapt_generator(self): method test_adapt_iterable_same_result_as_ndarray (line 309) | def test_adapt_iterable_same_result_as_ndarray(self): method test_adapt_iterable_with_tuples (line 322) | def test_adapt_iterable_with_tuples(self): method test_adapt_iterable_axis_none (line 333) | def test_adapt_iterable_axis_none(self): method test_adapt_empty_iterable_raises (line 344) | def test_adapt_empty_iterable_raises(self): method test_adapt_empty_generator_raises (line 349) | def test_adapt_empty_generator_raises(self): method test_adapt_iterable_incompatible_shape_raises (line 358) | def test_adapt_iterable_incompatible_shape_raises(self): method test_adapt_iterable_batch_without_shape_raises (line 370) | def test_adapt_iterable_batch_without_shape_raises(self): method test_adapt_iterable_single_batch (line 379) | def test_adapt_iterable_single_batch(self): method test_adapt_iterable_high_dim_axis_tuple (line 389) | def test_adapt_iterable_high_dim_axis_tuple(self): method test_adapt_iterator_of_batches (line 400) | def test_adapt_iterator_of_batches(self): method test_adapt_grain_dataset (line 412) | def test_adapt_grain_dataset(self): method test_adapt_tf_dataset_with_labels (line 424) | def test_adapt_tf_dataset_with_labels(self): FILE: keras/src/layers/preprocessing/pipeline.py class Pipeline (line 8) | class Pipeline(Layer): method __init__ (line 43) | def __init__(self, layers, name=None): method layers (line 50) | def layers(self): method call (line 53) | def call(self, inputs, training=True, mask=None): method from_config (line 70) | def from_config(cls, config): method get_config (line 77) | def get_config(self): FILE: keras/src/layers/preprocessing/pipeline_test.py class CanaryLayer (line 10) | class CanaryLayer(layers.Layer): method __init__ (line 11) | def __init__(self): method call (line 16) | def call(self, x, training=False, mask=None): method compute_mask (line 22) | def compute_mask(self, x, mask=None): method compute_output_shape (line 25) | def compute_output_shape(self, input_shape): class PipelineTest (line 29) | class PipelineTest(testing.TestCase): method test_basics (line 30) | def test_basics(self): method test_correctness (line 47) | def test_correctness(self): method test_tf_data_compatibility (line 57) | def test_tf_data_compatibility(self): method test_from_config (line 80) | def test_from_config(self): FILE: keras/src/layers/preprocessing/rescaling.py class Rescaling (line 8) | class Rescaling(DataLayer): method __init__ (line 35) | def __init__(self, scale, offset=0.0, **kwargs): method call (line 41) | def call(self, inputs): method compute_output_shape (line 55) | def compute_output_shape(self, input_shape): method get_config (line 58) | def get_config(self): method from_config (line 70) | def from_config(cls, config, custom_objects=None): FILE: keras/src/layers/preprocessing/rescaling_test.py class RescalingTest (line 11) | class RescalingTest(testing.TestCase): method test_rescaling_basics (line 13) | def test_rescaling_basics(self): method test_rescaling_dtypes (line 27) | def test_rescaling_dtypes(self): method test_rescaling_correctness (line 66) | def test_rescaling_correctness(self): method test_tf_data_compatibility (line 72) | def test_tf_data_compatibility(self): method test_grain_compatibility (line 78) | def test_grain_compatibility(self): method test_rescaling_with_channels_first_and_vector_scale (line 93) | def test_rescaling_with_channels_first_and_vector_scale(self): method test_numpy_args (line 104) | def test_numpy_args(self): FILE: keras/src/layers/preprocessing/stft_spectrogram.py class STFTSpectrogram (line 13) | class STFTSpectrogram(layers.Layer): method __init__ (line 134) | def __init__( method build (line 213) | def build(self, input_shape): method _adjust_shapes (line 233) | def _adjust_shapes(self, outputs): method _apply_conv (line 258) | def _apply_conv(self, inputs, kernel): method call (line 290) | def call(self, inputs): method compute_output_shape (line 340) | def compute_output_shape(self, input_shape): method get_config (line 367) | def get_config(self): FILE: keras/src/layers/preprocessing/stft_spectrogram_test.py class TestSpectrogram (line 13) | class TestSpectrogram(testing.TestCase): method _calc_spectrograms (line 17) | def _calc_spectrograms( method test_spectrogram_channels_broadcasting (line 59) | def test_spectrogram_channels_broadcasting(self): method test_spectrogram_channels_first (line 107) | def test_spectrogram_channels_first(self): method test_spectrogram_basics (line 183) | def test_spectrogram_basics(self): method test_spectrogram_dynamic_shape (line 280) | def test_spectrogram_dynamic_shape(self): method test_spectrogram_error (line 301) | def test_spectrogram_error(self): method test_tf_data_compatibility (line 352) | def test_tf_data_compatibility(self): method test_exceptions (line 368) | def test_exceptions(self): FILE: keras/src/layers/preprocessing/string_lookup.py class StringLookup (line 14) | class StringLookup(IndexLookup): method __init__ (line 295) | def __init__( method adapt (line 340) | def adapt(self, data, steps=None): method _tensor_vocab_to_numpy (line 372) | def _tensor_vocab_to_numpy(self, vocabulary): method get_config (line 378) | def get_config(self): method call (line 385) | def call(self, inputs): FILE: keras/src/layers/preprocessing/string_lookup_test.py class StringLookupTest (line 15) | class StringLookupTest(testing.TestCase): method test_config (line 18) | def test_config(self): method test_vocabulary_file (line 28) | def test_vocabulary_file(self): method test_adapt_flow (line 61) | def test_adapt_flow(self): method test_fixed_vocabulary (line 71) | def test_fixed_vocabulary(self): method test_sparse_inputs (line 84) | def test_sparse_inputs(self): method test_set_vocabulary (line 101) | def test_set_vocabulary(self): method test_tf_data_compatibility (line 111) | def test_tf_data_compatibility(self): method test_tensor_as_vocab (line 122) | def test_tensor_as_vocab(self): method test_torch_backend_compatibility (line 132) | def test_torch_backend_compatibility(self): method test_invert_lookup_basic (line 165) | def test_invert_lookup_basic(self): method test_output_mode_count_shape (line 176) | def test_output_mode_count_shape(self): method test_output_mode_multi_hot_binary (line 184) | def test_output_mode_multi_hot_binary(self): method test_mask_token_basic (line 192) | def test_mask_token_basic(self): method test_sparse_output_in_multi_hot (line 204) | def test_sparse_output_in_multi_hot(self): method test_get_vocabulary_include_special_tokens_false (line 217) | def test_get_vocabulary_include_special_tokens_false(self): method test_one_hot_symbolic_output_shape_nested_input (line 231) | def test_one_hot_symbolic_output_shape_nested_input(self): FILE: keras/src/layers/preprocessing/text_vectorization.py class TextVectorization (line 16) | class TextVectorization(Layer): method __init__ (line 205) | def __init__( method compute_dtype (line 359) | def compute_dtype(self): method variable_dtype (line 363) | def variable_dtype(self): method build (line 366) | def build(self, input_shape=None): method compute_output_shape (line 369) | def compute_output_shape(self, input_shape): method compute_output_spec (line 379) | def compute_output_spec(self, inputs): method adapt (line 387) | def adapt(self, data, batch_size=None, steps=None): method update_state (line 431) | def update_state(self, data): method finalize_state (line 434) | def finalize_state(self): method reset_state (line 437) | def reset_state(self): method get_vocabulary (line 440) | def get_vocabulary(self, include_special_tokens=True): method vocabulary_size (line 453) | def vocabulary_size(self): method get_config (line 462) | def get_config(self): method from_config (line 484) | def from_config(cls, config): method set_vocabulary (line 499) | def set_vocabulary(self, vocabulary, idf_weights=None): method _preprocess (line 521) | def _preprocess(self, inputs): method call (line 568) | def call(self, inputs): method save_own_variables (line 620) | def save_own_variables(self, store): method load_own_variables (line 623) | def load_own_variables(self, store): method save_assets (line 626) | def save_assets(self, dir_path): method load_assets (line 629) | def load_assets(self, dir_path): FILE: keras/src/layers/preprocessing/text_vectorization_test.py class TextVectorizationTest (line 17) | class TextVectorizationTest(testing.TestCase, parameterized.TestCase): method test_config (line 20) | def test_config(self): method test_adapt_flow (line 28) | def test_adapt_flow(self): method test_fixed_vocabulary (line 42) | def test_fixed_vocabulary(self): method test_set_vocabulary (line 56) | def test_set_vocabulary(self): method test_save_load_with_ngrams_flow (line 73) | def test_save_load_with_ngrams_flow(self): method test_save_load_tf_idf_mode (line 91) | def test_save_load_tf_idf_mode(self): method test_tf_data_compatibility (line 106) | def test_tf_data_compatibility(self): method test_static_output_sequence_length (line 136) | def test_static_output_sequence_length(self, split): method test_tf_as_first_sequential_layer (line 166) | def test_tf_as_first_sequential_layer(self): method test_ragged_tensor (line 184) | def test_ragged_tensor(self): method test_ragged_tensor_output_length (line 199) | def test_ragged_tensor_output_length(self): method test_raises_exception_ragged_tensor (line 216) | def test_raises_exception_ragged_tensor(self): method test_multi_hot_output (line 224) | def test_multi_hot_output(self): method test_output_mode_count_output (line 250) | def test_output_mode_count_output(self): method test_output_mode_tf_idf_output (line 257) | def test_output_mode_tf_idf_output(self): method test_lower_and_strip_punctuation_standardization (line 268) | def test_lower_and_strip_punctuation_standardization(self): method test_lower_standardization (line 281) | def test_lower_standardization(self): method test_char_splitting (line 311) | def test_char_splitting(self): method test_custom_splitting (line 320) | def test_custom_splitting(self): method test_strip_punctuation_standardization (line 336) | def test_strip_punctuation_standardization(self): method test_no_standardization (line 346) | def test_no_standardization(self): method test_custom_standardize_callable (line 356) | def test_custom_standardize_callable(self): method test_no_split (line 369) | def test_no_split(self): method test_ngrams_integer (line 380) | def test_ngrams_integer(self): method test_ngrams_tuple (line 392) | def test_ngrams_tuple(self): method test_max_tokens (line 404) | def test_max_tokens(self): method test_pad_to_max_tokens (line 413) | def test_pad_to_max_tokens(self): method test_get_vocabulary (line 423) | def test_get_vocabulary(self): method test_get_vocabulary_no_special_tokens (line 435) | def test_get_vocabulary_no_special_tokens(self): method test_vocabulary_size (line 445) | def test_vocabulary_size(self): method test_vocabulary_from_file (line 453) | def test_vocabulary_from_file(self): method test_one_hot_output (line 469) | def test_one_hot_output(self): method test_sparse_output (line 483) | def test_sparse_output(self): method test_adapt_with_tf_dataset (line 492) | def test_adapt_with_tf_dataset(self): method test_adapt_with_steps (line 503) | def test_adapt_with_steps(self): method test_invalid_ngrams (line 514) | def test_invalid_ngrams(self): method test_output_sequence_length_with_non_int_mode (line 518) | def test_output_sequence_length_with_non_int_mode(self): FILE: keras/src/layers/regularization/activity_regularization.py class ActivityRegularization (line 7) | class ActivityRegularization(Layer): method __init__ (line 23) | def __init__(self, l1=0.0, l2=0.0, **kwargs): method call (line 33) | def call(self, inputs): method compute_output_shape (line 36) | def compute_output_shape(self, input_shape): method get_config (line 39) | def get_config(self): FILE: keras/src/layers/regularization/activity_regularization_test.py class ActivityRegularizationTest (line 8) | class ActivityRegularizationTest(test_case.TestCase): method test_correctness (line 9) | def test_correctness(self): method test_activity_regularization_basics (line 16) | def test_activity_regularization_basics(self): FILE: keras/src/layers/regularization/alpha_dropout.py class AlphaDropout (line 8) | class AlphaDropout(Layer): method __init__ (line 35) | def __init__(self, rate, noise_shape=None, seed=None, **kwargs): method call (line 52) | def call(self, inputs, training=False): method compute_output_shape (line 77) | def compute_output_shape(self, input_shape): method _get_concrete_noise_shape (line 80) | def _get_concrete_noise_shape(self, inputs, noise_shape): method get_config (line 92) | def get_config(self): FILE: keras/src/layers/regularization/alpha_dropout_test.py class AlphaDropoutTest (line 9) | class AlphaDropoutTest(testing.TestCase): method test_alpha_dropout_basics (line 11) | def test_alpha_dropout_basics(self): method test_alpha_dropout_correctness (line 28) | def test_alpha_dropout_correctness(self): method test_alpha_dropout_partial_noise_shape_dynamic (line 36) | def test_alpha_dropout_partial_noise_shape_dynamic(self): method test_alpha_dropout_partial_noise_shape_static (line 42) | def test_alpha_dropout_partial_noise_shape_static(self): method test_alpha_dropout_negative_rate (line 48) | def test_alpha_dropout_negative_rate(self): method test_alpha_dropout_rate_greater_than_one (line 56) | def test_alpha_dropout_rate_greater_than_one(self): FILE: keras/src/layers/regularization/dropout.py class Dropout (line 7) | class Dropout(Layer): method __init__ (line 41) | def __init__(self, rate, noise_shape=None, seed=None, **kwargs): method _validate_noise_shape (line 58) | def _validate_noise_shape(self, noise_shape): method call (line 100) | def call(self, inputs, training=False): method compute_output_shape (line 110) | def compute_output_shape(self, input_shape): method get_config (line 113) | def get_config(self): FILE: keras/src/layers/regularization/dropout_test.py class DropoutTest (line 9) | class DropoutTest(testing.TestCase): method test_dropout_basics (line 11) | def test_dropout_basics(self): method test_dropout_rescaling (line 28) | def test_dropout_rescaling(self): method test_dropout_partial_noise_shape_dynamic (line 36) | def test_dropout_partial_noise_shape_dynamic(self): method test_dropout_partial_noise_shape_static (line 42) | def test_dropout_partial_noise_shape_static(self): method test_dropout_negative_rate (line 48) | def test_dropout_negative_rate(self): method test_dropout_rate_greater_than_one (line 56) | def test_dropout_rate_greater_than_one(self): method test_validate_noise_shape_none (line 64) | def test_validate_noise_shape_none(self): method test_validate_noise_shape_integer_tuple (line 68) | def test_validate_noise_shape_integer_tuple(self): method test_validate_noise_shape_none_values (line 72) | def test_validate_noise_shape_none_values(self): method test_validate_noise_shape_cast_to_a_tuple (line 76) | def test_validate_noise_shape_cast_to_a_tuple(self): method test_validate_noise_shape_non_iterable (line 81) | def test_validate_noise_shape_non_iterable(self): method test_validate_noise_shape_invalid_type (line 89) | def test_validate_noise_shape_invalid_type(self): method test_validate_noise_shape_negative_value (line 97) | def test_validate_noise_shape_negative_value(self): method test_validate_noise_shape_zero_value (line 105) | def test_validate_noise_shape_zero_value(self): FILE: keras/src/layers/regularization/gaussian_dropout.py class GaussianDropout (line 10) | class GaussianDropout(layers.Layer): method __init__ (line 27) | def __init__(self, rate, seed=None, **kwargs): method call (line 43) | def call(self, inputs, training=False): method compute_output_shape (line 55) | def compute_output_shape(self, input_shape): method get_config (line 58) | def get_config(self): FILE: keras/src/layers/regularization/gaussian_dropout_test.py class GaussianDropoutTest (line 9) | class GaussianDropoutTest(testing.TestCase): method test_gaussian_dropout_basics (line 11) | def test_gaussian_dropout_basics(self): method test_gaussian_dropout_correctness (line 28) | def test_gaussian_dropout_correctness(self): FILE: keras/src/layers/regularization/gaussian_noise.py class GaussianNoise (line 8) | class GaussianNoise(layers.Layer): method __init__ (line 28) | def __init__(self, stddev, seed=None, **kwargs): method call (line 44) | def call(self, inputs, training=False): method compute_output_shape (line 55) | def compute_output_shape(self, input_shape): method get_config (line 58) | def get_config(self): FILE: keras/src/layers/regularization/gaussian_noise_test.py class GaussianNoiseTest (line 9) | class GaussianNoiseTest(testing.TestCase): method test_gaussian_noise_basics (line 11) | def test_gaussian_noise_basics(self): method test_gaussian_noise_correctness (line 28) | def test_gaussian_noise_correctness(self): FILE: keras/src/layers/regularization/spatial_dropout.py class BaseSpatialDropout (line 8) | class BaseSpatialDropout(Dropout): method __init__ (line 9) | def __init__(self, rate, seed=None, name=None, dtype=None): method call (line 12) | def call(self, inputs, training=False): method get_config (line 22) | def get_config(self): class SpatialDropout1D (line 32) | class SpatialDropout1D(BaseSpatialDropout): method __init__ (line 62) | def __init__(self, rate, seed=None, name=None, dtype=None): method _get_noise_shape (line 66) | def _get_noise_shape(self, inputs): class SpatialDropout2D (line 72) | class SpatialDropout2D(BaseSpatialDropout): method __init__ (line 111) | def __init__( method _get_noise_shape (line 118) | def _get_noise_shape(self, inputs): method get_config (line 125) | def get_config(self): class SpatialDropout3D (line 134) | class SpatialDropout3D(BaseSpatialDropout): method __init__ (line 173) | def __init__( method _get_noise_shape (line 180) | def _get_noise_shape(self, inputs): method get_config (line 187) | def get_config(self): FILE: keras/src/layers/regularization/spatial_dropout_test.py class SpatialDropoutTest (line 9) | class SpatialDropoutTest(test_case.TestCase): method test_spatial_dropout_1d (line 11) | def test_spatial_dropout_1d(self): method test_spatial_dropout_2d (line 29) | def test_spatial_dropout_2d(self): method test_spatial_dropout_3d (line 47) | def test_spatial_dropout_3d(self): method test_spatial_dropout_1D_dynamic (line 64) | def test_spatial_dropout_1D_dynamic(self): method test_spatial_dropout_1D_correctness (line 69) | def test_spatial_dropout_1D_correctness(self): method test_spatial_dropout_2D_dynamic (line 75) | def test_spatial_dropout_2D_dynamic(self): method test_spatial_dropout_2D_correctness (line 80) | def test_spatial_dropout_2D_correctness(self): method test_spatial_dropout_3D_dynamic (line 92) | def test_spatial_dropout_3D_dynamic(self): method test_spatial_dropout_3D_correctness (line 97) | def test_spatial_dropout_3D_correctness(self): FILE: keras/src/layers/reshaping/cropping1d.py class Cropping1D (line 8) | class Cropping1D(Layer): method __init__ (line 44) | def __init__(self, cropping=(1, 1), **kwargs): method compute_output_shape (line 51) | def compute_output_shape(self, input_shape): method call (line 64) | def call(self, inputs): method get_config (line 79) | def get_config(self): FILE: keras/src/layers/reshaping/cropping1d_test.py class Cropping1DTest (line 9) | class Cropping1DTest(testing.TestCase): method test_cropping_1d (line 11) | def test_cropping_1d(self): method test_cropping_1d_with_dynamic_spatial_dim (line 51) | def test_cropping_1d_with_dynamic_spatial_dim(self): method test_cropping_1d_errors_if_cropping_argument_invalid (line 56) | def test_cropping_1d_errors_if_cropping_argument_invalid(self): method test_cropping_1d_errors_if_cropping_more_than_available (line 64) | def test_cropping_1d_errors_if_cropping_more_than_available(self): method test_cropping_1d_error_on_excessive_cropping (line 72) | def test_cropping_1d_error_on_excessive_cropping(self): FILE: keras/src/layers/reshaping/cropping2d.py class Cropping2D (line 9) | class Cropping2D(Layer): method __init__ (line 56) | def __init__(self, cropping=((0, 0), (0, 0)), data_format=None, **kwar... method compute_output_shape (line 89) | def compute_output_shape(self, input_shape): method call (line 145) | def call(self, inputs): method get_config (line 221) | def get_config(self): FILE: keras/src/layers/reshaping/cropping2d_test.py class Cropping2DTest (line 11) | class Cropping2DTest(testing.TestCase): method test_cropping_2d (line 37) | def test_cropping_2d(self, cropping, data_format, expected_ranges): method test_cropping_2d_with_dynamic_spatial_dim (line 66) | def test_cropping_2d_with_dynamic_spatial_dim(self): method test_cropping_2d_errors_if_cropping_more_than_available (line 87) | def test_cropping_2d_errors_if_cropping_more_than_available( method test_cropping_2d_errors_if_cropping_argument_invalid (line 96) | def test_cropping_2d_errors_if_cropping_argument_invalid(self): method test_cropping_2d_error_on_excessive_cropping (line 122) | def test_cropping_2d_error_on_excessive_cropping( FILE: keras/src/layers/reshaping/cropping3d.py class Cropping3D (line 9) | class Cropping3D(Layer): method __init__ (line 59) | def __init__( method compute_output_shape (line 103) | def compute_output_shape(self, input_shape): method call (line 125) | def call(self, inputs): method get_config (line 281) | def get_config(self): FILE: keras/src/layers/reshaping/cropping3d_test.py class Cropping3DTest (line 11) | class Cropping3DTest(testing.TestCase): method test_cropping_3d (line 34) | def test_cropping_3d( method test_cropping_3d_with_same_cropping (line 93) | def test_cropping_3d_with_same_cropping( method test_cropping_3d_with_dynamic_spatial_dim (line 126) | def test_cropping_3d_with_dynamic_spatial_dim(self): method test_cropping_3d_errors_if_cropping_more_than_available (line 148) | def test_cropping_3d_errors_if_cropping_more_than_available( method test_cropping_3d_errors_if_cropping_argument_invalid (line 157) | def test_cropping_3d_errors_if_cropping_argument_invalid(self): method test_cropping_3d_with_excessive_cropping (line 184) | def test_cropping_3d_with_excessive_cropping(self, cropping, data_form... FILE: keras/src/layers/reshaping/flatten.py class Flatten (line 12) | class Flatten(Layer): method __init__ (line 36) | def __init__(self, data_format=None, **kwargs): method call (line 42) | def call(self, inputs): method compute_output_shape (line 60) | def compute_output_shape(self, input_shape): method compute_output_spec (line 75) | def compute_output_spec(self, inputs): method get_config (line 81) | def get_config(self): FILE: keras/src/layers/reshaping/flatten_test.py class FlattenTest (line 13) | class FlattenTest(testing.TestCase): method test_flatten (line 21) | def test_flatten(self, sparse): method test_flatten_with_scalar_channels (line 91) | def test_flatten_with_scalar_channels(self): method test_flatten_symbolic_with_dynamic_batch_size (line 117) | def test_flatten_symbolic_with_dynamic_batch_size(self): method test_flatten_symbolic_with_dynamic_dimension (line 122) | def test_flatten_symbolic_with_dynamic_dimension(self): method test_flatten_with_dynamic_batch_size_and_dynamic_dimenstions (line 128) | def test_flatten_with_dynamic_batch_size_and_dynamic_dimenstions(self): FILE: keras/src/layers/reshaping/permute.py class Permute (line 9) | class Permute(Layer): method __init__ (line 35) | def __init__(self, dims, **kwargs): method compute_output_shape (line 46) | def compute_output_shape(self, input_shape): method compute_output_spec (line 52) | def compute_output_spec(self, inputs): method call (line 58) | def call(self, inputs): method get_config (line 61) | def get_config(self): FILE: keras/src/layers/reshaping/permute_test.py class PermuteTest (line 11) | class PermuteTest(testing.TestCase): method test_permute (line 19) | def test_permute(self, sparse): method test_permute_with_dynamic_batch_size (line 55) | def test_permute_with_dynamic_batch_size(self): method test_permute_errors_on_invalid_starting_dims_index (line 60) | def test_permute_errors_on_invalid_starting_dims_index(self): method test_permute_errors_on_invalid_set_of_dims_indices (line 70) | def test_permute_errors_on_invalid_set_of_dims_indices(self): FILE: keras/src/layers/reshaping/repeat_vector.py class RepeatVector (line 8) | class RepeatVector(Layer): method __init__ (line 28) | def __init__(self, n, **kwargs): method compute_output_shape (line 37) | def compute_output_shape(self, input_shape): method call (line 40) | def call(self, inputs): method get_config (line 45) | def get_config(self): FILE: keras/src/layers/reshaping/repeat_vector_test.py class FlattenTest (line 9) | class FlattenTest(testing.TestCase): method test_repeat_vector (line 11) | def test_repeat_vector(self): method test_repeat_vector_with_dynamic_batch_size (line 23) | def test_repeat_vector_with_dynamic_batch_size(self): method test_repeat_vector_with_dynamic_dimension (line 28) | def test_repeat_vector_with_dynamic_dimension(self): method test_repeat_vector_with_invalid_n (line 33) | def test_repeat_vector_with_invalid_n(self): FILE: keras/src/layers/reshaping/reshape.py class Reshape (line 9) | class Reshape(Layer): method __init__ (line 37) | def __init__(self, target_shape, **kwargs): method compute_output_shape (line 49) | def compute_output_shape(self, input_shape): method compute_output_spec (line 57) | def compute_output_spec(self, inputs): method call (line 63) | def call(self, inputs): method get_config (line 76) | def get_config(self): FILE: keras/src/layers/reshaping/reshape_test.py class ReshapeTest (line 13) | class ReshapeTest(testing.TestCase): method test_reshape (line 21) | def test_reshape(self, sparse): method test_reshape_with_dynamic_batch_size (line 94) | def test_reshape_with_dynamic_batch_size(self): method test_reshape_with_dynamic_batch_size_and_minus_one (line 99) | def test_reshape_with_dynamic_batch_size_and_minus_one(self): method test_reshape_layer_with_varying_input_size_and_minus_one (line 105) | def test_reshape_layer_with_varying_input_size_and_minus_one(self): method test_reshape_with_dynamic_dim_and_minus_one (line 112) | def test_reshape_with_dynamic_dim_and_minus_one(self): method test_reshape_sets_static_shape (line 118) | def test_reshape_sets_static_shape(self): method test_reshape_model_fit_with_varying_input_size_and_minus_one (line 125) | def test_reshape_model_fit_with_varying_input_size_and_minus_one(self): FILE: keras/src/layers/reshaping/up_sampling1d.py class UpSampling1D (line 8) | class UpSampling1D(Layer): method __init__ (line 43) | def __init__(self, size=2, **kwargs): method compute_output_shape (line 48) | def compute_output_shape(self, input_shape): method call (line 54) | def call(self, inputs): method get_config (line 57) | def get_config(self): FILE: keras/src/layers/reshaping/up_sampling1d_test.py class UpSamplingTest (line 9) | class UpSamplingTest(testing.TestCase): method test_upsampling_1d (line 11) | def test_upsampling_1d(self): method test_upsampling_1d_correctness (line 25) | def test_upsampling_1d_correctness(self): method test_upsampling_1d_correctness_with_ones (line 46) | def test_upsampling_1d_correctness_with_ones(self): method test_upsampling_1d_with_dynamic_batch_size (line 51) | def test_upsampling_1d_with_dynamic_batch_size(self): method test_upsampling_1d_with_dynamic_shape (line 56) | def test_upsampling_1d_with_dynamic_shape(self): FILE: keras/src/layers/reshaping/up_sampling2d.py class UpSampling2D (line 10) | class UpSampling2D(Layer): method __init__ (line 69) | def __init__( method compute_output_shape (line 78) | def compute_output_shape(self, input_shape): method call (line 104) | def call(self, inputs): method get_config (line 113) | def get_config(self): method _resize_images (line 122) | def _resize_images( FILE: keras/src/layers/reshaping/up_sampling2d_test.py class UpSampling2dTest (line 12) | class UpSampling2dTest(testing.TestCase): method setUpClass (line 14) | def setUpClass(cls): method tearDownClass (line 18) | def tearDownClass(cls): method test_upsampling_2d (line 27) | def test_upsampling_2d(self, data_format, length_row, length_col): method test_upsampling_2d_bilinear (line 79) | def test_upsampling_2d_bilinear( method test_upsampling_2d_correctness (line 123) | def test_upsampling_2d_correctness(self): method test_upsampling_2d_various_interpolation_methods (line 145) | def test_upsampling_2d_various_interpolation_methods(self): method test_upsampling_2d_lanczos_interpolation_methods (line 154) | def test_upsampling_2d_lanczos_interpolation_methods(self): FILE: keras/src/layers/reshaping/up_sampling3d.py class UpSampling3D (line 10) | class UpSampling3D(Layer): method __init__ (line 56) | def __init__(self, size=(2, 2, 2), data_format=None, **kwargs): method compute_output_shape (line 62) | def compute_output_shape(self, input_shape): method call (line 98) | def call(self, inputs): method get_config (line 103) | def get_config(self): method _resize_volumes (line 108) | def _resize_volumes( FILE: keras/src/layers/reshaping/up_sampling3d_test.py class UpSampling3dTest (line 10) | class UpSampling3dTest(testing.TestCase): method test_upsampling_3d (line 18) | def test_upsampling_3d( method test_upsampling_3d_correctness (line 90) | def test_upsampling_3d_correctness(self): FILE: keras/src/layers/reshaping/zero_padding1d.py class ZeroPadding1D (line 10) | class ZeroPadding1D(Layer): method __init__ (line 68) | def __init__(self, padding=1, data_format=None, **kwargs): method compute_output_shape (line 76) | def compute_output_shape(self, input_shape): method call (line 83) | def call(self, inputs): method get_config (line 90) | def get_config(self): FILE: keras/src/layers/reshaping/zero_padding1d_test.py class ZeroPadding1DTest (line 9) | class ZeroPadding1DTest(testing.TestCase): method test_zero_padding_1d (line 14) | def test_zero_padding_1d(self, data_format): method test_zero_padding_1d_with_same_padding (line 29) | def test_zero_padding_1d_with_same_padding(self, padding): method test_zero_padding_1d_with_dynamic_spatial_dim (line 39) | def test_zero_padding_1d_with_dynamic_spatial_dim(self): method test_zero_padding_1d_errors_if_padding_argument_invalid (line 57) | def test_zero_padding_1d_errors_if_padding_argument_invalid(self, padd... method test_zero_padding_1d_get_config (line 65) | def test_zero_padding_1d_get_config(self, data_format): FILE: keras/src/layers/reshaping/zero_padding2d.py class ZeroPadding2D (line 10) | class ZeroPadding2D(Layer): method __init__ (line 71) | def __init__(self, padding=(1, 1), data_format=None, **kwargs): method compute_output_shape (line 99) | def compute_output_shape(self, input_shape): method call (line 109) | def call(self, inputs): method get_config (line 116) | def get_config(self): FILE: keras/src/layers/reshaping/zero_padding2d_test.py class ZeroPadding2DTest (line 10) | class ZeroPadding2DTest(testing.TestCase): method test_zero_padding_2d (line 15) | def test_zero_padding_2d(self, data_format): method test_zero_padding_2d_with_same_padding (line 45) | def test_zero_padding_2d_with_same_padding(self, padding, data_format): method test_zero_padding_2d_with_dynamic_spatial_dim (line 62) | def test_zero_padding_2d_with_dynamic_spatial_dim(self): method test_zero_padding_2d_errors_if_padding_argument_invalid (line 81) | def test_zero_padding_2d_errors_if_padding_argument_invalid(self, padd... method test_zero_padding_2d_get_config (line 89) | def test_zero_padding_2d_get_config(self, data_format): FILE: keras/src/layers/reshaping/zero_padding3d.py class ZeroPadding3D (line 10) | class ZeroPadding3D(Layer): method __init__ (line 60) | def __init__( method compute_output_shape (line 98) | def compute_output_shape(self, input_shape): method call (line 108) | def call(self, inputs): method get_config (line 115) | def get_config(self): FILE: keras/src/layers/reshaping/zero_padding3d_test.py class ZeroPadding3DTest (line 10) | class ZeroPadding3DTest(testing.TestCase): method test_zero_padding_3d (line 14) | def test_zero_padding_3d(self, data_format): method test_zero_padding_3d_with_same_padding (line 48) | def test_zero_padding_3d_with_same_padding(self, padding, data_format): method test_zero_padding_3d_with_dynamic_spatial_dim (line 67) | def test_zero_padding_3d_with_dynamic_spatial_dim(self): method test_zero_padding_3d_errors_if_padding_argument_invalid (line 87) | def test_zero_padding_3d_errors_if_padding_argument_invalid(self, padd... method test_zero_padding_3d_get_config (line 95) | def test_zero_padding_3d_get_config(self, data_format): FILE: keras/src/layers/rnn/bidirectional.py class Bidirectional (line 11) | class Bidirectional(Layer): method __init__ (line 83) | def __init__( method _verify_layer_config (line 153) | def _verify_layer_config(self): method compute_output_shape (line 177) | def compute_output_shape(self, sequences_shape, initial_state_shape=No... method call (line 196) | def call( method reset_states (line 261) | def reset_states(self): method reset_state (line 265) | def reset_state(self): method states (line 272) | def states(self): method build (line 277) | def build(self, sequences_shape, initial_state_shape=None): method compute_mask (line 283) | def compute_mask(self, _, mask): method get_config (line 301) | def get_config(self): method from_config (line 313) | def from_config(cls, config, custom_objects=None): FILE: keras/src/layers/rnn/bidirectional_test.py class SimpleRNNTest (line 9) | class SimpleRNNTest(testing.TestCase): method test_basics (line 11) | def test_basics(self): method test_correctness (line 35) | def test_correctness(self): method test_statefulness (line 132) | def test_statefulness(self): method test_pass_initial_state (line 170) | def test_pass_initial_state(self): method test_masking (line 200) | def test_masking(self): method test_return_state (line 223) | def test_return_state(self): method test_output_shape (line 271) | def test_output_shape(self): method test_keeps_use_cudnn (line 296) | def test_keeps_use_cudnn(self): FILE: keras/src/layers/rnn/conv_lstm.py class ConvLSTMCell (line 16) | class ConvLSTMCell(Layer, DropoutRNNCell): method __init__ (line 85) | def __init__( method build (line 156) | def build(self, inputs_shape, states_shape=None): method call (line 232) | def call(self, inputs, states, training=False): method compute_output_shape (line 292) | def compute_output_shape(self, inputs_shape, states_shape=None): method get_initial_state (line 304) | def get_initial_state(self, batch_size=None): method input_conv (line 315) | def input_conv(self, x, w, b=None, padding="valid"): method recurrent_conv (line 333) | def recurrent_conv(self, x, w): method get_config (line 342) | def get_config(self): class ConvLSTM (line 383) | class ConvLSTM(RNN): method __init__ (line 464) | def __init__( method call (line 532) | def call(self, sequences, initial_state=None, mask=None, training=False): method compute_output_shape (line 537) | def compute_output_shape(self, sequences_shape, initial_state_shape=No... method compute_mask (line 556) | def compute_mask(self, _, mask): method filters (line 566) | def filters(self): method kernel_size (line 570) | def kernel_size(self): method strides (line 574) | def strides(self): method padding (line 578) | def padding(self): method data_format (line 582) | def data_format(self): method dilation_rate (line 586) | def dilation_rate(self): method activation (line 590) | def activation(self): method recurrent_activation (line 594) | def recurrent_activation(self): method use_bias (line 598) | def use_bias(self): method kernel_initializer (line 602) | def kernel_initializer(self): method recurrent_initializer (line 606) | def recurrent_initializer(self): method bias_initializer (line 610) | def bias_initializer(self): method unit_forget_bias (line 614) | def unit_forget_bias(self): method kernel_regularizer (line 618) | def kernel_regularizer(self): method recurrent_regularizer (line 622) | def recurrent_regularizer(self): method bias_regularizer (line 626) | def bias_regularizer(self): method kernel_constraint (line 630) | def kernel_constraint(self): method recurrent_constraint (line 634) | def recurrent_constraint(self): method bias_constraint (line 638) | def bias_constraint(self): method dropout (line 642) | def dropout(self): method recurrent_dropout (line 646) | def recurrent_dropout(self): method get_config (line 649) | def get_config(self): method from_config (line 694) | def from_config(cls, config): FILE: keras/src/layers/rnn/conv_lstm1d.py class ConvLSTM1D (line 6) | class ConvLSTM1D(ConvLSTM): method __init__ (line 123) | def __init__( FILE: keras/src/layers/rnn/conv_lstm1d_test.py class ConvLSTM1DTest (line 10) | class ConvLSTM1DTest(testing.TestCase): method test_basics (line 12) | def test_basics(self): method test_correctness (line 55) | def test_correctness(self): FILE: keras/src/layers/rnn/conv_lstm2d.py class ConvLSTM2D (line 6) | class ConvLSTM2D(ConvLSTM): method __init__ (line 123) | def __init__( FILE: keras/src/layers/rnn/conv_lstm2d_test.py class ConvLSTM2DTest (line 10) | class ConvLSTM2DTest(testing.TestCase): method test_basics (line 12) | def test_basics(self): method test_correctness (line 59) | def test_correctness(self): FILE: keras/src/layers/rnn/conv_lstm3d.py class ConvLSTM3D (line 6) | class ConvLSTM3D(ConvLSTM): method __init__ (line 122) | def __init__( FILE: keras/src/layers/rnn/conv_lstm3d_test.py class ConvLSTM1DTest (line 10) | class ConvLSTM1DTest(testing.TestCase): method test_basics (line 12) | def test_basics(self): method test_correctness (line 65) | def test_correctness(self): FILE: keras/src/layers/rnn/conv_lstm_test.py class ConvLSTMCellTest (line 10) | class ConvLSTMCellTest(testing.TestCase): method test_correctness (line 11) | def test_correctness(self): class ConvLSTMTest (line 37) | class ConvLSTMTest(testing.TestCase): method test_correctness (line 38) | def test_correctness(self): FILE: keras/src/layers/rnn/dropout_rnn_cell.py class DropoutRNNCell (line 5) | class DropoutRNNCell: method _create_dropout_mask (line 22) | def _create_dropout_mask(self, step_input, dropout_rate): method get_dropout_mask (line 37) | def get_dropout_mask(self, step_input): method get_recurrent_dropout_mask (line 46) | def get_recurrent_dropout_mask(self, step_input): method reset_dropout_mask (line 55) | def reset_dropout_mask(self): method reset_recurrent_dropout_mask (line 65) | def reset_recurrent_dropout_mask(self): FILE: keras/src/layers/rnn/dropout_rnn_cell_test.py class RNNCellWithDropout (line 10) | class RNNCellWithDropout(layers.Layer, DropoutRNNCell): method __init__ (line 11) | def __init__( method build (line 22) | def build(self, input_shape): method call (line 34) | def call(self, inputs, states, training=False): class DropoutRNNCellTest (line 47) | class DropoutRNNCellTest(testing.TestCase): method test_seed_tracking (line 48) | def test_seed_tracking(self): method test_basics (line 55) | def test_basics(self): FILE: keras/src/layers/rnn/gru.py class GRUCell (line 16) | class GRUCell(Layer, DropoutRNNCell): method __init__ (line 86) | def __init__( method build (line 145) | def build(self, input_shape): method call (line 182) | def call(self, inputs, states, training=False): method get_config (line 300) | def get_config(self): method get_initial_state (line 335) | def get_initial_state(self, batch_size=None): class GRU (line 342) | class GRU(RNN): method __init__ (line 465) | def __init__( method inner_loop (line 547) | def inner_loop(self, sequences, initial_state, mask, training=False): method call (line 600) | def call(self, sequences, initial_state=None, mask=None, training=False): method units (line 606) | def units(self): method activation (line 610) | def activation(self): method recurrent_activation (line 614) | def recurrent_activation(self): method use_bias (line 618) | def use_bias(self): method kernel_initializer (line 622) | def kernel_initializer(self): method recurrent_initializer (line 626) | def recurrent_initializer(self): method bias_initializer (line 630) | def bias_initializer(self): method kernel_regularizer (line 634) | def kernel_regularizer(self): method recurrent_regularizer (line 638) | def recurrent_regularizer(self): method bias_regularizer (line 642) | def bias_regularizer(self): method kernel_constraint (line 646) | def kernel_constraint(self): method recurrent_constraint (line 650) | def recurrent_constraint(self): method bias_constraint (line 654) | def bias_constraint(self): method dropout (line 658) | def dropout(self): method recurrent_dropout (line 662) | def recurrent_dropout(self): method reset_after (line 666) | def reset_after(self): method get_config (line 669) | def get_config(self): method from_config (line 709) | def from_config(cls, config): FILE: keras/src/layers/rnn/gru_test.py class GRUTest (line 11) | class GRUTest(testing.TestCase): method test_basics (line 13) | def test_basics(self): method test_correctness (line 52) | def test_correctness(self, implementation): method test_statefulness (line 168) | def test_statefulness(self): method test_pass_initial_state (line 205) | def test_pass_initial_state(self): method test_pass_return_state (line 237) | def test_pass_return_state(self): method test_masking (line 286) | def test_masking(self): method test_legacy_implementation_argument (line 390) | def test_legacy_implementation_argument(self): method test_stateful_with_symbolic_batch_size (line 420) | def test_stateful_with_symbolic_batch_size(self): FILE: keras/src/layers/rnn/lstm.py class LSTMCell (line 16) | class LSTMCell(Layer, DropoutRNNCell): method __init__ (line 88) | def __init__( method build (line 147) | def build(self, input_shape): method _compute_carry_and_output (line 195) | def _compute_carry_and_output(self, x, h_tm1, c_tm1): method _compute_carry_and_output_fused (line 221) | def _compute_carry_and_output_fused(self, z, c_tm1): method call (line 230) | def call(self, inputs, states, training=False): method get_config (line 289) | def get_config(self): method get_initial_state (line 324) | def get_initial_state(self, batch_size=None): class LSTM (line 332) | class LSTM(RNN): method __init__ (line 448) | def __init__( method inner_loop (line 529) | def inner_loop(self, sequences, initial_state, mask, training=False): method call (line 582) | def call(self, sequences, initial_state=None, mask=None, training=False): method units (line 588) | def units(self): method activation (line 592) | def activation(self): method recurrent_activation (line 596) | def recurrent_activation(self): method use_bias (line 600) | def use_bias(self): method unit_forget_bias (line 604) | def unit_forget_bias(self): method kernel_initializer (line 608) | def kernel_initializer(self): method recurrent_initializer (line 612) | def recurrent_initializer(self): method bias_initializer (line 616) | def bias_initializer(self): method kernel_regularizer (line 620) | def kernel_regularizer(self): method recurrent_regularizer (line 624) | def recurrent_regularizer(self): method bias_regularizer (line 628) | def bias_regularizer(self): method kernel_constraint (line 632) | def kernel_constraint(self): method recurrent_constraint (line 636) | def recurrent_constraint(self): method bias_constraint (line 640) | def bias_constraint(self): method dropout (line 644) | def dropout(self): method recurrent_dropout (line 648) | def recurrent_dropout(self): method get_config (line 651) | def get_config(self): method from_config (line 691) | def from_config(cls, config): FILE: keras/src/layers/rnn/lstm_test.py class LSTMTest (line 10) | class LSTMTest(testing.TestCase): method test_basics (line 12) | def test_basics(self): method test_correctness (line 51) | def test_correctness(self, implementation): method test_statefulness (line 172) | def test_statefulness(self): method test_pass_initial_state (line 213) | def test_pass_initial_state(self): method test_masking (line 252) | def test_masking(self): FILE: keras/src/layers/rnn/rnn.py class RNN (line 13) | class RNN(Layer): method __init__ (line 174) | def __init__( method compute_output_shape (line 234) | def compute_output_shape(self, sequences_shape, initial_state_shape=No... method compute_mask (line 257) | def compute_mask(self, _, mask): method build (line 270) | def build(self, sequences_shape, initial_state_shape=None): method _create_state_variables (line 292) | def _create_state_variables(self, batch_size): method get_initial_state (line 304) | def get_initial_state(self, batch_size): method reset_states (line 321) | def reset_states(self): method reset_state (line 325) | def reset_state(self): method inner_loop (line 330) | def inner_loop(self, sequences, initial_state, mask, training=False): method call (line 362) | def call( method _maybe_config_dropout_masks (line 453) | def _maybe_config_dropout_masks(self, cell, input_sequence, input_state): method _maybe_reset_dropout_masks (line 471) | def _maybe_reset_dropout_masks(self, cell): method get_config (line 479) | def get_config(self): method from_config (line 493) | def from_config(cls, config, custom_objects=None): FILE: keras/src/layers/rnn/rnn_test.py class OneStateRNNCell (line 9) | class OneStateRNNCell(layers.Layer): method __init__ (line 10) | def __init__(self, units, state_size=None, **kwargs): method build (line 15) | def build(self, input_shape): method call (line 27) | def call(self, inputs, states): class TwoStatesRNNCell (line 34) | class TwoStatesRNNCell(layers.Layer): method __init__ (line 35) | def __init__(self, units, state_size=None, **kwargs): method build (line 41) | def build(self, input_shape): method call (line 58) | def call(self, inputs, states): class RNNTest (line 68) | class RNNTest(testing.TestCase): method test_basics (line 70) | def test_basics(self): method test_compute_output_shape_single_state (line 156) | def test_compute_output_shape_single_state(self): method test_compute_output_shape_two_states (line 180) | def test_compute_output_shape_two_states(self): method test_dynamic_shapes (line 206) | def test_dynamic_shapes(self): method test_forward_pass_single_state (line 254) | def test_forward_pass_single_state(self): method test_forward_pass_two_states (line 278) | def test_forward_pass_two_states(self): method test_passing_initial_state_single_state (line 304) | def test_passing_initial_state_single_state(self): method test_passing_initial_state_two_states (line 318) | def test_passing_initial_state_two_states(self): method test_statefulness_single_state (line 333) | def test_statefulness_single_state(self): method test_statefulness_two_states (line 346) | def test_statefulness_two_states(self): method test_go_backwards (line 362) | def test_go_backwards(self): method test_serialization (line 390) | def test_serialization(self): method test_stateful_batch_size_mismatch_raises (line 397) | def test_stateful_batch_size_mismatch_raises(self): FILE: keras/src/layers/rnn/simple_rnn.py class SimpleRNNCell (line 15) | class SimpleRNNCell(Layer, DropoutRNNCell): method __init__ (line 79) | def __init__( method build (line 128) | def build(self, input_shape): method call (line 154) | def call(self, sequence, states, training=False): method get_initial_state (line 174) | def get_initial_state(self, batch_size=None): method get_config (line 179) | def get_config(self): class SimpleRNN (line 212) | class SimpleRNN(RNN): method __init__ (line 296) | def __init__( method call (line 352) | def call(self, sequences, initial_state=None, mask=None, training=False): method units (line 358) | def units(self): method activation (line 362) | def activation(self): method use_bias (line 366) | def use_bias(self): method kernel_initializer (line 370) | def kernel_initializer(self): method recurrent_initializer (line 374) | def recurrent_initializer(self): method bias_initializer (line 378) | def bias_initializer(self): method kernel_regularizer (line 382) | def kernel_regularizer(self): method recurrent_regularizer (line 386) | def recurrent_regularizer(self): method bias_regularizer (line 390) | def bias_regularizer(self): method kernel_constraint (line 394) | def kernel_constraint(self): method recurrent_constraint (line 398) | def recurrent_constraint(self): method bias_constraint (line 402) | def bias_constraint(self): method dropout (line 406) | def dropout(self): method recurrent_dropout (line 410) | def recurrent_dropout(self): method get_config (line 413) | def get_config(self): method from_config (line 448) | def from_config(cls, config): FILE: keras/src/layers/rnn/simple_rnn_test.py class SimpleRNNTest (line 9) | class SimpleRNNTest(testing.TestCase): method test_basics (line 11) | def test_basics(self): method test_correctness (line 40) | def test_correctness(self): method test_statefulness (line 120) | def test_statefulness(self): method test_pass_initial_state (line 157) | def test_pass_initial_state(self): method test_masking (line 199) | def test_masking(self): FILE: keras/src/layers/rnn/stacked_rnn_cells.py class StackedRNNCells (line 9) | class StackedRNNCells(Layer): method __init__ (line 34) | def __init__(self, cells, **kwargs): method state_size (line 50) | def state_size(self): method output_size (line 54) | def output_size(self): method get_initial_state (line 62) | def get_initial_state(self, batch_size=None): method call (line 87) | def call(self, inputs, states, training=False, **kwargs): method build (line 107) | def build(self, input_shape): method get_config (line 121) | def get_config(self): method from_config (line 130) | def from_config(cls, config, custom_objects=None): FILE: keras/src/layers/rnn/stacked_rnn_cells_test.py class StackedRNNTest (line 10) | class StackedRNNTest(testing.TestCase): method test_basics (line 12) | def test_basics(self): method test_correctness_single_state_stack (line 136) | def test_correctness_single_state_stack(self): method test_correctness_two_states_stack (line 213) | def test_correctness_two_states_stack(self): method test_statefullness_single_state_stack (line 276) | def test_statefullness_single_state_stack(self): method test_statefullness_two_states_stack (line 290) | def test_statefullness_two_states_stack(self): method test_return_state_stacked_lstm_cell (line 304) | def test_return_state_stacked_lstm_cell(self): method test_stacked_lstm_cell_mask (line 324) | def test_stacked_lstm_cell_mask(self): FILE: keras/src/layers/rnn/time_distributed.py class TimeDistributed (line 11) | class TimeDistributed(Wrapper): method __init__ (line 47) | def __init__(self, layer, **kwargs): method _get_child_input_shape (line 56) | def _get_child_input_shape(self, input_shape): method compute_output_shape (line 64) | def compute_output_shape(self, input_shape): method build (line 69) | def build(self, input_shape): method call (line 73) | def call(self, inputs, training=None, mask=None): FILE: keras/src/layers/rnn/time_distributed_test.py class TimeDistributedTest (line 12) | class TimeDistributedTest(testing.TestCase): method test_basics (line 14) | def test_basics(self): method test_build (line 25) | def test_build(self): method test_correctness (line 37) | def test_correctness(self): method test_masking (line 53) | def test_masking(self): method test_with_mask_zero (line 83) | def test_with_mask_zero(self): method test_mask_validation_with_mismatched_timesteps (line 103) | def test_mask_validation_with_mismatched_timesteps(self): method test_mask_validation_with_mismatched_batch_size (line 128) | def test_mask_validation_with_mismatched_batch_size(self): method test_mask_validation_with_correct_shape (line 149) | def test_mask_validation_with_correct_shape(self): method test_mask_validation_with_3d_mask (line 168) | def test_mask_validation_with_3d_mask(self): method test_mask_validation_with_none_mask (line 195) | def test_mask_validation_with_none_mask(self): method test_mask_validation_with_both_batch_and_timesteps_mismatched (line 211) | def test_mask_validation_with_both_batch_and_timesteps_mismatched(self): FILE: keras/src/legacy/backend.py function abs (line 16) | def abs(x): function all (line 22) | def all(x, axis=None, keepdims=False): function any (line 29) | def any(x, axis=None, keepdims=False): function argmax (line 36) | def argmax(x, axis=-1): function argmin (line 42) | def argmin(x, axis=-1): function arange (line 48) | def arange(start, stop=None, step=1, dtype="int32"): function batch_dot (line 59) | def batch_dot(x, y, axes=None): function batch_flatten (line 209) | def batch_flatten(x): function batch_get_value (line 216) | def batch_get_value(tensors): function batch_set_value (line 222) | def batch_set_value(tuples): function batch_normalization (line 231) | def batch_normalization(x, mean, var, beta, gamma, axis=-1, epsilon=1e-3): function bias_add (line 237) | def bias_add(x, bias, data_format=None): function binary_crossentropy (line 263) | def binary_crossentropy(target, output, from_logits=False): function binary_focal_crossentropy (line 283) | def binary_focal_crossentropy( function cast (line 315) | def cast(x, dtype): function cast_to_floatx (line 321) | def cast_to_floatx(x): function categorical_crossentropy (line 329) | def categorical_crossentropy(target, output, from_logits=False, axis=-1): function categorical_focal_crossentropy (line 353) | def categorical_focal_crossentropy( function clip (line 392) | def clip(x, min_value, max_value): function concatenate (line 407) | def concatenate(tensors, axis=-1): function constant (line 425) | def constant(value, dtype=None, shape=None, name=None): function _preprocess_conv1d_input (line 433) | def _preprocess_conv1d_input(x, data_format): function _preprocess_conv2d_input (line 440) | def _preprocess_conv2d_input(x, data_format, force_transpose=False): function _preprocess_conv3d_input (line 450) | def _preprocess_conv3d_input(x, data_format): function _preprocess_padding (line 457) | def _preprocess_padding(padding): function conv1d (line 468) | def conv1d( function conv2d (line 500) | def conv2d( function conv2d_transpose (line 530) | def conv2d_transpose( function conv3d (line 599) | def conv3d( function cos (line 629) | def cos(x): function count_params (line 635) | def count_params(x): function ctc_batch_cost (line 641) | def ctc_batch_cost(y_true, y_pred, input_length, label_length): function ctc_label_dense_to_sparse (line 662) | def ctc_label_dense_to_sparse(labels, label_lengths): function ctc_decode (line 703) | def ctc_decode(y_pred, input_length, greedy=True, beam_width=100, top_pa... function cumsum (line 731) | def cumsum(x, axis=0): function cumprod (line 737) | def cumprod(x, axis=0): function depthwise_conv2d (line 743) | def depthwise_conv2d( function dot (line 778) | def dot(x, y): function dropout (line 810) | def dropout(x, level, noise_shape=None, seed=None): function dtype (line 818) | def dtype(x): function elu (line 824) | def elu(x, alpha=1.0): function equal (line 834) | def equal(x, y): function eval (line 840) | def eval(x): function exp (line 846) | def exp(x): function expand_dims (line 852) | def expand_dims(x, axis=-1): function eye (line 858) | def eye(size, dtype=None, name=None): function flatten (line 867) | def flatten(x): function foldl (line 873) | def foldl(fn, elems, initializer=None, name=None): function foldr (line 879) | def foldr(fn, elems, initializer=None, name=None): function gather (line 885) | def gather(reference, indices): function get_value (line 891) | def get_value(x): function gradients (line 907) | def gradients(loss, variables): function greater (line 915) | def greater(x, y): function greater_equal (line 921) | def greater_equal(x, y): function hard_sigmoid (line 927) | def hard_sigmoid(x): function in_top_k (line 938) | def in_top_k(predictions, targets, k): function int_shape (line 944) | def int_shape(x): function is_sparse (line 956) | def is_sparse(tensor): function l2_normalize (line 965) | def l2_normalize(x, axis=None): function less (line 971) | def less(x, y): function less_equal (line 977) | def less_equal(x, y): function log (line 983) | def log(x): function map_fn (line 989) | def map_fn(fn, elems, name=None, dtype=None): function max (line 995) | def max(x, axis=None, keepdims=False): function maximum (line 1001) | def maximum(x, y): function mean (line 1007) | def mean(x, axis=None, keepdims=False): function min (line 1015) | def min(x, axis=None, keepdims=False): function minimum (line 1021) | def minimum(x, y): function moving_average_update (line 1027) | def moving_average_update(x, value, momentum): function name_scope (line 1035) | def name_scope(name): function ndim (line 1041) | def ndim(x): function not_equal (line 1047) | def not_equal(x, y): function one_hot (line 1053) | def one_hot(indices, num_classes): function ones (line 1059) | def ones(shape, dtype=None, name=None): function ones_like (line 1072) | def ones_like(x, dtype=None, name=None): function permute_dimensions (line 1078) | def permute_dimensions(x, pattern): function pool2d (line 1084) | def pool2d( function pool3d (line 1128) | def pool3d( function pow (line 1168) | def pow(x, a): function prod (line 1174) | def prod(x, axis=None, keepdims=False): function random_bernoulli (line 1180) | def random_bernoulli(shape, p=0.0, dtype=None, seed=None): function random_normal (line 1194) | def random_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function random_normal_variable (line 1206) | def random_normal_variable( function random_uniform (line 1223) | def random_uniform(shape, minval=0.0, maxval=1.0, dtype=None, seed=None): function random_uniform_variable (line 1235) | def random_uniform_variable(shape, low, high, dtype=None, name=None, see... function reshape (line 1250) | def reshape(x, shape): function relu (line 1256) | def relu(x, alpha=0.0, max_value=None, threshold=0.0): function repeat (line 1297) | def repeat(x, n): function repeat_elements (line 1309) | def repeat_elements(x, rep, axis): function resize_images (line 1347) | def resize_images( function resize_volumes (line 1394) | def resize_volumes(x, depth_factor, height_factor, width_factor, data_fo... function reverse (line 1411) | def reverse(x, axes): function rnn (line 1419) | def rnn( function round (line 1827) | def round(x): function separable_conv2d (line 1833) | def separable_conv2d( function set_value (line 1874) | def set_value(x, value): function shape (line 1881) | def shape(x): function sigmoid (line 1887) | def sigmoid(x): function sign (line 1894) | def sign(x): function sin (line 1900) | def sin(x): function softmax (line 1906) | def softmax(x, axis=-1): function softplus (line 1927) | def softplus(x): function softsign (line 1933) | def softsign(x): function sparse_categorical_crossentropy (line 1939) | def sparse_categorical_crossentropy( function spatial_2d_padding (line 2012) | def spatial_2d_padding(x, padding=((1, 1), (1, 1)), data_format=None): function spatial_3d_padding (line 2032) | def spatial_3d_padding(x, padding=((1, 1), (1, 1), (1, 1)), data_format=... function sqrt (line 2069) | def sqrt(x): function square (line 2077) | def square(x): function squeeze (line 2083) | def squeeze(x, axis): function stack (line 2089) | def stack(x, axis=0): function std (line 2095) | def std(x, axis=None, keepdims=False): function stop_gradient (line 2103) | def stop_gradient(variables): function sum (line 2111) | def sum(x, axis=None, keepdims=False): function switch (line 2117) | def switch(condition, then_expression, else_expression): function tanh (line 2171) | def tanh(x): function temporal_padding (line 2177) | def temporal_padding(x, padding=(1, 1)): function tile (line 2189) | def tile(x, n): function to_dense (line 2197) | def to_dense(tensor): function transpose (line 2206) | def transpose(x): function truncated_normal (line 2212) | def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function update (line 2224) | def update(x, new_x): function update_add (line 2230) | def update_add(x, increment): function update_sub (line 2236) | def update_sub(x, decrement): function var (line 2242) | def var(x, axis=None, keepdims=False): function variable (line 2250) | def variable(value, dtype=None, name=None, constraint=None): function zeros (line 2277) | def zeros(shape, dtype=None, name=None): function zeros_like (line 2290) | def zeros_like(x, dtype=None, name=None): FILE: keras/src/legacy/layers.py class AlphaDropout (line 16) | class AlphaDropout(Layer): method __init__ (line 19) | def __init__(self, rate, noise_shape=None, seed=None, **kwargs): method call (line 28) | def call(self, inputs, training=False): method get_config (line 55) | def get_config(self): method compute_output_shape (line 60) | def compute_output_shape(self, input_shape): class RandomHeight (line 65) | class RandomHeight(Layer): method __init__ (line 68) | def __init__(self, factor, interpolation="bilinear", seed=None, **kwar... method call (line 92) | def call(self, inputs, training=True): method compute_output_shape (line 125) | def compute_output_shape(self, input_shape): method get_config (line 130) | def get_config(self): class RandomWidth (line 141) | class RandomWidth(Layer): method __init__ (line 144) | def __init__(self, factor, interpolation="bilinear", seed=None, **kwar... method call (line 167) | def call(self, inputs, training=True): method compute_output_shape (line 200) | def compute_output_shape(self, input_shape): method get_config (line 205) | def get_config(self): class ThresholdedReLU (line 216) | class ThresholdedReLU(Layer): method __init__ (line 219) | def __init__(self, theta=1.0, **kwargs): method call (line 234) | def call(self, inputs): method get_config (line 238) | def get_config(self): method compute_output_shape (line 243) | def compute_output_shape(self, input_shape): FILE: keras/src/legacy/losses.py class Reduction (line 5) | class Reduction: method all (line 12) | def all(cls): method validate (line 16) | def validate(cls, key): FILE: keras/src/legacy/preprocessing/image.py class Iterator (line 20) | class Iterator(PyDataset): method __init__ (line 39) | def __init__(self, n, batch_size, shuffle, seed, **kwargs): method _set_index_array (line 51) | def _set_index_array(self): method __getitem__ (line 56) | def __getitem__(self, idx): method __len__ (line 73) | def __len__(self): method on_epoch_end (line 76) | def on_epoch_end(self): method reset (line 79) | def reset(self): method _flow_index (line 82) | def _flow_index(self): method __iter__ (line 105) | def __iter__(self): method __next__ (line 110) | def __next__(self): method _get_batches_of_transformed_samples (line 117) | def _get_batches_of_transformed_samples(self, index_array): function _iter_valid_files (line 128) | def _iter_valid_files(directory, white_list_formats, follow_links): function _list_valid_filenames_in_directory (line 157) | def _list_valid_filenames_in_directory( class BatchFromFilesMixin (line 207) | class BatchFromFilesMixin: method set_processing_attrs (line 213) | def set_processing_attrs( method _get_batches_of_transformed_samples (line 301) | def _get_batches_of_transformed_samples(self, index_array): method filepaths (line 371) | def filepaths(self): method labels (line 379) | def labels(self): method sample_weight (line 388) | def sample_weight(self): class DirectoryIterator (line 396) | class DirectoryIterator(BatchFromFilesMixin, Iterator): method __init__ (line 404) | def __init__( method filepaths (line 505) | def filepaths(self): method labels (line 509) | def labels(self): method sample_weight (line 513) | def sample_weight(self): class NumpyArrayIterator (line 519) | class NumpyArrayIterator(Iterator): method __init__ (line 525) | def __init__( method _get_batches_of_transformed_samples (line 645) | def _get_batches_of_transformed_samples(self, index_array): function validate_filename (line 680) | def validate_filename(filename, white_list_formats): class DataFrameIterator (line 694) | class DataFrameIterator(BatchFromFilesMixin, Iterator): method __init__ (line 707) | def __init__( method _check_params (line 793) | def _check_params(self, df, x_col, y_col, weight_col, classes): method get_classes (line 861) | def get_classes(self, df, y_col): method _filter_classes (line 871) | def _filter_classes(df, y_col, classes): method _filter_valid_filepaths (line 900) | def _filter_valid_filepaths(self, df, x_col): method filepaths (line 925) | def filepaths(self): method labels (line 929) | def labels(self): method sample_weight (line 936) | def sample_weight(self): function flip_axis (line 940) | def flip_axis(x, axis): class ImageDataGenerator (line 948) | class ImageDataGenerator: method __init__ (line 951) | def __init__( method flow (line 1087) | def flow( method flow_from_directory (line 1118) | def flow_from_directory( method flow_from_dataframe (line 1157) | def flow_from_dataframe( method standardize (line 1230) | def standardize(self, x): method get_random_transform (line 1292) | def get_random_transform(self, img_shape, seed=None): method apply_transform (line 1383) | def apply_transform(self, x, transform_parameters): method random_transform (line 1447) | def random_transform(self, x, seed=None): method fit (line 1460) | def fit(self, x, augment=False, rounds=1, seed=None): function random_rotation (line 1543) | def random_rotation( function random_shift (line 1569) | def random_shift( function random_shear (line 1599) | def random_shear( function random_zoom (line 1625) | def random_zoom( function apply_channel_shift (line 1661) | def apply_channel_shift(x, intensity, channel_axis=0): function random_channel_shift (line 1685) | def random_channel_shift(x, intensity_range, channel_axis=0): function apply_brightness_shift (line 1703) | def apply_brightness_shift(x, brightness, scale=True): function random_brightness (line 1734) | def random_brightness(x, brightness_range, scale=True): function transform_matrix_offset_center (line 1761) | def transform_matrix_offset_center(matrix, x, y): function apply_affine_transform (line 1771) | def apply_affine_transform( FILE: keras/src/legacy/preprocessing/sequence.py class TimeseriesGenerator (line 13) | class TimeseriesGenerator(PyDataset): method __init__ (line 57) | def __init__( method __len__ (line 100) | def __len__(self): method __getitem__ (line 105) | def __getitem__(self, index): method get_config (line 130) | def get_config(self): method to_json (line 169) | def to_json(self, **kwargs): function make_sampling_table (line 188) | def make_sampling_table(size, sampling_factor=1e-5): function skipgrams (line 230) | def skipgrams( FILE: keras/src/legacy/preprocessing/text.py function text_to_word_sequence (line 14) | def text_to_word_sequence( function one_hot (line 33) | def one_hot( function hashing_trick (line 54) | def hashing_trick( class Tokenizer (line 82) | class Tokenizer: method __init__ (line 85) | def __init__( method fit_on_texts (line 121) | def fit_on_texts(self, texts): method fit_on_sequences (line 169) | def fit_on_sequences(self, sequences): method texts_to_sequences (line 176) | def texts_to_sequences(self, texts): method texts_to_sequences_generator (line 179) | def texts_to_sequences_generator(self, texts): method sequences_to_texts (line 213) | def sequences_to_texts(self, sequences): method sequences_to_texts_generator (line 216) | def sequences_to_texts_generator(self, sequences): method texts_to_matrix (line 234) | def texts_to_matrix(self, texts, mode="binary"): method sequences_to_matrix (line 238) | def sequences_to_matrix(self, sequences, mode="binary"): method get_config (line 284) | def get_config(self): method to_json (line 306) | def to_json(self, **kwargs): function tokenizer_from_json (line 316) | def tokenizer_from_json(json_string): FILE: keras/src/legacy/saving/json_utils.py class Encoder (line 17) | class Encoder(json.JSONEncoder): method default (line 20) | def default(self, obj): method encode (line 28) | def encode(self, obj): function _encode_tuple (line 32) | def _encode_tuple(x): function decode (line 46) | def decode(json_string): function decode_and_deserialize (line 50) | def decode_and_deserialize( function _decode_helper (line 65) | def _decode_helper( function get_json_type (line 133) | def get_json_type(obj): FILE: keras/src/legacy/saving/json_utils_test.py class JsonUtilsTestAllBackends (line 13) | class JsonUtilsTestAllBackends(testing.TestCase): method test_encode_decode_tuple (line 14) | def test_encode_decode_tuple(self): method test_encode_decode_enum (line 23) | def test_encode_decode_enum(self): method test_encode_decode_bytes (line 33) | def test_encode_decode_bytes(self): class JsonUtilsTestTF (line 44) | class JsonUtilsTestTF(testing.TestCase): method test_encode_decode_tensor_shape (line 45) | def test_encode_decode_tensor_shape(self): method test_encode_decode_type_spec (line 58) | def test_encode_decode_type_spec(self): method test_encode_decode_ragged_tensor (line 75) | def test_encode_decode_ragged_tensor(self): method test_encode_decode_extension_type_tensor (line 81) | def test_encode_decode_extension_type_tensor(self): FILE: keras/src/legacy/saving/legacy_h5_format.py function save_model_to_hdf5 (line 26) | def save_model_to_hdf5(model, filepath, overwrite=True, include_optimize... function load_model_from_hdf5 (line 76) | def load_model_from_hdf5( function save_weights_to_hdf5_group (line 202) | def save_weights_to_hdf5_group(f, model): function save_subset_weights_to_hdf5_group (line 232) | def save_subset_weights_to_hdf5_group(f, weights): function save_optimizer_weights_to_hdf5_group (line 251) | def save_optimizer_weights_to_hdf5_group(hdf5_group, optimizer): function save_attributes_to_hdf5_group (line 282) | def save_attributes_to_hdf5_group(group, name, data): function load_weights_from_hdf5_group (line 326) | def load_weights_from_hdf5_group(f, model, skip_mismatch=False): function _set_weights (line 419) | def _set_weights( function load_weights_from_hdf5_group_by_name (line 465) | def load_weights_from_hdf5_group_by_name(f, model, skip_mismatch=False): function load_subset_weights_from_hdf5_group (line 568) | def load_subset_weights_from_hdf5_group(f): function load_optimizer_weights_from_hdf5_group (line 585) | def load_optimizer_weights_from_hdf5_group(hdf5_group): function load_attributes_from_hdf5_group (line 603) | def load_attributes_from_hdf5_group(group, name): function _legacy_weights (line 636) | def _legacy_weights(layer): FILE: keras/src/legacy/saving/legacy_h5_format_test.py function get_sequential_model (line 25) | def get_sequential_model(keras): function get_functional_model (line 38) | def get_functional_model(keras): function get_subclassed_model (line 51) | def get_subclassed_model(keras): class LegacyH5WeightsTest (line 81) | class LegacyH5WeightsTest(testing.TestCase): method _check_reloading_weights (line 82) | def _check_reloading_weights(self, ref_input, model, tf_keras_model): method test_sequential_model_weights (line 96) | def test_sequential_model_weights(self): method test_functional_model_weights (line 102) | def test_functional_model_weights(self): method test_subclassed_model_weights (line 108) | def test_subclassed_model_weights(self): class LegacyH5WholeModelTest (line 116) | class LegacyH5WholeModelTest(testing.TestCase): method _check_reloading_model (line 117) | def _check_reloading_model(self, ref_input, model): method test_sequential_model (line 126) | def test_sequential_model(self): method test_functional_model (line 131) | def test_functional_model(self): method test_compiled_model_with_various_layers (line 136) | def test_compiled_model_with_various_layers(self): method test_saving_lambda (line 146) | def test_saving_lambda(self): method test_saving_include_optimizer_false (line 171) | def test_saving_include_optimizer_false(self): method test_custom_sequential_registered_no_scope (line 193) | def test_custom_sequential_registered_no_scope(self): method test_custom_functional_registered_no_scope (line 206) | def test_custom_functional_registered_no_scope(self): method test_custom_function_from_custom_objects_no_registration (line 219) | def test_custom_function_from_custom_objects_no_registration(self): method test_nested_layers (line 237) | def test_nested_layers(self): method test_model_loading_with_axis_arg (line 305) | def test_model_loading_with_axis_arg(self): class LegacyH5BackwardsCompatTest (line 323) | class LegacyH5BackwardsCompatTest(testing.TestCase): method _check_reloading_model (line 324) | def _check_reloading_model(self, ref_input, model, tf_keras_model): method test_sequential_model (line 333) | def test_sequential_model(self): method test_functional_model (line 339) | def test_functional_model(self): method test_compiled_model_with_various_layers (line 345) | def test_compiled_model_with_various_layers(self): method test_saving_lambda (line 363) | def test_saving_lambda(self): method test_saving_include_optimizer_false (line 389) | def test_saving_include_optimizer_false(self): method test_custom_sequential_registered_no_scope (line 410) | def test_custom_sequential_registered_no_scope(self): method test_custom_functional_registered_no_scope (line 434) | def test_custom_functional_registered_no_scope(self): method test_nested_layers (line 457) | def test_nested_layers(self): class DirectoryCreationTest (line 555) | class DirectoryCreationTest(testing.TestCase): method test_directory_creation_on_save (line 556) | def test_directory_creation_on_save(self): FILE: keras/src/legacy/saving/saving_options.py function keras_option_scope (line 7) | def keras_option_scope(use_legacy_config=True): FILE: keras/src/legacy/saving/saving_utils.py function model_from_config (line 23) | def model_from_config(config, custom_objects=None): function model_metadata (line 91) | def model_metadata(model, include_optimizer=True, require_config=True): function compile_args_from_training_config (line 124) | def compile_args_from_training_config(training_config, custom_objects=No... function _serialize_nested_config (line 178) | def _serialize_nested_config(config): function _deserialize_nested_config (line 189) | def _deserialize_nested_config(deserialize_fn, config): function _deserialize_metric (line 219) | def _deserialize_metric(metric_config): function _resolve_compile_arguments_compat (line 229) | def _resolve_compile_arguments_compat(obj, obj_config, module): function try_build_compiled_arguments (line 242) | def try_build_compiled_arguments(model): FILE: keras/src/legacy/saving/serialization.py function _shared_object_disabled (line 36) | def _shared_object_disabled(): function _shared_object_loading_scope (line 41) | def _shared_object_loading_scope(): function _shared_object_saving_scope (line 46) | def _shared_object_saving_scope(): class DisableSharedObjectScope (line 51) | class DisableSharedObjectScope: method __enter__ (line 60) | def __enter__(self): method __exit__ (line 65) | def __exit__(self, *args, **kwargs): class NoopLoadingScope (line 71) | class NoopLoadingScope: method get (line 78) | def get(self, unused_object_id): method set (line 81) | def set(self, object_id, obj): class SharedObjectLoadingScope (line 85) | class SharedObjectLoadingScope: method __enter__ (line 94) | def __enter__(self): method get (line 103) | def get(self, object_id): method set (line 119) | def set(self, object_id, obj): method __exit__ (line 125) | def __exit__(self, *args, **kwargs): class SharedObjectConfig (line 130) | class SharedObjectConfig(dict): method __init__ (line 147) | def __init__(self, base_config, object_id, **kwargs): method increment_ref_count (line 152) | def increment_ref_count(self): class SharedObjectSavingScope (line 162) | class SharedObjectSavingScope: method __enter__ (line 165) | def __enter__(self): method get_config (line 187) | def get_config(self, obj): method create_config (line 208) | def create_config(self, base_config, obj): method __exit__ (line 222) | def __exit__(self, *args, **kwargs): function serialize_keras_class_and_config (line 228) | def serialize_keras_class_and_config( function skip_failed_serialization (line 254) | def skip_failed_serialization(): function serialize_keras_object (line 270) | def serialize_keras_object(instance): function class_and_config_for_serialized_keras_object (line 330) | def class_and_config_for_serialized_keras_object( function deserialize_keras_object (line 418) | def deserialize_keras_object( function validate_config (line 555) | def validate_config(config): function is_default (line 562) | def is_default(method): FILE: keras/src/losses/__init__.py function serialize (line 130) | def serialize(loss): function deserialize (line 143) | def deserialize(name, custom_objects=None): function get (line 163) | def get(identifier): FILE: keras/src/losses/loss.py class Loss (line 11) | class Loss(KerasSaveable): method __init__ (line 46) | def __init__(self, name=None, reduction="sum_over_batch_size", dtype=N... method dtype (line 53) | def dtype(self): method __call__ (line 56) | def __call__(self, y_true, y_pred, sample_weight=None): method call (line 87) | def call(self, y_true, y_pred): method get_config (line 90) | def get_config(self): method from_config (line 94) | def from_config(cls, config): method _obj_type (line 97) | def _obj_type(self): function standardize_reduction (line 101) | def standardize_reduction(reduction): function squeeze_or_expand_to_same_rank (line 119) | def squeeze_or_expand_to_same_rank(x1, x2, expand_rank_1=True): function reduce_values (line 140) | def reduce_values(values, sample_weight=None, reduction="sum_over_batch_... function reduce_weighted_values (line 164) | def reduce_weighted_values( function apply_mask (line 197) | def apply_mask(sample_weight, mask, dtype, reduction): function scale_loss_for_distribution (line 227) | def scale_loss_for_distribution(value): function unscale_loss_for_distribution (line 244) | def unscale_loss_for_distribution(value): FILE: keras/src/losses/loss_test.py class ExampleLoss (line 15) | class ExampleLoss(Loss): method call (line 16) | def call(self, y_true, y_pred): class LossTest (line 20) | class LossTest(testing.TestCase): method setUp (line 21) | def setUp(self): method tearDown (line 26) | def tearDown(self): method test_squeeze_or_expand (line 31) | def test_squeeze_or_expand(self): method test_reduction (line 56) | def test_reduction(self): method test_mask (line 86) | def test_mask(self): method test_sample_weight (line 113) | def test_sample_weight(self): method test_mask_and_sample_weight (line 135) | def test_mask_and_sample_weight(self): method test_mask_and_sample_weight_rank2 (line 163) | def test_mask_and_sample_weight_rank2(self): method test_rank_adjustment (line 194) | def test_rank_adjustment(self): method test_mixed_dtypes (line 229) | def test_mixed_dtypes(self): method test_pickle (line 242) | def test_pickle(self): method test_get_method (line 247) | def test_get_method(self): method test_dtype_arg (line 257) | def test_dtype_arg(self): method test_default_dtype (line 276) | def test_default_dtype(self): FILE: keras/src/losses/losses.py class LossFunctionWrapper (line 14) | class LossFunctionWrapper(Loss): method __init__ (line 15) | def __init__( method call (line 27) | def call(self, y_true, y_pred): method get_config (line 35) | def get_config(self): method from_config (line 42) | def from_config(cls, config): method __repr__ (line 47) | def __repr__(self): class MeanSquaredError (line 52) | class MeanSquaredError(LossFunctionWrapper): method __init__ (line 86) | def __init__( method get_config (line 96) | def get_config(self): class MeanAbsoluteError (line 101) | class MeanAbsoluteError(LossFunctionWrapper): method __init__ (line 135) | def __init__( method get_config (line 145) | def get_config(self): class MeanAbsolutePercentageError (line 150) | class MeanAbsolutePercentageError(LossFunctionWrapper): method __init__ (line 184) | def __init__( method get_config (line 197) | def get_config(self): class MeanSquaredLogarithmicError (line 202) | class MeanSquaredLogarithmicError(LossFunctionWrapper): method __init__ (line 228) | def __init__( method get_config (line 241) | def get_config(self): class CosineSimilarity (line 246) | class CosineSimilarity(LossFunctionWrapper): method __init__ (line 281) | def __init__( method get_config (line 296) | def get_config(self): class Huber (line 301) | class Huber(LossFunctionWrapper): method __init__ (line 336) | def __init__( method get_config (line 351) | def get_config(self): class LogCosh (line 356) | class LogCosh(LossFunctionWrapper): method __init__ (line 384) | def __init__( method get_config (line 392) | def get_config(self): class Hinge (line 397) | class Hinge(LossFunctionWrapper): method __init__ (line 426) | def __init__( method get_config (line 434) | def get_config(self): class SquaredHinge (line 439) | class SquaredHinge(LossFunctionWrapper): method __init__ (line 468) | def __init__( method get_config (line 475) | def get_config(self): class CategoricalHinge (line 480) | class CategoricalHinge(LossFunctionWrapper): method __init__ (line 508) | def __init__( method get_config (line 518) | def get_config(self): class KLDivergence (line 523) | class KLDivergence(LossFunctionWrapper): method __init__ (line 553) | def __init__( method get_config (line 560) | def get_config(self): class Poisson (line 565) | class Poisson(LossFunctionWrapper): method __init__ (line 591) | def __init__( method get_config (line 596) | def get_config(self): class BinaryCrossentropy (line 601) | class BinaryCrossentropy(LossFunctionWrapper): method __init__ (line 692) | def __init__( method get_config (line 714) | def get_config(self): class BinaryFocalCrossentropy (line 727) | class BinaryFocalCrossentropy(LossFunctionWrapper): method __init__ (line 868) | def __init__( method get_config (line 899) | def get_config(self): class CategoricalCrossentropy (line 915) | class CategoricalCrossentropy(LossFunctionWrapper): method __init__ (line 984) | def __init__( method get_config (line 1006) | def get_config(self): class CategoricalFocalCrossentropy (line 1019) | class CategoricalFocalCrossentropy(LossFunctionWrapper): method __init__ (line 1129) | def __init__( method get_config (line 1158) | def get_config(self): class SparseCategoricalCrossentropy (line 1173) | class SparseCategoricalCrossentropy(LossFunctionWrapper): method __init__ (line 1241) | def __init__( method get_config (line 1262) | def get_config(self): class CTC (line 1274) | class CTC(LossFunctionWrapper): method __init__ (line 1294) | def __init__(self, reduction="sum_over_batch_size", name="ctc", dtype=... method get_config (line 1297) | def get_config(self): class Dice (line 1302) | class Dice(LossFunctionWrapper): method __init__ (line 1357) | def __init__( method get_config (line 1369) | def get_config(self): class Tversky (line 1376) | class Tversky(LossFunctionWrapper): method __init__ (line 1413) | def __init__( method get_config (line 1435) | def get_config(self): class Circle (line 1444) | class Circle(LossFunctionWrapper): method __init__ (line 1501) | def __init__( method get_config (line 1523) | def get_config(self): class CategoricalGeneralizedCrossEntropy (line 1536) | class CategoricalGeneralizedCrossEntropy(LossFunctionWrapper): method __init__ (line 1587) | def __init__( method get_config (line 1605) | def get_config(self): function convert_binary_labels_to_hinge (line 1615) | def convert_binary_labels_to_hinge(y_true): function hinge (line 1641) | def hinge(y_true, y_pred): function squared_hinge (line 1678) | def squared_hinge(y_true, y_pred): function categorical_hinge (line 1716) | def categorical_hinge(y_true, y_pred): function mean_squared_error (line 1762) | def mean_squared_error(y_true, y_pred): function mean_absolute_error (line 1801) | def mean_absolute_error(y_true, y_pred): function mean_absolute_percentage_error (line 1838) | def mean_absolute_percentage_error(y_true, y_pred): function mean_squared_logarithmic_error (line 1884) | def mean_squared_logarithmic_error(y_true, y_pred): function cosine_similarity (line 1921) | def cosine_similarity(y_true, y_pred, axis=-1): function huber (line 1961) | def huber(y_true, y_pred, delta=1.0): function log_cosh (line 2019) | def log_cosh(y_true, y_pred): function kl_divergence (line 2070) | def kl_divergence(y_true, y_pred): function poisson (line 2114) | def poisson(y_true, y_pred): function categorical_crossentropy (line 2153) | def categorical_crossentropy( function categorical_focal_crossentropy (line 2216) | def categorical_focal_crossentropy( function sparse_categorical_crossentropy (line 2312) | def sparse_categorical_crossentropy( function binary_crossentropy (line 2376) | def binary_crossentropy( function binary_focal_crossentropy (line 2422) | def binary_focal_crossentropy( function ctc (line 2522) | def ctc(y_true, y_pred): function dice (line 2560) | def dice(y_true, y_pred, axis=None): function tversky (line 2612) | def tversky(y_true, y_pred, alpha=0.5, beta=0.5, axis=None): function circle (line 2654) | def circle( function categorical_generalized_cross_entropy (line 2742) | def categorical_generalized_cross_entropy(y_true, y_pred, q): FILE: keras/src/losses/losses_test.py class MeanSquaredErrorTest (line 11) | class MeanSquaredErrorTest(testing.TestCase): method test_config (line 12) | def test_config(self): method test_base_function_reduction (line 15) | def test_base_function_reduction(self): method test_all_correct_unweighted (line 22) | def test_all_correct_unweighted(self): method test_unweighted (line 28) | def test_unweighted(self): method test_scalar_weighted (line 35) | def test_scalar_weighted(self): method test_sample_weighted (line 42) | def test_sample_weighted(self): method test_timestep_weighted (line 50) | def test_timestep_weighted(self): method test_zero_weighted (line 62) | def test_zero_weighted(self): method test_no_reduction (line 69) | def test_no_reduction(self): method test_sum_reduction (line 76) | def test_sum_reduction(self): method test_mean_with_sample_weight_reduction (line 83) | def test_mean_with_sample_weight_reduction(self): method test_dtype_arg (line 93) | def test_dtype_arg(self): class MeanAbsoluteErrorTest (line 101) | class MeanAbsoluteErrorTest(testing.TestCase): method test_config (line 102) | def test_config(self): method test_all_correct_unweighted (line 107) | def test_all_correct_unweighted(self): method test_unweighted (line 113) | def test_unweighted(self): method test_scalar_weighted (line 120) | def test_scalar_weighted(self): method test_sample_weighted (line 127) | def test_sample_weighted(self): method test_timestep_weighted (line 135) | def test_timestep_weighted(self): method test_zero_weighted (line 147) | def test_zero_weighted(self): method test_no_reduction (line 154) | def test_no_reduction(self): method test_sum_reduction (line 161) | def test_sum_reduction(self): method test_mean_with_sample_weight_reduction (line 168) | def test_mean_with_sample_weight_reduction(self): method test_dtype_arg (line 178) | def test_dtype_arg(self): class MeanAbsolutePercentageErrorTest (line 186) | class MeanAbsolutePercentageErrorTest(testing.TestCase): method test_config (line 187) | def test_config(self): method test_all_correct_unweighted (line 192) | def test_all_correct_unweighted(self): method test_unweighted (line 198) | def test_unweighted(self): method test_scalar_weighted (line 205) | def test_scalar_weighted(self): method test_sample_weighted (line 212) | def test_sample_weighted(self): method test_timestep_weighted (line 220) | def test_timestep_weighted(self): method test_zero_weighted (line 232) | def test_zero_weighted(self): method test_no_reduction (line 239) | def test_no_reduction(self): method test_mean_with_sample_weight_reduction (line 246) | def test_mean_with_sample_weight_reduction(self): method test_dtype_arg (line 256) | def test_dtype_arg(self): class MeanSquaredLogarithmicErrorTest (line 264) | class MeanSquaredLogarithmicErrorTest(testing.TestCase): method test_config (line 265) | def test_config(self): method test_unweighted (line 270) | def test_unweighted(self): method test_scalar_weighted (line 277) | def test_scalar_weighted(self): method test_sample_weighted (line 284) | def test_sample_weighted(self): method test_timestep_weighted (line 292) | def test_timestep_weighted(self): method test_zero_weighted (line 304) | def test_zero_weighted(self): method test_mean_with_sample_weight_reduction (line 311) | def test_mean_with_sample_weight_reduction(self): method test_dtype_arg (line 321) | def test_dtype_arg(self): class HingeTest (line 329) | class HingeTest(testing.TestCase): method test_unweighted (line 330) | def test_unweighted(self): method test_weighted (line 353) | def test_weighted(self): method test_zero_weighted (line 373) | def test_zero_weighted(self): method test_dtype_arg (line 382) | def test_dtype_arg(self): class SquaredHingeTest (line 390) | class SquaredHingeTest(testing.TestCase): method test_unweighted (line 391) | def test_unweighted(self): method test_weighted (line 414) | def test_weighted(self): method test_zero_weighted (line 434) | def test_zero_weighted(self): method test_dtype_arg (line 443) | def test_dtype_arg(self): class CategoricalHingeTest (line 451) | class CategoricalHingeTest(testing.TestCase): method test_unweighted (line 452) | def test_unweighted(self): method test_weighted (line 475) | def test_weighted(self): method test_zero_weighted (line 495) | def test_zero_weighted(self): method test_dtype_arg (line 504) | def test_dtype_arg(self): class CosineSimilarityTest (line 512) | class CosineSimilarityTest(testing.TestCase): method l2_norm (line 513) | def l2_norm(self, x, axis): method setup (line 519) | def setup(self, axis=1): method test_config (line 530) | def test_config(self): method test_unweighted (line 539) | def test_unweighted(self): method test_scalar_weighted (line 546) | def test_scalar_weighted(self): method test_sample_weighted (line 554) | def test_sample_weighted(self): method test_timestep_weighted (line 562) | def test_timestep_weighted(self): method test_zero_weighted (line 580) | def test_zero_weighted(self): method test_axis (line 586) | def test_axis(self): method test_dtype_arg (line 593) | def test_dtype_arg(self): class HuberLossTest (line 600) | class HuberLossTest(testing.TestCase): method huber_loss (line 601) | def huber_loss(self, y_true, y_pred, delta=1.0): method setup (line 612) | def setup(self, delta=1.0): method test_config (line 624) | def test_config(self): method test_all_correct (line 631) | def test_all_correct(self): method test_unweighted (line 637) | def test_unweighted(self): method test_scalar_weighted (line 644) | def test_scalar_weighted(self): method test_sample_weighted (line 658) | def test_sample_weighted(self): method test_timestep_weighted (line 671) | def test_timestep_weighted(self): method test_zero_weighted (line 688) | def test_zero_weighted(self): method test_non_default_delta (line 695) | def test_non_default_delta(self): method test_dtype_arg (line 705) | def test_dtype_arg(self): class LogCoshTest (line 712) | class LogCoshTest(testing.TestCase): method setup (line 713) | def setup(self): method test_config (line 724) | def test_config(self): method test_unweighted (line 731) | def test_unweighted(self): method test_scalar_weighted (line 739) | def test_scalar_weighted(self): method test_sample_weighted (line 758) | def test_sample_weighted(self): method test_timestep_weighted (line 774) | def test_timestep_weighted(self): method test_zero_weighted (line 793) | def test_zero_weighted(self): method test_dtype_arg (line 802) | def test_dtype_arg(self): class KLDivergenceTest (line 809) | class KLDivergenceTest(testing.TestCase): method setup (line 810) | def setup(self): method test_config (line 823) | def test_config(self): method test_unweighted (line 828) | def test_unweighted(self): method test_scalar_weighted (line 836) | def test_scalar_weighted(self): method test_sample_weighted (line 851) | def test_sample_weighted(self): method test_timestep_weighted (line 866) | def test_timestep_weighted(self): method test_zero_weighted (line 883) | def test_zero_weighted(self): method test_dtype_arg (line 889) | def test_dtype_arg(self): class PoissonTest (line 896) | class PoissonTest(testing.TestCase): method setup (line 897) | def setup(self): method test_config (line 910) | def test_config(self): method test_unweighted (line 915) | def test_unweighted(self): method test_scalar_weighted (line 923) | def test_scalar_weighted(self): method test_sample_weighted (line 942) | def test_sample_weighted(self): method test_timestep_weighted (line 958) | def test_timestep_weighted(self): method test_zero_weighted (line 976) | def test_zero_weighted(self): method test_dtype_arg (line 982) | def test_dtype_arg(self): class BinaryCrossentropyTest (line 989) | class BinaryCrossentropyTest(testing.TestCase): method test_config (line 990) | def test_config(self): method test_all_correct_unweighted (line 995) | def test_all_correct_unweighted(self): method test_unweighted (line 1013) | def test_unweighted(self): method test_scalar_weighted (line 1035) | def test_scalar_weighted(self): method test_sample_weighted (line 1049) | def test_sample_weighted(self): method test_no_reduction (line 1065) | def test_no_reduction(self): method test_label_smoothing (line 1072) | def test_label_smoothing(self): method test_shape_mismatch (line 1083) | def test_shape_mismatch(self): method test_dtype_arg (line 1096) | def test_dtype_arg(self): class CategoricalCrossentropyTest (line 1106) | class CategoricalCrossentropyTest(testing.TestCase): method test_config (line 1107) | def test_config(self): method test_all_correct_unweighted (line 1112) | def test_all_correct_unweighted(self): method test_unweighted (line 1130) | def test_unweighted(self): method test_scalar_weighted (line 1146) | def test_scalar_weighted(self): method test_sample_weighted (line 1162) | def test_sample_weighted(self): method test_no_reduction (line 1179) | def test_no_reduction(self): method test_label_smoothing (line 1188) | def test_label_smoothing(self): method test_label_smoothing_ndarray (line 1199) | def test_label_smoothing_ndarray(self): method test_shape_mismatch (line 1210) | def test_shape_mismatch(self): method test_dtype_arg (line 1220) | def test_dtype_arg(self): class SparseCategoricalCrossentropyTest (line 1231) | class SparseCategoricalCrossentropyTest(testing.TestCase): method test_config (line 1232) | def test_config(self): method test_all_correct_unweighted (line 1237) | def test_all_correct_unweighted(self): method test_unweighted (line 1255) | def test_unweighted(self): method test_scalar_weighted (line 1271) | def test_scalar_weighted(self): method test_sample_weighted (line 1287) | def test_sample_weighted(self): method test_no_reduction (line 1304) | def test_no_reduction(self): method test_ignore_class (line 1313) | def test_ignore_class(self): method test_binary_segmentation (line 1330) | def test_binary_segmentation(self): method test_binary_segmentation_different_axis (line 1360) | def test_binary_segmentation_different_axis(self): method test_multi_class_segmentation (line 1430) | def test_multi_class_segmentation(self): method test_multi_class_segmentation_different_axis (line 1506) | def test_multi_class_segmentation_different_axis(self): method test_dtype_arg (line 1621) | def test_dtype_arg(self): class BinaryFocalCrossentropyTest (line 1632) | class BinaryFocalCrossentropyTest(testing.TestCase): method test_config (line 1633) | def test_config(self): method test_all_correct_unweighted (line 1638) | def test_all_correct_unweighted(self): method test_unweighted (line 1663) | def test_unweighted(self): method test_scalar_weighted (line 1679) | def test_scalar_weighted(self): method test_sample_weighted (line 1695) | def test_sample_weighted(self): method test_no_reduction (line 1712) | def test_no_reduction(self): method test_dtype_arg (line 1728) | def test_dtype_arg(self): class CategoricalFocalCrossentropyTest (line 1738) | class CategoricalFocalCrossentropyTest(testing.TestCase): method test_config (line 1739) | def test_config(self): method test_all_correct_unweighted (line 1744) | def test_all_correct_unweighted(self): method test_unweighted (line 1762) | def test_unweighted(self): method test_scalar_weighted (line 1778) | def test_scalar_weighted(self): method test_sample_weighted (line 1794) | def test_sample_weighted(self): method test_no_reduction (line 1811) | def test_no_reduction(self): method test_label_smoothing (line 1823) | def test_label_smoothing(self): method test_dtype_arg (line 1836) | def test_dtype_arg(self): class CTCTest (line 1846) | class CTCTest(testing.TestCase): method test_config (line 1847) | def test_config(self): method test_correctness (line 1850) | def test_correctness(self): method test_dtype_arg (line 1856) | def test_dtype_arg(self): class DiceTest (line 1863) | class DiceTest(testing.TestCase): method test_config (line 1864) | def test_config(self): method test_correctness (line 1867) | def test_correctness(self): method test_binary_segmentation (line 1873) | def test_binary_segmentation(self): method test_binary_segmentation_with_axis (line 1883) | def test_binary_segmentation_with_axis(self): method test_dtype_arg (line 1893) | def test_dtype_arg(self): class TverskyTest (line 1900) | class TverskyTest(testing.TestCase): method test_config (line 1901) | def test_config(self): method test_correctness (line 1904) | def test_correctness(self): method test_correctness_custom_coefficients (line 1910) | def test_correctness_custom_coefficients(self): method test_binary_segmentation (line 1916) | def test_binary_segmentation(self): method test_binary_segmentation_with_axis (line 1926) | def test_binary_segmentation_with_axis(self): method test_binary_segmentation_custom_coefficients (line 1936) | def test_binary_segmentation_custom_coefficients(self): method test_binary_segmentation_custom_coefficients_with_axis (line 1946) | def test_binary_segmentation_custom_coefficients_with_axis(self): method test_dtype_arg (line 1958) | def test_dtype_arg(self): class CircleTest (line 1965) | class CircleTest(testing.TestCase): method setup (line 1966) | def setup(self): method test_config (line 1990) | def test_config(self): method test_correctness (line 1995) | def test_correctness(self): method test_correctness_weighted (line 2022) | def test_correctness_weighted(self): method test_no_reduction (line 2031) | def test_no_reduction(self): method test_sum_reduction (line 2043) | def test_sum_reduction(self): method test_mean_with_sample_weight_reduction (line 2050) | def test_mean_with_sample_weight_reduction(self): method test_dtype_arg (line 2061) | def test_dtype_arg(self): class CategoricalGeneralizedCrossEntropyTest (line 2068) | class CategoricalGeneralizedCrossEntropyTest(testing.TestCase): method test_config (line 2069) | def test_config(self): method test_basic_correctness_for_binary (line 2077) | def test_basic_correctness_for_binary(self): method test_basic_correctness_for_multi_class (line 2110) | def test_basic_correctness_for_multi_class(self): method test_binary_segmentation (line 2145) | def test_binary_segmentation(self): method test_multi_class_segmentation (line 2184) | def test_multi_class_segmentation(self): method test_dtype_arg (line 2264) | def test_dtype_arg(self): FILE: keras/src/metrics/__init__.py function serialize (line 135) | def serialize(metric): function deserialize (line 148) | def deserialize(config, custom_objects=None): function get (line 168) | def get(identifier): FILE: keras/src/metrics/accuracy_metrics.py function accuracy (line 8) | def accuracy(y_true, y_pred): class Accuracy (line 16) | class Accuracy(reduction_metrics.MeanMetricWrapper): method __init__ (line 53) | def __init__(self, name="accuracy", dtype=None): method get_config (line 58) | def get_config(self): function binary_accuracy (line 63) | def binary_accuracy(y_true, y_pred, threshold=0.5): class BinaryAccuracy (line 73) | class BinaryAccuracy(reduction_metrics.MeanMetricWrapper): method __init__ (line 112) | def __init__(self, name="binary_accuracy", dtype=None, threshold=0.5): method get_config (line 120) | def get_config(self): function categorical_accuracy (line 129) | def categorical_accuracy(y_true, y_pred): class CategoricalAccuracy (line 161) | class CategoricalAccuracy(reduction_metrics.MeanMetricWrapper): method __init__ (line 207) | def __init__(self, name="categorical_accuracy", dtype=None): method get_config (line 212) | def get_config(self): function sparse_categorical_accuracy (line 217) | def sparse_categorical_accuracy(y_true, y_pred): class SparseCategoricalAccuracy (line 250) | class SparseCategoricalAccuracy(reduction_metrics.MeanMetricWrapper): method __init__ (line 294) | def __init__(self, name="sparse_categorical_accuracy", dtype=None): method get_config (line 299) | def get_config(self): function top_k_categorical_accuracy (line 304) | def top_k_categorical_accuracy(y_true, y_pred, k=5): class TopKCategoricalAccuracy (line 334) | class TopKCategoricalAccuracy(reduction_metrics.MeanMetricWrapper): method __init__ (line 367) | def __init__(self, k=5, name="top_k_categorical_accuracy", dtype=None): method get_config (line 378) | def get_config(self): function sparse_top_k_categorical_accuracy (line 383) | def sparse_top_k_categorical_accuracy( class SparseTopKCategoricalAccuracy (line 440) | class SparseTopKCategoricalAccuracy(reduction_metrics.MeanMetricWrapper): method __init__ (line 499) | def __init__( method get_config (line 518) | def get_config(self): FILE: keras/src/metrics/accuracy_metrics_test.py class AccuracyTest (line 7) | class AccuracyTest(testing.TestCase): method test_config (line 8) | def test_config(self): method test_unweighted (line 25) | def test_unweighted(self): method test_weighted (line 33) | def test_weighted(self): method test_weighted_rank_1 (line 42) | def test_weighted_rank_1(self): method test_weighted_nd_weights (line 51) | def test_weighted_nd_weights(self): method test_weighted_nd_broadcast_weights (line 60) | def test_weighted_nd_broadcast_weights(self): class BinaryAccuracyTest (line 70) | class BinaryAccuracyTest(testing.TestCase): method test_config (line 71) | def test_config(self): method test_unweighted (line 92) | def test_unweighted(self): method test_weighted (line 112) | def test_weighted(self): method test_weighted_rank_1 (line 123) | def test_weighted_rank_1(self): method test_weighted_nd_weights (line 134) | def test_weighted_nd_weights(self): method test_weighted_nd_broadcast_weights (line 145) | def test_weighted_nd_broadcast_weights(self): method test_threshold (line 156) | def test_threshold(self): class CategoricalAccuracyTest (line 176) | class CategoricalAccuracyTest(testing.TestCase): method test_config (line 177) | def test_config(self): method test_unweighted (line 198) | def test_unweighted(self): method test_weighted (line 208) | def test_weighted(self): class SparseCategoricalAccuracyTest (line 220) | class SparseCategoricalAccuracyTest(testing.TestCase): method test_config (line 221) | def test_config(self): method test_unweighted (line 246) | def test_unweighted(self): method test_weighted (line 256) | def test_weighted(self): method test_squeeze_y_true (line 267) | def test_squeeze_y_true(self): method test_cast_y_pred_dtype (line 281) | def test_cast_y_pred_dtype(self): method test_reshape_matches (line 293) | def test_reshape_matches(self): method test_squeeze_y_true_shape (line 307) | def test_squeeze_y_true_shape(self): method test_cast_y_pred_to_match_y_true_dtype (line 318) | def test_cast_y_pred_to_match_y_true_dtype(self): method test_reshape_matches_to_original_y_true_shape (line 332) | def test_reshape_matches_to_original_y_true_shape(self): method test_matching_shapes_without_squeeze (line 344) | def test_matching_shapes_without_squeeze(self): class TopKCategoricalAccuracyTest (line 359) | class TopKCategoricalAccuracyTest(testing.TestCase): method test_config (line 360) | def test_config(self): method test_unweighted (line 387) | def test_unweighted(self): method test_weighted (line 397) | def test_weighted(self): class SparseTopKCategoricalAccuracyTest (line 411) | class SparseTopKCategoricalAccuracyTest(testing.TestCase): method test_config (line 412) | def test_config(self): method test_config_from_sorted_ids (line 445) | def test_config_from_sorted_ids(self): method test_unweighted (line 465) | def test_unweighted(self): method test_weighted (line 475) | def test_weighted(self): method test_from_sorted_ids_unweighted (line 488) | def test_from_sorted_ids_unweighted(self): method test_from_sorted_ids_weighted (line 501) | def test_from_sorted_ids_weighted(self): FILE: keras/src/metrics/confusion_metrics.py class _ConfusionMatrixConditionCount (line 13) | class _ConfusionMatrixConditionCount(Metric): method __init__ (line 28) | def __init__( method update_state (line 46) | def update_state(self, y_true, y_pred, sample_weight=None): method result (line 65) | def result(self): method get_config (line 72) | def get_config(self): class FalsePositives (line 79) | class FalsePositives(_ConfusionMatrixConditionCount): method __init__ (line 113) | def __init__(self, thresholds=None, name=None, dtype=None): class FalseNegatives (line 123) | class FalseNegatives(_ConfusionMatrixConditionCount): method __init__ (line 157) | def __init__(self, thresholds=None, name=None, dtype=None): class TrueNegatives (line 167) | class TrueNegatives(_ConfusionMatrixConditionCount): method __init__ (line 201) | def __init__(self, thresholds=None, name=None, dtype=None): class TruePositives (line 211) | class TruePositives(_ConfusionMatrixConditionCount): method __init__ (line 245) | def __init__(self, thresholds=None, name=None, dtype=None): class Precision (line 255) | class Precision(Metric): method __init__ (line 337) | def __init__( method update_state (line 366) | def update_state(self, y_true, y_pred, sample_weight=None): method result (line 392) | def result(self): method reset_state (line 399) | def reset_state(self): method get_config (line 404) | def get_config(self): class Recall (line 415) | class Recall(Metric): method __init__ (line 481) | def __init__( method update_state (line 510) | def update_state(self, y_true, y_pred, sample_weight=None): method result (line 536) | def result(self): method reset_state (line 543) | def reset_state(self): method get_config (line 548) | def get_config(self): class SensitivitySpecificityBase (line 558) | class SensitivitySpecificityBase(Metric): method __init__ (line 565) | def __init__( method update_state (line 613) | def update_state(self, y_true, y_pred, sample_weight=None): method reset_state (line 638) | def reset_state(self): method get_config (line 645) | def get_config(self): method _find_max_under_constraint (line 650) | def _find_max_under_constraint(self, constrained, dependent, predicate): class SensitivityAtSpecificity (line 676) | class SensitivityAtSpecificity(SensitivitySpecificityBase): method __init__ (line 734) | def __init__( method result (line 757) | def result(self): method get_config (line 770) | def get_config(self): class SpecificityAtSensitivity (line 780) | class SpecificityAtSensitivity(SensitivitySpecificityBase): method __init__ (line 838) | def __init__( method result (line 861) | def result(self): method get_config (line 874) | def get_config(self): class PrecisionAtRecall (line 884) | class PrecisionAtRecall(SensitivitySpecificityBase): method __init__ (line 933) | def __init__( method result (line 951) | def result(self): method get_config (line 964) | def get_config(self): class RecallAtPrecision (line 971) | class RecallAtPrecision(SensitivitySpecificityBase): method __init__ (line 1023) | def __init__( method result (line 1046) | def result(self): method get_config (line 1059) | def get_config(self): class AUC (line 1069) | class AUC(Metric): method __init__ (line 1189) | def __init__( method thresholds (line 1292) | def thresholds(self): method _build (line 1296) | def _build(self, shape): method update_state (line 1336) | def update_state(self, y_true, y_pred, sample_weight=None): method interpolate_pr_auc (line 1374) | def interpolate_pr_auc(self): method result (line 1464) | def result(self): method reset_state (line 1567) | def reset_state(self): method get_config (line 1579) | def get_config(self): FILE: keras/src/metrics/confusion_metrics_test.py class FalsePositivesTest (line 16) | class FalsePositivesTest(testing.TestCase): method test_config (line 17) | def test_config(self): method test_unweighted (line 29) | def test_unweighted(self): method test_weighted (line 42) | def test_weighted(self): method test_unweighted_with_thresholds (line 54) | def test_unweighted_with_thresholds(self): method test_weighted_with_thresholds (line 72) | def test_weighted_with_thresholds(self): method test_threshold_limit (line 96) | def test_threshold_limit(self): class FalseNegativesTest (line 110) | class FalseNegativesTest(testing.TestCase): method test_config (line 111) | def test_config(self): method test_unweighted (line 123) | def test_unweighted(self): method test_weighted (line 136) | def test_weighted(self): method test_unweighted_with_thresholds (line 148) | def test_unweighted_with_thresholds(self): method test_weighted_with_thresholds (line 166) | def test_weighted_with_thresholds(self): method test_threshold_limit (line 185) | def test_threshold_limit(self): class TrueNegativesTest (line 199) | class TrueNegativesTest(testing.TestCase): method test_config (line 200) | def test_config(self): method test_unweighted (line 212) | def test_unweighted(self): method test_weighted (line 225) | def test_weighted(self): method test_unweighted_with_thresholds (line 237) | def test_unweighted_with_thresholds(self): method test_weighted_with_thresholds (line 255) | def test_weighted_with_thresholds(self): method test_threshold_limit (line 274) | def test_threshold_limit(self): class TruePositiveTest (line 288) | class TruePositiveTest(testing.TestCase): method test_config (line 289) | def test_config(self): method test_unweighted (line 301) | def test_unweighted(self): method test_weighted (line 314) | def test_weighted(self): method test_unweighted_with_thresholds (line 326) | def test_unweighted_with_thresholds(self): method test_weighted_with_thresholds (line 344) | def test_weighted_with_thresholds(self): method test_threshold_limit (line 363) | def test_threshold_limit(self): class PrecisionTest (line 377) | class PrecisionTest(testing.TestCase): method test_config (line 378) | def test_config(self): method test_unweighted (line 400) | def test_unweighted(self): method test_unweighted_all_incorrect (line 407) | def test_unweighted_all_incorrect(self): method test_weighted (line 415) | def test_weighted(self): method test_div_by_zero (line 429) | def test_div_by_zero(self): method test_unweighted_with_threshold (line 436) | def test_unweighted_with_threshold(self): method test_weighted_with_threshold (line 443) | def test_weighted_with_threshold(self): method test_multiple_updates (line 454) | def test_multiple_updates(self): method test_unweighted_top_k (line 469) | def test_unweighted_top_k(self): method test_weighted_top_k (line 476) | def test_weighted_top_k(self): method test_unweighted_class_id_should_throw_error_1d (line 491) | def test_unweighted_class_id_should_throw_error_1d(self): method test_unweighted_class_id_multiclass (line 504) | def test_unweighted_class_id_multiclass(self): method test_unweighted_top_k_and_threshold (line 532) | def test_unweighted_top_k_and_threshold(self): class RecallTest (line 543) | class RecallTest(testing.TestCase): method test_config (line 544) | def test_config(self): method test_unweighted (line 566) | def test_unweighted(self): method test_unweighted_all_incorrect (line 572) | def test_unweighted_all_incorrect(self): method test_weighted (line 579) | def test_weighted(self): method test_div_by_zero (line 593) | def test_div_by_zero(self): method test_unweighted_with_threshold (line 599) | def test_unweighted_with_threshold(self): method test_weighted_with_threshold (line 605) | def test_weighted_with_threshold(self): method test_multiple_updates (line 616) | def test_multiple_updates(self): method test_unweighted_top_k (line 631) | def test_unweighted_top_k(self): method test_weighted_top_k (line 637) | def test_weighted_top_k(self): method test_unweighted_class_id_should_throw_error_1d (line 652) | def test_unweighted_class_id_should_throw_error_1d(self): method test_unweighted_class_id_multiclass (line 665) | def test_unweighted_class_id_multiclass(self): method test_unweighted_top_k_and_threshold (line 693) | def test_unweighted_top_k_and_threshold(self): class SensitivityAtSpecificityTest (line 703) | class SensitivityAtSpecificityTest(testing.TestCase): method test_config (line 704) | def test_config(self): method test_unweighted_all_correct (line 727) | def test_unweighted_all_correct(self): method test_unweighted_high_specificity (line 734) | def test_unweighted_high_specificity(self): method test_unweighted_low_specificity (line 744) | def test_unweighted_low_specificity(self): method test_unweighted_class_id (line 754) | def test_unweighted_class_id(self): method test_weighted (line 765) | def test_weighted(self, label_dtype): method test_invalid_specificity (line 778) | def test_invalid_specificity(self): method test_invalid_num_thresholds (line 784) | def test_invalid_num_thresholds(self): method test_handles_sas_metrics (line 791) | def test_handles_sas_metrics(self): class SpecificityAtSensitivityTest (line 805) | class SpecificityAtSensitivityTest(testing.TestCase): method test_config (line 806) | def test_config(self): method test_unweighted_all_correct (line 829) | def test_unweighted_all_correct(self): method test_unweighted_high_sensitivity (line 837) | def test_unweighted_high_sensitivity(self): method test_unweighted_low_sensitivity (line 847) | def test_unweighted_low_sensitivity(self): method test_unweighted_class_id (line 857) | def test_unweighted_class_id(self): method test_weighted (line 868) | def test_weighted(self, label_dtype): method test_invalid_sensitivity (line 881) | def test_invalid_sensitivity(self): method test_invalid_num_thresholds (line 887) | def test_invalid_num_thresholds(self): class PrecisionAtRecallTest (line 894) | class PrecisionAtRecallTest(testing.TestCase): method test_config (line 895) | def test_config(self): method test_unweighted_all_correct (line 913) | def test_unweighted_all_correct(self): method test_unweighted_high_recall (line 921) | def test_unweighted_high_recall(self): method test_unweighted_low_recall (line 932) | def test_unweighted_low_recall(self): method test_unweighted_class_id (line 943) | def test_unweighted_class_id(self): method test_weighted (line 955) | def test_weighted(self, label_dtype): method test_invalid_sensitivity (line 969) | def test_invalid_sensitivity(self): method test_invalid_num_thresholds (line 975) | def test_invalid_num_thresholds(self): class RecallAtPrecisionTest (line 982) | class RecallAtPrecisionTest(testing.TestCase): method test_config (line 983) | def test_config(self): method test_unweighted_all_correct (line 1001) | def test_unweighted_all_correct(self): method test_unweighted_high_precision (line 1009) | def test_unweighted_high_precision(self): method test_unweighted_low_precision (line 1036) | def test_unweighted_low_precision(self): method test_unweighted_class_id (line 1063) | def test_unweighted_class_id(self): method test_weighted (line 1091) | def test_weighted(self, label_dtype): method test_unachievable_precision (line 1103) | def test_unachievable_precision(self): method test_invalid_sensitivity (line 1114) | def test_invalid_sensitivity(self): method test_invalid_num_thresholds (line 1120) | def test_invalid_num_thresholds(self): method test_end_to_end (line 1127) | def test_end_to_end(self): class AUCTest (line 1141) | class AUCTest(testing.TestCase): method setUp (line 1142) | def setUp(self): method test_config (line 1175) | def test_config(self): method test_config_manual_thresholds (line 1220) | def test_config_manual_thresholds(self): method test_unweighted_all_correct (line 1254) | def test_unweighted_all_correct(self): method test_unweighted (line 1258) | def test_unweighted(self): method test_unweighted_from_logits (line 1270) | def test_unweighted_from_logits(self): method test_manual_thresholds (line 1284) | def test_manual_thresholds(self): method test_weighted_roc_interpolation (line 1300) | def test_weighted_roc_interpolation(self): method test_weighted_roc_majoring (line 1314) | def test_weighted_roc_majoring(self): method test_weighted_roc_minoring (line 1330) | def test_weighted_roc_minoring(self): method test_weighted_pr_majoring (line 1346) | def test_weighted_pr_majoring(self): method test_weighted_pr_minoring (line 1364) | def test_weighted_pr_minoring(self): method test_weighted_pr_interpolation (line 1382) | def test_weighted_pr_interpolation(self): method test_weighted_pr_interpolation_negative_weights (line 1403) | def test_weighted_pr_interpolation_negative_weights(self): method test_weighted_prgain_majoring (line 1413) | def test_weighted_prgain_majoring(self): method test_weighted_prgain_minoring (line 1432) | def test_weighted_prgain_minoring(self): method test_weighted_prgain_interpolation (line 1451) | def test_weighted_prgain_interpolation(self): method test_prgain_interpolation (line 1468) | def test_prgain_interpolation(self): method test_invalid_num_thresholds (line 1486) | def test_invalid_num_thresholds(self): method test_invalid_curve (line 1497) | def test_invalid_curve(self): method test_invalid_summation_method (line 1503) | def test_invalid_summation_method(self): method test_extra_dims (line 1509) | def test_extra_dims(self): class MultiAUCTest (line 1532) | class MultiAUCTest(testing.TestCase): method setUp (line 1533) | def setUp(self): method test_unweighted_all_correct (line 1581) | def test_unweighted_all_correct(self): method test_unweighted_all_correct_flat (line 1586) | def test_unweighted_all_correct_flat(self): method test_unweighted (line 1591) | def test_unweighted(self): method test_unweighted_from_logits (line 1602) | def test_unweighted_from_logits(self): method test_sample_weight_flat (line 1615) | def test_sample_weight_flat(self): method test_full_sample_weight_flat (line 1628) | def test_full_sample_weight_flat(self): method test_label_weights (line 1641) | def test_label_weights(self): method test_label_weights_flat (line 1654) | def test_label_weights_flat(self): method test_unweighted_flat (line 1667) | def test_unweighted_flat(self): method test_unweighted_flat_from_logits (line 1683) | def test_unweighted_flat_from_logits(self): method test_manual_thresholds (line 1701) | def test_manual_thresholds(self): method test_weighted_roc_interpolation (line 1724) | def test_weighted_roc_interpolation(self): method test_pr_interpolation_unweighted (line 1737) | def test_pr_interpolation_unweighted(self): method test_pr_interpolation (line 1750) | def test_pr_interpolation(self): method test_keras_model_compiles (line 1761) | def test_keras_model_compiles(self): method test_reset_state (line 1771) | def test_reset_state(self): FILE: keras/src/metrics/correlation_metrics.py function pearson_correlation (line 9) | def pearson_correlation(y_true, y_pred, axis=-1): function concordance_correlation (line 49) | def concordance_correlation(y_true, y_pred, axis=-1): class PearsonCorrelation (line 96) | class PearsonCorrelation(reduction_metrics.MeanMetricWrapper): method __init__ (line 132) | def __init__( method get_config (line 148) | def get_config(self): class ConcordanceCorrelation (line 157) | class ConcordanceCorrelation(reduction_metrics.MeanMetricWrapper): method __init__ (line 194) | def __init__( method get_config (line 210) | def get_config(self): FILE: keras/src/metrics/correlation_metrics_test.py class CorrelationsTest (line 10) | class CorrelationsTest(testing.TestCase): method _get_data (line 11) | def _get_data(self): method test_pearson_function (line 31) | def test_pearson_function(self): method test_concordance_function (line 39) | def test_concordance_function(self): method test_pearson_class (line 47) | def test_pearson_class(self): method test_concordance_class (line 56) | def test_concordance_class(self): method test_pearson_config (line 65) | def test_pearson_config(self): method test_concordance_config (line 73) | def test_concordance_config(self): FILE: keras/src/metrics/f_score_metrics.py class FBetaScore (line 9) | class FBetaScore(Metric): method __init__ (line 66) | def __init__( method _build (line 122) | def _build(self, y_true_shape, y_pred_shape): method update_state (line 158) | def update_state(self, y_true, y_pred, sample_weight=None): method result (line 201) | def result(self): method get_config (line 231) | def get_config(self): method reset_state (line 245) | def reset_state(self): class F1Score (line 251) | class F1Score(FBetaScore): method __init__ (line 302) | def __init__( method get_config (line 317) | def get_config(self): FILE: keras/src/metrics/f_score_metrics_test.py class FBetaScoreTest (line 8) | class FBetaScoreTest(testing.TestCase): method _run_test (line 9) | def _run_test( method test_config (line 26) | def test_config(self): method test_fbeta_perfect_score (line 55) | def test_fbeta_perfect_score(self, average, beta): method test_fbeta_worst_score (line 79) | def test_fbeta_worst_score(self, average, beta): method test_fbeta_random_score (line 107) | def test_fbeta_random_score(self, average, beta, result): method test_fbeta_random_score_none (line 135) | def test_fbeta_random_score_none(self, average, beta, result): method test_fbeta_weighted_random_score_none (line 201) | def test_fbeta_weighted_random_score_none( method test_invalid_average_raises_value_error (line 230) | def test_invalid_average_raises_value_error(self): method test_beta_integer_type_raises_value_error (line 244) | def test_beta_integer_type_raises_value_error(self): method test_beta_string_type_raises_value_error (line 253) | def test_beta_string_type_raises_value_error(self): method test_beta_none_type_raises_value_error (line 262) | def test_beta_none_type_raises_value_error(self): method test_beta_zero_raises_value_error (line 271) | def test_beta_zero_raises_value_error(self): method test_beta_negative_one_raises_value_error (line 281) | def test_beta_negative_one_raises_value_error(self): method test_beta_negative_half_raises_value_error (line 291) | def test_beta_negative_half_raises_value_error(self): method test_threshold_not_float_raises_value_error (line 301) | def test_threshold_not_float_raises_value_error(self): method test_threshold_string_raises_value_error (line 312) | def test_threshold_string_raises_value_error(self): method test_threshold_above_one_raises_value_error (line 323) | def test_threshold_above_one_raises_value_error(self): method test_threshold_zero_raises_value_error (line 334) | def test_threshold_zero_raises_value_error(self): method test_threshold_negative_raises_value_error (line 345) | def test_threshold_negative_raises_value_error(self): method test_non_2d_input_shapes_raises_value_error (line 356) | def test_non_2d_input_shapes_raises_value_error(self): method test_undefined_output_dim_raises_value_error (line 369) | def test_undefined_output_dim_raises_value_error(self): class F1ScoreTest (line 384) | class F1ScoreTest(testing.TestCase): method test_config (line 385) | def test_config(self): method test_correctness (line 395) | def test_correctness(self): FILE: keras/src/metrics/hinge_metrics.py class Hinge (line 9) | class Hinge(reduction_metrics.MeanMetricWrapper): method __init__ (line 32) | def __init__(self, name="hinge", dtype=None): method get_config (line 37) | def get_config(self): class SquaredHinge (line 42) | class SquaredHinge(reduction_metrics.MeanMetricWrapper): method __init__ (line 65) | def __init__(self, name="squared_hinge", dtype=None): method get_config (line 70) | def get_config(self): class CategoricalHinge (line 75) | class CategoricalHinge(reduction_metrics.MeanMetricWrapper): method __init__ (line 94) | def __init__(self, name="categorical_hinge", dtype=None): method get_config (line 99) | def get_config(self): FILE: keras/src/metrics/hinge_metrics_test.py class HingeTest (line 7) | class HingeTest(testing.TestCase): method test_config (line 8) | def test_config(self): method test_unweighted (line 19) | def test_unweighted(self): method test_weighted (line 27) | def test_weighted(self): class SquaredHingeTest (line 36) | class SquaredHingeTest(testing.TestCase): method test_config (line 37) | def test_config(self): method test_unweighted (line 52) | def test_unweighted(self): method test_weighted (line 60) | def test_weighted(self): class CategoricalHingeTest (line 69) | class CategoricalHingeTest(testing.TestCase): method test_config (line 70) | def test_config(self): method test_unweighted (line 85) | def test_unweighted(self): method test_weighted (line 109) | def test_weighted(self): FILE: keras/src/metrics/iou_metrics.py class _IoUBase (line 11) | class _IoUBase(Metric): method __init__ (line 50) | def __init__( method update_state (line 77) | def update_state(self, y_true, y_pred, sample_weight=None): method reset_state (line 152) | def reset_state(self): class IoU (line 159) | class IoU(_IoUBase): method __init__ (line 235) | def __init__( method result (line 263) | def result(self): method get_config (line 301) | def get_config(self): class BinaryIoU (line 315) | class BinaryIoU(IoU): method __init__ (line 387) | def __init__( method update_state (line 402) | def update_state(self, y_true, y_pred, sample_weight=None): method get_config (line 426) | def get_config(self): class MeanIoU (line 436) | class MeanIoU(IoU): method __init__ (line 504) | def __init__( method get_config (line 526) | def get_config(self): class OneHotIoU (line 539) | class OneHotIoU(IoU): method __init__ (line 621) | def __init__( method get_config (line 642) | def get_config(self): class OneHotMeanIoU (line 655) | class OneHotMeanIoU(MeanIoU): method __init__ (line 732) | def __init__( method get_config (line 751) | def get_config(self): FILE: keras/src/metrics/iou_metrics_test.py class IoUTest (line 11) | class IoUTest(testing.TestCase): method test_config (line 12) | def test_config(self): method test_unweighted (line 25) | def test_unweighted(self): method test_weighted (line 40) | def test_weighted(self): method test_multi_dim_input (line 61) | def test_multi_dim_input(self): method test_zero_valid_entries (line 82) | def test_zero_valid_entries(self): method test_zero_and_non_zero_entries (line 86) | def test_zero_and_non_zero_entries(self): method test_compilation (line 101) | def test_compilation(self): class BinaryIoUTest (line 112) | class BinaryIoUTest(testing.TestCase): method test_config (line 113) | def test_config(self): method test_different_thresholds_weighted (line 126) | def test_different_thresholds_weighted(self): method test_different_thresholds_unweighted (line 162) | def test_different_thresholds_unweighted(self): method test_multi_dim_input (line 186) | def test_multi_dim_input(self): method test_zero_valid_entries (line 205) | def test_zero_valid_entries(self): method test_zero_and_non_zero_entries (line 209) | def test_zero_and_non_zero_entries(self): class MeanIoUTest (line 225) | class MeanIoUTest(testing.TestCase): method test_config (line 226) | def test_config(self): method test_unweighted (line 235) | def test_unweighted(self): method test_unweighted_ignore_class_255 (line 250) | def test_unweighted_ignore_class_255(self): method test_unweighted_ignore_class_1 (line 268) | def test_unweighted_ignore_class_1(self): method test_weighted (line 286) | def test_weighted(self): method test_weighted_ignore_class_1 (line 305) | def test_weighted_ignore_class_1(self): method test_multi_dim_input (line 324) | def test_multi_dim_input(self): method test_zero_valid_entries (line 343) | def test_zero_valid_entries(self): method test_zero_and_non_zero_entries (line 347) | def test_zero_and_non_zero_entries(self): method _confusion_matrix (line 362) | def _confusion_matrix(y_true, y_pred, num_classes): method _get_big_chunk (line 384) | def _get_big_chunk(dtype): method test_big_chunk (line 419) | def test_big_chunk(self): method test_user_warning_float_weight (line 460) | def test_user_warning_float_weight(self): class OneHotIoUTest (line 468) | class OneHotIoUTest(testing.TestCase): method test_unweighted (line 469) | def test_unweighted(self): method test_weighted (line 486) | def test_weighted(self): class OneHotMeanIoUTest (line 508) | class OneHotMeanIoUTest(testing.TestCase): method test_unweighted (line 509) | def test_unweighted(self): method test_weighted (line 526) | def test_weighted(self): FILE: keras/src/metrics/metric.py class Metric (line 12) | class Metric(KerasSaveable): method __init__ (line 92) | def __init__(self, dtype=None, name=None): method reset_state (line 108) | def reset_state(self): method update_state (line 117) | def update_state(self, *args, **kwargs): method stateless_update_state (line 121) | def stateless_update_state(self, metric_variables, *args, **kwargs): method result (line 146) | def result(self): method stateless_result (line 154) | def stateless_result(self, metric_variables): method stateless_reset_state (line 170) | def stateless_reset_state(self): method dtype (line 186) | def dtype(self): method _obj_type (line 189) | def _obj_type(self): method add_variable (line 192) | def add_variable( method add_weight (line 211) | def add_weight(self, shape=(), initializer=None, dtype=None, name=None): method variables (line 218) | def variables(self): method __call__ (line 224) | def __call__(self, *args, **kwargs): method get_config (line 229) | def get_config(self): method from_config (line 234) | def from_config(cls, config): method __setattr__ (line 237) | def __setattr__(self, name, value): method _check_super_called (line 243) | def _check_super_called(self): method __repr__ (line 250) | def __repr__(self): method __str__ (line 253) | def __str__(self): FILE: keras/src/metrics/metric_test.py class ExampleMetric (line 14) | class ExampleMetric(Metric): method __init__ (line 15) | def __init__(self, name="mean_square_error", dtype=None): method update_state (line 27) | def update_state(self, y_true, y_pred): method result (line 35) | def result(self): method reset_state (line 41) | def reset_state(self): class MetricTest (line 46) | class MetricTest(testing.TestCase): method setUp (line 47) | def setUp(self): method tearDown (line 52) | def tearDown(self): method test_end_to_end_flow (line 57) | def test_end_to_end_flow(self): method test_stateless_update_state (line 79) | def test_stateless_update_state(self): method test_stateless_result (line 121) | def test_stateless_result(self): method test_stateless_reset_state (line 126) | def test_stateless_reset_state(self): method test_variable_tracking (line 137) | def test_variable_tracking(self): method test_submetric_tracking (line 156) | def test_submetric_tracking(self): method test_serialization (line 184) | def test_serialization(self): method test_pickle (line 190) | def test_pickle(self): method test_get_method (line 195) | def test_get_method(self): method test_dtype_arg (line 211) | def test_dtype_arg(self): method test_default_dtype (line 242) | def test_default_dtype(self): FILE: keras/src/metrics/metrics_utils.py function assert_thresholds_range (line 13) | def assert_thresholds_range(thresholds): function parse_init_thresholds (line 25) | def parse_init_thresholds(thresholds, default_threshold=0.5): class ConfusionMatrix (line 34) | class ConfusionMatrix(Enum): class AUCCurve (line 41) | class AUCCurve(Enum): method from_str (line 49) | def from_str(key): class AUCSummationMethod (line 63) | class AUCSummationMethod(Enum): method from_str (line 83) | def from_str(key): function _update_confusion_matrix_variables_optimized (line 97) | def _update_confusion_matrix_variables_optimized( function is_evenly_distributed_thresholds (line 317) | def is_evenly_distributed_thresholds(thresholds): function update_confusion_matrix_variables (line 341) | def update_confusion_matrix_variables( function _filter_top_k (line 600) | def _filter_top_k(x, k): function confusion_matrix (line 620) | def confusion_matrix( FILE: keras/src/metrics/probabilistic_metrics.py class KLDivergence (line 11) | class KLDivergence(reduction_metrics.MeanMetricWrapper): method __init__ (line 51) | def __init__(self, name="kl_divergence", dtype=None): method get_config (line 54) | def get_config(self): class Poisson (line 59) | class Poisson(reduction_metrics.MeanMetricWrapper): method __init__ (line 94) | def __init__(self, name="poisson", dtype=None): method get_config (line 97) | def get_config(self): class BinaryCrossentropy (line 102) | class BinaryCrossentropy(reduction_metrics.MeanMetricWrapper): method __init__ (line 143) | def __init__( method get_config (line 162) | def get_config(self): class CategoricalCrossentropy (line 172) | class CategoricalCrossentropy(reduction_metrics.MeanMetricWrapper): method __init__ (line 226) | def __init__( method get_config (line 248) | def get_config(self): class SparseCategoricalCrossentropy (line 259) | class SparseCategoricalCrossentropy(reduction_metrics.MeanMetricWrapper): method __init__ (line 316) | def __init__( method get_config (line 338) | def get_config(self): FILE: keras/src/metrics/probabilistic_metrics_test.py class KLDivergenceTest (line 7) | class KLDivergenceTest(testing.TestCase): method setup (line 8) | def setup(self): method test_config (line 21) | def test_config(self): method test_unweighted (line 30) | def test_unweighted(self): method test_weighted (line 39) | def test_weighted(self): class PoissonTest (line 54) | class PoissonTest(testing.TestCase): method setup (line 55) | def setup(self): method test_config (line 67) | def test_config(self): method test_unweighted (line 70) | def test_unweighted(self): method test_weighted (line 79) | def test_weighted(self): class BinaryCrossentropyTest (line 95) | class BinaryCrossentropyTest(testing.TestCase): method test_config (line 96) | def test_config(self): method test_unweighted (line 103) | def test_unweighted(self): method test_unweighted_with_logits (line 110) | def test_unweighted_with_logits(self): method test_weighted (line 118) | def test_weighted(self): method test_weighted_from_logits (line 126) | def test_weighted_from_logits(self): method test_label_smoothing (line 134) | def test_label_smoothing(self): class CategoricalCrossentropyTest (line 146) | class CategoricalCrossentropyTest(testing.TestCase): method test_config (line 147) | def test_config(self): method test_unweighted (line 154) | def test_unweighted(self): method test_unweighted_from_logits (line 161) | def test_unweighted_from_logits(self): method test_weighted (line 169) | def test_weighted(self): method test_weighted_from_logits (line 178) | def test_weighted_from_logits(self): method test_label_smoothing (line 187) | def test_label_smoothing(self): class SparseCategoricalCrossentropyTest (line 198) | class SparseCategoricalCrossentropyTest(testing.TestCase): method test_config (line 199) | def test_config(self): method test_unweighted (line 204) | def test_unweighted(self): method test_unweighted_from_logits (line 212) | def test_unweighted_from_logits(self): method test_weighted (line 220) | def test_weighted(self): method test_weighted_from_logits (line 229) | def test_weighted_from_logits(self): method test_ignore_class (line 238) | def test_ignore_class(self): method test_ignore_class_weighted (line 245) | def test_ignore_class_weighted(self): method test_ignore_class_from_logits (line 253) | def test_ignore_class_from_logits(self): FILE: keras/src/metrics/reduction_metrics.py function reduce_to_samplewise_values (line 10) | def reduce_to_samplewise_values(values, sample_weight, reduce_fn, dtype): class Sum (line 48) | class Sum(Metric): method __init__ (line 74) | def __init__(self, name="sum", dtype=None): method update_state (line 83) | def update_state(self, values, sample_weight=None): method reset_state (line 89) | def reset_state(self): method result (line 92) | def result(self): class Mean (line 97) | class Mean(Metric): method __init__ (line 123) | def __init__(self, name="mean", dtype=None): method update_state (line 138) | def update_state(self, values, sample_weight=None): method reset_state (line 151) | def reset_state(self): method result (line 155) | def result(self): class MeanMetricWrapper (line 162) | class MeanMetricWrapper(Mean): method __init__ (line 187) | def __init__(self, fn, name=None, dtype=None, **kwargs): method update_state (line 201) | def update_state(self, y_true, y_pred, sample_weight=None): method get_config (line 209) | def get_config(self): method from_config (line 216) | def from_config(cls, config): FILE: keras/src/metrics/reduction_metrics_test.py class SumTest (line 13) | class SumTest(testing.TestCase): method test_config (line 14) | def test_config(self): method test_unweighted (line 26) | def test_unweighted(self): method test_weighted (line 32) | def test_weighted(self): method test_weighted_nd (line 38) | def test_weighted_nd(self): method test_weighted_nd_broadcast (line 44) | def test_weighted_nd_broadcast(self): class MeanTest (line 51) | class MeanTest(testing.TestCase): method test_config (line 52) | def test_config(self): method test_unweighted (line 64) | def test_unweighted(self): method test_weighted (line 70) | def test_weighted(self): method test_weighted_negative_weights (line 76) | def test_weighted_negative_weights(self): method test_weighted_nd (line 82) | def test_weighted_nd(self): method test_weighted_nd_broadcast (line 88) | def test_weighted_nd_broadcast(self): method test_weighted_dynamic_shapes (line 94) | def test_weighted_dynamic_shapes(self): function mse (line 105) | def mse(y_true, y_pred): class MetricWrapperTest (line 109) | class MetricWrapperTest(testing.TestCase): method test_config (line 110) | def test_config(self): method test_unweighted (line 126) | def test_unweighted(self): method test_weighted (line 141) | def test_weighted(self): method test_weighted_broadcast (line 155) | def test_weighted_broadcast(self): method test_weighted_dynamic_shape (line 169) | def test_weighted_dynamic_shape(self): method test_binary_accuracy_with_boolean_inputs (line 181) | def test_binary_accuracy_with_boolean_inputs(self): FILE: keras/src/metrics/regression_metrics.py class MeanSquaredError (line 17) | class MeanSquaredError(reduction_metrics.MeanMetricWrapper): method __init__ (line 37) | def __init__(self, name="mean_squared_error", dtype=None): method get_config (line 42) | def get_config(self): class MeanAbsoluteError (line 47) | class MeanAbsoluteError(reduction_metrics.MeanMetricWrapper): method __init__ (line 83) | def __init__(self, name="mean_absolute_error", dtype=None): method get_config (line 88) | def get_config(self): class MeanAbsolutePercentageError (line 93) | class MeanAbsolutePercentageError(reduction_metrics.MeanMetricWrapper): method __init__ (line 128) | def __init__(self, name="mean_absolute_percentage_error", dtype=None): method get_config (line 133) | def get_config(self): class MeanSquaredLogarithmicError (line 138) | class MeanSquaredLogarithmicError(reduction_metrics.MeanMetricWrapper): method __init__ (line 174) | def __init__(self, name="mean_squared_logarithmic_error", dtype=None): method get_config (line 179) | def get_config(self): class RootMeanSquaredError (line 184) | class RootMeanSquaredError(reduction_metrics.Mean): method __init__ (line 220) | def __init__(self, name="root_mean_squared_error", dtype=None): method update_state (line 225) | def update_state(self, y_true, y_pred, sample_weight=None): method result (line 245) | def result(self): class CosineSimilarity (line 250) | class CosineSimilarity(reduction_metrics.MeanMetricWrapper): method __init__ (line 296) | def __init__(self, name="cosine_similarity", dtype=None, axis=-1): method get_config (line 301) | def get_config(self): class LogCoshError (line 306) | class LogCoshError(reduction_metrics.MeanMetricWrapper): method __init__ (line 342) | def __init__(self, name="logcosh", dtype=None): method get_config (line 347) | def get_config(self): class R2Score (line 353) | class R2Score(reduction_metrics.Metric): method __init__ (line 404) | def __init__( method _build (line 441) | def _build(self, y_true_shape, y_pred_shape): method update_state (line 480) | def update_state(self, y_true, y_pred, sample_weight=None): method result (line 526) | def result(self): method reset_state (line 564) | def reset_state(self): method get_config (line 568) | def get_config(self): function cosine_similarity (line 579) | def cosine_similarity(y_true, y_pred, axis=-1): FILE: keras/src/metrics/regression_metrics_test.py class MeanSquaredErrorTest (line 8) | class MeanSquaredErrorTest(testing.TestCase): method test_config (line 9) | def test_config(self): method test_unweighted (line 13) | def test_unweighted(self): method test_weighted (line 26) | def test_weighted(self): class CosineSimilarityTest (line 39) | class CosineSimilarityTest(testing.TestCase): method l2_norm (line 40) | def l2_norm(self, x, axis): method setup (line 46) | def setup(self, axis=1): method test_config (line 57) | def test_config(self): method test_unweighted (line 71) | def test_unweighted(self): method test_weighted (line 78) | def test_weighted(self): method test_axis (line 88) | def test_axis(self): class MeanAbsoluteErrorTest (line 96) | class MeanAbsoluteErrorTest(testing.TestCase): method test_config (line 97) | def test_config(self): method test_unweighted (line 107) | def test_unweighted(self): method test_weighted (line 120) | def test_weighted(self): class MeanAbsolutePercentageErrorTest (line 133) | class MeanAbsolutePercentageErrorTest(testing.TestCase): method test_config (line 134) | def test_config(self): method test_unweighted (line 148) | def test_unweighted(self): method test_weighted (line 166) | def test_weighted(self): class MeanSquaredLogarithmicErrorTest (line 186) | class MeanSquaredLogarithmicErrorTest(testing.TestCase): method test_config (line 187) | def test_config(self): method test_unweighted (line 201) | def test_unweighted(self): method test_weighted (line 214) | def test_weighted(self): class RootMeanSquaredErrorTest (line 227) | class RootMeanSquaredErrorTest(testing.TestCase): method test_config (line 228) | def test_config(self): method test_unweighted (line 239) | def test_unweighted(self): method test_weighted (line 249) | def test_weighted(self): class LogCoshErrorTest (line 260) | class LogCoshErrorTest(testing.TestCase): method setup (line 261) | def setup(self): method test_config (line 272) | def test_config(self): method test_unweighted (line 277) | def test_unweighted(self): method test_weighted (line 286) | def test_weighted(self): class R2ScoreTest (line 302) | class R2ScoreTest(testing.TestCase): method _run_test (line 303) | def _run_test( method test_config (line 317) | def test_config(self): method test_r2_sklearn_comparison (line 337) | def test_r2_sklearn_comparison( method test_r2_tfa_comparison (line 363) | def test_r2_tfa_comparison(self, class_aggregation, num_regressors, re... method test_errors (line 376) | def test_errors(self): FILE: keras/src/models/cloning.py function clone_model (line 14) | def clone_model( function _wrap_clone_function (line 212) | def _wrap_clone_function( function _clone_sequential_model (line 257) | def _clone_sequential_model(model, clone_function, input_tensors=None): function _clone_functional_model (line 343) | def _clone_functional_model( FILE: keras/src/models/cloning_test.py function get_mlp_functional_model (line 13) | def get_mlp_functional_model(shared_layers=False): function get_nested_functional_model (line 25) | def get_nested_functional_model(): function get_nested_sequential_model (line 35) | def get_nested_sequential_model(): function get_doubly_nested_functional_model (line 43) | def get_doubly_nested_functional_model(): function get_doubly_nested_sequential_model (line 53) | def get_doubly_nested_sequential_model(): function get_cnn_functional_model (line 62) | def get_cnn_functional_model(shared_layers=False): function get_sequential_model (line 74) | def get_sequential_model(explicit_input=True): function get_cnn_sequential_model (line 83) | def get_cnn_sequential_model(explicit_input=True): function get_subclassed_model (line 92) | def get_subclassed_model(): class CloneModelTest (line 106) | class CloneModelTest(testing.TestCase): method assert_models_equal (line 107) | def assert_models_equal(self, model1, model2, ref_input): method assert_weights_equal (line 115) | def assert_weights_equal(self, model1, model2): method test_cloning_correctness (line 129) | def test_cloning_correctness(self, model_fn, is_conv=False): method test_custom_clone_function (line 143) | def test_custom_clone_function(self, model_fn): method test_input_tensors (line 163) | def test_input_tensors(self, model_fn): method test_shared_layers_cloning (line 172) | def test_shared_layers_cloning(self): method test_structured_io_cloning (line 177) | def test_structured_io_cloning(self): method test_call_fn (line 200) | def test_call_fn(self): method test_recursive (line 221) | def test_recursive(self): method test_recursive_multi_level (line 265) | def test_recursive_multi_level(self): method test_compiled_model_cloning (line 314) | def test_compiled_model_cloning(self): FILE: keras/src/models/functional.py class Functional (line 27) | class Functional(Function, Model): method __new__ (line 99) | def __new__(cls, *args, **kwargs): method __init__ (line 103) | def __init__(self, inputs, outputs, name=None, **kwargs): method _lock_state (line 149) | def _lock_state(self): method _obj_type (line 155) | def _obj_type(self): method layers (line 159) | def layers(self): method layers (line 167) | def layers(self, _): method call (line 173) | def call(self, inputs, training=None, mask=None, **kwargs): method compute_output_spec (line 191) | def compute_output_spec(self, inputs, training=None, mask=None): method compute_output_shape (line 195) | def compute_output_shape(self, input_shape): method build (line 199) | def build(self, input_shape): method input_shape (line 203) | def input_shape(self): method output_shape (line 210) | def output_shape(self): method _assert_input_compatibility (line 216) | def _assert_input_compatibility(self, *args): method _maybe_warn_inputs_struct_mismatch (line 219) | def _maybe_warn_inputs_struct_mismatch(self, inputs, raise_exception=F... method _convert_inputs_to_tensors (line 243) | def _convert_inputs_to_tensors(self, flat_inputs): method _adjust_input_rank (line 256) | def _adjust_input_rank(self, flat_inputs): method _standardize_inputs (line 292) | def _standardize_inputs(self, inputs): method input (line 337) | def input(self): method output (line 344) | def output(self): method add_loss (line 347) | def add_loss(self, loss): method input_spec (line 352) | def input_spec(self): method input_spec (line 389) | def input_spec(self, value): method get_config (line 392) | def get_config(self): function functional_from_config (line 469) | def functional_from_config(cls, config, custom_objects=None): function operation_fn (line 641) | def operation_fn(operation, **call_context_args): function functional_like_constructor (line 658) | def functional_like_constructor(cls): function unpack_singleton (line 666) | def unpack_singleton(x): function serialize_node (line 672) | def serialize_node(node, own_nodes=()): function deserialize_node (line 706) | def deserialize_node(node_data, created_layers): function is_input_keras_tensor (line 773) | def is_input_keras_tensor(x): function clone_single_keras_tensor (line 783) | def clone_single_keras_tensor(x): function clone_keras_tensors (line 789) | def clone_keras_tensors(tensors, kt_id_mapping): function find_nodes_by_inputs_and_outputs (line 802) | def find_nodes_by_inputs_and_outputs(inputs, outputs): function clone_graph_nodes (line 807) | def clone_graph_nodes(inputs, outputs): FILE: keras/src/models/functional_test.py class FunctionalTest (line 24) | class FunctionalTest(testing.TestCase): method test_basic_flow_multi_input (line 26) | def test_basic_flow_multi_input(self): method test_scalar_input (line 52) | def test_scalar_input(self): method test_mutable_state (line 64) | def test_mutable_state(self): method test_basic_flow_multi_output (line 74) | def test_basic_flow_multi_output(self): method test_basic_flow_dict_io (line 97) | def test_basic_flow_dict_io(self): method test_basic_flow_as_a_submodel (line 128) | def test_basic_flow_as_a_submodel(self): method test_named_input_dict_io (line 143) | def test_named_input_dict_io(self): method test_input_dict_with_extra_field (line 224) | def test_input_dict_with_extra_field(self): method test_restored_multi_output_type (line 257) | def test_restored_multi_output_type(self, out_type): method test_restored_nested_input (line 278) | def test_restored_nested_input(self): method test_functional_input_shape_and_type (line 291) | def test_functional_input_shape_and_type(self): method test_layer_getters (line 300) | def test_layer_getters(self): method test_training_arg (line 318) | def test_training_arg(self): method test_mask_arg (line 334) | def test_mask_arg(self): method test_passing_inputs_by_name (line 339) | def test_passing_inputs_by_name(self): method test_rank_standardization (line 363) | def test_rank_standardization(self): method test_rank_standardization_failure (line 379) | def test_rank_standardization_failure(self): method test_dtype_standardization (line 397) | def test_dtype_standardization(self): method test_serialization (line 409) | def test_serialization(self): method test_bad_input_spec (line 467) | def test_bad_input_spec(self): method test_manual_input_spec (line 502) | def test_manual_input_spec(self): method test_functional_slicing (line 514) | def test_functional_slicing(self): method test_deeply_nested_model (line 551) | def test_deeply_nested_model(self): method test_optional_inputs (line 604) | def test_optional_inputs(self): method test_optional_dict_inputs (line 624) | def test_optional_dict_inputs(self): method test_unmodified_inputs (line 644) | def test_unmodified_inputs(self): method test_unused_inputs (line 666) | def test_unused_inputs(self): method test_disconnected_output (line 682) | def test_disconnected_output(self): method test_warning_for_mismatched_inputs_structure (line 692) | def test_warning_for_mismatched_inputs_structure(self): method test_for_functional_in_sequential (line 712) | def test_for_functional_in_sequential(self): method test_add_loss (line 729) | def test_add_loss(self): method test_layers_setter (line 733) | def test_layers_setter(self): method test_dict_input_to_list_model (line 743) | def test_dict_input_to_list_model(self): method test_list_input_with_dict_build (line 832) | def test_list_input_with_dict_build(self): method test_functional_with_dtype_policy (line 847) | def test_functional_with_dtype_policy(self): FILE: keras/src/models/model.py class Model (line 39) | class Model(Trainer, base_trainer.Trainer, Layer): method __new__ (line 144) | def __new__(cls, *args, **kwargs): method __init__ (line 152) | def __init__(self, *args, **kwargs): method call (line 164) | def call(self, *args, **kwargs): method layers (line 171) | def layers(self): method layers (line 175) | def layers(self, _): method get_layer (line 182) | def get_layer(self, name=None, index=None): method summary (line 223) | def summary( method save (line 274) | def save(self, filepath, overwrite=True, zipped=None, **kwargs): method save_weights (line 320) | def save_weights(self, filepath, overwrite=True, max_shard_size=None): method load_weights (line 378) | def load_weights(self, filepath, skip_mismatch=False, **kwargs): method get_quantization_layer_structure (line 427) | def get_quantization_layer_structure(self, mode=None): method quantize (line 450) | def quantize(self, mode=None, config=None, filters=None, **kwargs): method _post_quantize (line 582) | def _post_quantize(self, mode, **kwargs): method build_from_config (line 590) | def build_from_config(self, config): method to_json (line 636) | def to_json(self, **kwargs): method export (line 654) | def export( method from_config (line 801) | def from_config(cls, config, custom_objects=None): method _get_variable_map (line 855) | def _get_variable_map(self): method get_state_tree (line 860) | def get_state_tree(self, value_format="backend_tensor"): method _create_nested_dict (line 940) | def _create_nested_dict(self, variables, value_format): method set_state_tree (line 973) | def set_state_tree(self, state_tree): method _assign_variable_values (line 1014) | def _assign_variable_values(self, variables, path_value_dict): method _flatten_nested_dict (line 1020) | def _flatten_nested_dict(self, nested_dict): function model_from_json (line 1035) | def model_from_json(json_string, custom_objects=None): function functional_init_arguments (line 1063) | def functional_init_arguments(args, kwargs): function inject_functional_model_class (line 1071) | def inject_functional_model_class(cls): FILE: keras/src/models/model_test.py function _get_model (line 20) | def _get_model(): function _get_model_multi_outputs_list (line 30) | def _get_model_multi_outputs_list(): function _get_model_multi_outputs_list_no_output_names (line 38) | def _get_model_multi_outputs_list_no_output_names(): function _get_model_single_output (line 46) | def _get_model_single_output(): function _get_model_single_output_list (line 53) | def _get_model_single_output_list(): function _get_model_single_output_dict (line 60) | def _get_model_single_output_dict(): function _get_model_multi_outputs_dict (line 67) | def _get_model_multi_outputs_dict(): function _get_model_multi_outputs_struct_list_like (line 75) | def _get_model_multi_outputs_struct_list_like(_type): function _get_model_multi_outputs_struct_namedtuple (line 83) | def _get_model_multi_outputs_struct_namedtuple(): function _get_model_multi_outputs_struct_dict (line 92) | def _get_model_multi_outputs_struct_dict(): function _get_model_multi_outputs_struct (line 100) | def _get_model_multi_outputs_struct(): function _get_model_multi_outputs_dict_with_single_tensor (line 117) | def _get_model_multi_outputs_dict_with_single_tensor(): function _get_model_with_custom_compute_loss (line 124) | def _get_model_with_custom_compute_loss(): function _get_model_with_duplicate_variable_path (line 141) | def _get_model_with_duplicate_variable_path(): function _get_model_optional_inputs (line 160) | def _get_model_optional_inputs(): function _get_variable_value_by_path (line 177) | def _get_variable_value_by_path(variables, path): class ModelTest (line 185) | class ModelTest(testing.TestCase): method test_functional_rerouting (line 186) | def test_functional_rerouting(self): method test_json_serialization (line 190) | def test_json_serialization(self): method test_tuple_input_model_subclass (line 196) | def test_tuple_input_model_subclass(self): method test_reviving_functional_from_config_custom_layer (line 215) | def test_reviving_functional_from_config_custom_layer(self): method test_reviving_functional_from_config_custom_model (line 234) | def test_reviving_functional_from_config_custom_model(self): method test_functional_pickling (line 262) | def test_functional_pickling(self, model_fn): method test_functional_single_output (line 289) | def test_functional_single_output(self, model_fn, loss_type): method test_functional_list_outputs_list_losses (line 330) | def test_functional_list_outputs_list_losses(self): method test_functional_list_outputs_list_losses_abbr (line 360) | def test_functional_list_outputs_list_losses_abbr(self): method test_functional_list_outputs_nested_list_losses (line 392) | def test_functional_list_outputs_nested_list_losses(self): method test_functional_dict_outputs_dict_losses (line 422) | def test_functional_dict_outputs_dict_losses(self): method test_functional_dict_outputs_dict_losses_with_undefined_loss (line 472) | def test_functional_dict_outputs_dict_losses_with_undefined_loss(self): method test_functional_list_outputs_dict_losses_metrics (line 515) | def test_functional_list_outputs_dict_losses_metrics(self): method test_functional_list_outputs_dict_losses_metrics_uniq_weighted (line 559) | def test_functional_list_outputs_dict_losses_metrics_uniq_weighted(self): method test_functional_list_outputs_dict_losses_partial_metrics (line 599) | def test_functional_list_outputs_dict_losses_partial_metrics(self): method test_functional_dict_outputs_with_single_tensor (line 629) | def test_functional_dict_outputs_with_single_tensor(self): method test_functional_list_outputs_with_custom_compute_loss (line 650) | def test_functional_list_outputs_with_custom_compute_loss(self): method test_functional_list_outputs_dict_losses_invalid_keys (line 669) | def test_functional_list_outputs_dict_losses_invalid_keys(self): method test_functional_list_outputs_dict_losses_no_output_names (line 690) | def test_functional_list_outputs_dict_losses_no_output_names(self): method test_functional_list_outputs_dict_metrics_invalid_keys (line 707) | def test_functional_list_outputs_dict_metrics_invalid_keys(self): method test_functional_dict_outputs_dict_losses_invalid_keys (line 729) | def test_functional_dict_outputs_dict_losses_invalid_keys(self): method test_functional_dict_outputs_dict_metrics_invalid_keys (line 750) | def test_functional_dict_outputs_dict_metrics_invalid_keys(self): method test_functional_list_outputs_invalid_nested_list_losses (line 772) | def test_functional_list_outputs_invalid_nested_list_losses(self): method test_quantize (line 794) | def test_quantize(self, mode): method test_quantize_with_filters (line 821) | def test_quantize_with_filters(self, filters, expected_quantized_layers): method test_quantize_unbuilt (line 845) | def test_quantize_unbuilt(self, mode): method test_quantize_invalid_args (line 868) | def test_quantize_invalid_args(self): method test_quantize_nested_model (line 887) | def test_quantize_nested_model(self, mode): method test_get_state_tree (line 928) | def test_get_state_tree(self): method test_set_state_tree (line 975) | def test_set_state_tree(self): method test_get_state_tree_with_duplicate_path (line 1020) | def test_get_state_tree_with_duplicate_path(self): method test_layers_setter (line 1028) | def test_layers_setter(self): method get_struct_loss (line 1035) | def get_struct_loss(self, structure): method test_functional_struct_outputs_struct_losses (line 1061) | def test_functional_struct_outputs_struct_losses( method test_functional_struct_outputs_dict_struct_losses (line 1121) | def test_functional_struct_outputs_dict_struct_losses(self, weighted): method test_functional_struct_outputs_namedtuple_struct_losses (line 1169) | def test_functional_struct_outputs_namedtuple_struct_losses(self): method test_functional_deeply_nested_outputs_struct_losses (line 1210) | def test_functional_deeply_nested_outputs_struct_losses(self): method test_functional_optional_inputs (line 1271) | def test_functional_optional_inputs(self, is_optional_none): method test_functional_optional_inputs_generator (line 1285) | def test_functional_optional_inputs_generator(self, is_optional_none): method test_export_error (line 1300) | def test_export_error(self): FILE: keras/src/models/sequential.py class Sequential (line 20) | class Sequential(Model): method __new__ (line 66) | def __new__(cls, *args, **kwargs): method __init__ (line 69) | def __init__(self, layers=None, trainable=True, name=None): method add (line 78) | def add(self, layer, rebuild=True): method pop (line 127) | def pop(self, rebuild=True): method _maybe_rebuild (line 144) | def _maybe_rebuild(self): method _lock_state (line 157) | def _lock_state(self): method _obj_type (line 161) | def _obj_type(self): method build (line 164) | def build(self, input_shape=None): method call (line 237) | def call(self, inputs, training=None, mask=None, **kwargs): method layers (line 267) | def layers(self): method layers (line 277) | def layers(self, _): method compute_output_spec (line 283) | def compute_output_spec(self, inputs, training=None, mask=None, **kwar... method compute_output_shape (line 298) | def compute_output_shape(self, input_shape): method input_shape (line 308) | def input_shape(self): method output_shape (line 316) | def output_shape(self): method inputs (line 324) | def inputs(self): method outputs (line 332) | def outputs(self): method input_dtype (line 340) | def input_dtype(self): method _is_layer_name_unique (line 348) | def _is_layer_name_unique(self, layer): method get_config (line 354) | def get_config(self): method from_config (line 372) | def from_config(cls, config, custom_objects=None): FILE: keras/src/models/sequential_test.py class SequentialTest (line 17) | class SequentialTest(testing.TestCase): method test_basic_flow_with_input (line 18) | def test_basic_flow_with_input(self): method test_legacy_flow_with_input_shape (line 67) | def test_legacy_flow_with_input_shape(self): method test_basic_flow_deferred (line 97) | def test_basic_flow_deferred(self): method test_basic_flow_as_a_submodel (line 140) | def test_basic_flow_as_a_submodel(self): method test_basic_flow_with_functional_model_as_first_layer (line 154) | def test_basic_flow_with_functional_model_as_first_layer(self): method test_basic_flow_with_sequential_model_as_first_layer (line 180) | def test_basic_flow_with_sequential_model_as_first_layer(self): method test_dict_inputs (line 206) | def test_dict_inputs(self): method test_list_inputs (line 220) | def test_list_inputs(self): method test_nested_sequential (line 234) | def test_nested_sequential(self): method test_errors (line 240) | def test_errors(self): method test_shape_inference_failure (line 270) | def test_shape_inference_failure(self): method test_serialization (line 284) | def test_serialization(self): method test_serialization_with_lambda_layer (line 320) | def test_serialization_with_lambda_layer(self): method test_functional_properties (line 335) | def test_functional_properties(self): method test_pickleable (line 346) | def test_pickleable(self): method test_bad_layer (line 353) | def test_bad_layer(self): method test_compute_output_shape (line 370) | def test_compute_output_shape(self): method test_hasattr (line 375) | def test_hasattr(self): method test_layers_setter (line 388) | def test_layers_setter(self): FILE: keras/src/models/variable_mapping.py function map_saveable_variables (line 8) | def map_saveable_variables(saveable, store, visited_saveables): function map_container_variables (line 51) | def map_container_variables(container, store, visited_saveables): FILE: keras/src/models/variable_mapping_test.py class VariableMappingTest (line 7) | class VariableMappingTest(testing.TestCase): method test_basics (line 8) | def test_basics(self): FILE: keras/src/ops/core.py class Map (line 15) | class Map(Operation): method call (line 16) | def call(self, f, xs): method compute_output_spec (line 19) | def compute_output_spec(self, f, xs): function map (line 37) | def map(f, xs): class Scan (line 81) | class Scan(Operation): method __init__ (line 82) | def __init__(self, length=None, reverse=False, unroll=1, *, name=None): method call (line 88) | def call(self, f, init, xs=None): method compute_output_spec (line 98) | def compute_output_spec(self, f, init, xs=None): function scan (line 116) | def scan(f, init, xs=None, length=None, reverse=False, unroll=1): class AssociativeScan (line 194) | class AssociativeScan(Operation): method __init__ (line 195) | def __init__(self, reverse=False, axis=0, *, name=None): method call (line 200) | def call(self, f, elems): method compute_output_spec (line 205) | def compute_output_spec(self, f, elems): function associative_scan (line 232) | def associative_scan(f, elems, reverse=False, axis=0): class Scatter (line 292) | class Scatter(Operation): method __init__ (line 293) | def __init__(self, shape, *, name=None): method call (line 297) | def call(self, indices, values): method compute_output_spec (line 300) | def compute_output_spec(self, indices, values): function scatter (line 305) | def scatter(indices, values, shape): class ScatterUpdate (line 335) | class ScatterUpdate(Operation): method __init__ (line 336) | def __init__(self, reduction=None, *, name=None): method call (line 340) | def call(self, inputs, indices, updates): method compute_output_spec (line 345) | def compute_output_spec(self, inputs, indices, updates): function scatter_update (line 350) | def scatter_update(inputs, indices, updates, reduction=None): class Slice (line 429) | class Slice(Operation): method __init__ (line 430) | def __init__(self, shape, *, name=None): method call (line 434) | def call(self, inputs, start_indices): method compute_output_spec (line 437) | def compute_output_spec(self, inputs, start_indices): function slice (line 467) | def slice(inputs, start_indices, shape): class SliceUpdate (line 497) | class SliceUpdate(Operation): method call (line 498) | def call(self, inputs, start_indices, updates): method compute_output_spec (line 501) | def compute_output_spec(self, inputs, start_indices, updates): function slice_update (line 506) | def slice_update(inputs, start_indices, updates): class Switch (line 541) | class Switch(Operation): method call (line 542) | def call(self, index, branches, *operands): method compute_output_spec (line 545) | def compute_output_spec(self, index, branches, *operands): function switch (line 552) | def switch(index, branches, *operands): class WhileLoop (line 592) | class WhileLoop(Operation): method __init__ (line 593) | def __init__(self, cond, body, maximum_iterations=None, *, name=None): method call (line 599) | def call(self, loop_vars): method compute_output_spec (line 607) | def compute_output_spec(self, loop_vars): function while_loop (line 614) | def while_loop( class StopGradient (line 667) | class StopGradient(Operation): method call (line 668) | def call(self, variable): method compute_output_spec (line 671) | def compute_output_spec(self, variable): function stop_gradient (line 676) | def stop_gradient(variable): class ForiLoop (line 699) | class ForiLoop(Operation): method __init__ (line 700) | def __init__(self, lower, upper, body_fun, *, name=None): method call (line 706) | def call(self, init_val): method compute_output_spec (line 714) | def compute_output_spec(self, init_val): function fori_loop (line 719) | def fori_loop(lower, upper, body_fun, init_val): class Unstack (line 747) | class Unstack(Operation): method __init__ (line 748) | def __init__(self, num=None, axis=0, *, name=None): method call (line 753) | def call(self, x): method compute_output_spec (line 756) | def compute_output_spec(self, x): function unstack (line 778) | def unstack(x, num=None, axis=0): function shape (line 802) | def shape(x): function dtype (line 829) | def dtype(x): class Cast (line 852) | class Cast(Operation): method __init__ (line 853) | def __init__(self, dtype, *, name=None): method call (line 857) | def call(self, x): method compute_output_spec (line 860) | def compute_output_spec(self, x): function cast (line 865) | def cast(x, dtype): class SaturateCast (line 886) | class SaturateCast(Operation): method __init__ (line 887) | def __init__(self, dtype, *, name=None): method call (line 891) | def call(self, x): method compute_output_spec (line 894) | def compute_output_spec(self, x): function saturate_cast (line 899) | def saturate_cast(x, dtype): function _saturate_cast (line 951) | def _saturate_cast(x, dtype, backend_module=None): class ConvertToTensor (line 991) | class ConvertToTensor(Operation): method __init__ (line 992) | def __init__(self, dtype=None, sparse=None, ragged=None, *, name=None): method call (line 998) | def call(self, x): method compute_output_spec (line 1003) | def compute_output_spec(self, x): function convert_to_tensor (line 1021) | def convert_to_tensor(x, dtype=None, sparse=None, ragged=None): function convert_to_numpy (line 1054) | def convert_to_numpy(x): class Cond (line 1070) | class Cond(Operation): method __call__ (line 1072) | def __call__(self, *args, **kwargs): method call (line 1090) | def call(self, pred, true_fn, false_fn): method compute_output_spec (line 1093) | def compute_output_spec(self, pred, true_fn, false_fn): method _check_output_spec (line 1104) | def _check_output_spec(self, true_fn_spec, false_fn_spec): function cond (line 1120) | def cond(pred, true_fn, false_fn): class VectorizedMap (line 1134) | class VectorizedMap(Operation): method __init__ (line 1135) | def __init__(self, function, *, name=None): method call (line 1139) | def call(self, elements): method compute_output_spec (line 1142) | def compute_output_spec(self, elements): method get_config (line 1158) | def get_config(self): method from_config (line 1164) | def from_config(cls, config): function vectorized_map (line 1173) | def vectorized_map(function, elements): function is_tensor (line 1208) | def is_tensor(x): function custom_gradient (line 1224) | def custom_gradient(f): FILE: keras/src/ops/core_test.py class CoreOpsDynamicShapeTest (line 24) | class CoreOpsDynamicShapeTest(testing.TestCase): method test_associative_scan (line 25) | def test_associative_scan(self): method test_cast (line 39) | def test_cast(self): method test_convert_to_tensor (line 43) | def test_convert_to_tensor(self): method test_fori_loop (line 47) | def test_fori_loop(self): method test_map (line 56) | def test_map(self): method test_saturate_cast (line 79) | def test_saturate_cast(self): method test_scan (line 83) | def test_scan(self): method test_scatter_update (line 103) | def test_scatter_update(self): method test_slice_update (line 113) | def test_slice_update(self): method test_stop_gradient (line 121) | def test_stop_gradient(self): method test_switch (line 125) | def test_switch(self): method test_vectorized_map (line 136) | def test_vectorized_map(self): method test_while_loop (line 159) | def test_while_loop(self): method test_unstack (line 169) | def test_unstack(self): class CoreOpsStaticShapeTest (line 178) | class CoreOpsStaticShapeTest(testing.TestCase): method test_associative_scan (line 179) | def test_associative_scan(self): method test_cast (line 193) | def test_cast(self): method test_cond (line 197) | def test_cond(self): method test_convert_to_tensor (line 206) | def test_convert_to_tensor(self): method test_fori_loop (line 225) | def test_fori_loop(self): method test_map (line 233) | def test_map(self): method test_saturate_cast (line 257) | def test_saturate_cast(self): method test_scan (line 261) | def test_scan(self): method test_scatter (line 279) | def test_scatter(self): method test_scatter_update (line 285) | def test_scatter_update(self): method test_slice (line 300) | def test_slice(self): method test_slice_negative_one_shape (line 306) | def test_slice_negative_one_shape(self): method test_slice_negative_one_shape_tensor_indices (line 312) | def test_slice_negative_one_shape_tensor_indices(self): method test_slice_negative_one_shape_dynamic_input_shape (line 320) | def test_slice_negative_one_shape_dynamic_input_shape(self): method test_slice_invalid_inputs (line 328) | def test_slice_invalid_inputs(self): method test_slice_update (line 346) | def test_slice_update(self): method test_stop_gradient (line 361) | def test_stop_gradient(self): method test_switch (line 365) | def test_switch(self): method test_vectorized_map (line 375) | def test_vectorized_map(self): method test_while_loop (line 399) | def test_while_loop(self): method test_unstack (line 409) | def test_unstack(self): class CoreOpsCorrectnessTest (line 418) | class CoreOpsCorrectnessTest(testing.TestCase): method test_associative_scan (line 419) | def test_associative_scan(self): method test_cast (line 479) | def test_cast(self): method test_cast_float8 (line 497) | def test_cast_float8(self, float8_dtype): method test_cond (line 515) | def test_cond(self): method test_convert_to_tensor (line 544) | def test_convert_to_tensor(self): method test_convert_to_tensor_sparse (line 566) | def test_convert_to_tensor_sparse(self): method test_convert_to_tensor_ragged (line 596) | def test_convert_to_tensor_ragged(self): method test_custom_gradient (line 622) | def test_custom_gradient(self, use_variable): method test_dynamic_slice (line 683) | def test_dynamic_slice(self): method test_fori_loop (line 697) | def test_fori_loop(self): method test_getitem (line 708) | def test_getitem(self): method test_is_tensor (line 874) | def test_is_tensor(self): method test_map (line 882) | def test_map(self): method test_saturate_cast (line 938) | def test_saturate_cast(self): method test_scan (line 956) | def test_scan(self): method test_scatter (line 1026) | def test_scatter(self): method test_scatter_update (line 1077) | def test_scatter_update(self): method test_scatter_update_with_reduction (line 1114) | def test_scatter_update_with_reduction(self): method test_shape (line 1158) | def test_shape(self): method test_shape_sparse (line 1171) | def test_shape_sparse(self): method test_shape_ragged (line 1189) | def test_shape_ragged(self): method test_slice (line 1198) | def test_slice(self): method test_slice_update (line 1233) | def test_slice_update(self): method test_stop_gradient (line 1269) | def test_stop_gradient(self): method test_stop_gradient_no_fit (line 1292) | def test_stop_gradient_no_fit(self): method test_switch (line 1312) | def test_switch(self): method test_vectorized_map (line 1333) | def test_vectorized_map(self): method test_while_loop (line 1396) | def test_while_loop(self, loop_vars, expected_output, maximum_iteratio... method test_while_loop_list_data (line 1430) | def test_while_loop_list_data(self, state, output, maximum_iterations): method test_unstack (line 1442) | def test_unstack(self): class CoreOpsDtypeTest (line 1462) | class CoreOpsDtypeTest(testing.TestCase): method test_cast (line 1492) | def test_cast(self, dtype): method test_convert_to_tensor (line 1525) | def test_convert_to_tensor(self, x, dtype, expected_dtype): method test_convert_to_tensor_with_tensor (line 1533) | def test_convert_to_tensor_with_tensor(self, dtype): method test_convert_to_tensor_with_variable (line 1543) | def test_convert_to_tensor_with_variable(self, dtype): method test_saturate_cast (line 1549) | def test_saturate_cast(self, dtype): class CoreOpsBehaviorTests (line 1556) | class CoreOpsBehaviorTests(testing.TestCase): method test_associative_scan_invalid_arguments (line 1557) | def test_associative_scan_invalid_arguments(self): method test_cond_check_output_spec (line 1573) | def test_cond_check_output_spec(self): method test_cond_raw_bool_compile (line 1632) | def test_cond_raw_bool_compile(self): method test_convert_to_numpy (line 1645) | def test_convert_to_numpy(self): method test_scan_invalid_arguments (line 1655) | def test_scan_invalid_arguments(self): method test_slice_compute_output_spec (line 1677) | def test_slice_compute_output_spec(self): method test_stop_gradient_compute_output_spec (line 1687) | def test_stop_gradient_compute_output_spec(self): method test_vectorized_map_serialization (line 1694) | def test_vectorized_map_serialization(self): method test_while_loop_output_spec (line 1706) | def test_while_loop_output_spec(self): method test_unstack_unknown_axis_num (line 1732) | def test_unstack_unknown_axis_num(self): FILE: keras/src/ops/einops.py function _create_axes_map (line 13) | def _create_axes_map(axes, input_shape, axes_lengths): function _create_grouped_axes (line 37) | def _create_grouped_axes(axes): function _flatten_group (line 51) | def _flatten_group(axes): function _get_transpose_order (line 55) | def _get_transpose_order(from_shape, to_shape): function _compute_output_shape (line 61) | def _compute_output_shape(axes_map, grouped_axes): function _compute_decomposed_shape (line 72) | def _compute_decomposed_shape(input_axes, axes_lengths, axes_map): class Rearrange (line 89) | class Rearrange(Operation): method call (line 90) | def call(self, tensor, pattern, **axes_lengths): method compute_output_spec (line 93) | def compute_output_spec(self, tensor, pattern, **axes_lengths): function rearrange (line 107) | def rearrange(tensor, pattern, **axes_lengths): FILE: keras/src/ops/einops_test.py class RearrangeTest (line 8) | class RearrangeTest(testing.TestCase): method test_basic_rearrangement_symbolic (line 9) | def test_basic_rearrangement_symbolic(self): method test_basic_rearrangement (line 16) | def test_basic_rearrangement(self): method test_output_composition (line 23) | def test_output_composition(self): method test_basic_decomposition_and_rearrangement_symbolic (line 30) | def test_basic_decomposition_and_rearrangement_symbolic(self): method test_basic_decomposition_and_rearrangement (line 36) | def test_basic_decomposition_and_rearrangement(self): method test_unchanged_shape (line 42) | def test_unchanged_shape(self): method test_unchanged_shape_symbolic (line 48) | def test_unchanged_shape_symbolic(self): FILE: keras/src/ops/function.py class Function (line 12) | class Function(Operation): method __init__ (line 46) | def __init__(self, inputs, outputs, name=None): method operations (line 99) | def operations(self): method inputs (line 103) | def inputs(self): method outputs (line 108) | def outputs(self): method _setup_nnx_op_mapping (line 112) | def _setup_nnx_op_mapping(self): method _get_operation_for_node (line 123) | def _get_operation_for_node(self, node): method compute_output_spec (line 132) | def compute_output_spec(self, inputs): method compute_output_shape (line 154) | def compute_output_shape(self, input_shape): method call (line 168) | def call(self, inputs): method _run_through_graph (line 173) | def _run_through_graph( method _assert_input_compatibility (line 228) | def _assert_input_compatibility(self, inputs): function make_node_key (line 256) | def make_node_key(op, node_index): function map_graph (line 260) | def map_graph(inputs, outputs): function _build_map (line 391) | def _build_map(inputs, outputs): function _build_map_helper (line 429) | def _build_map_helper( FILE: keras/src/ops/function_test.py class FunctionTest (line 15) | class FunctionTest(testing.TestCase): method test_define_and_call (line 16) | def test_define_and_call(self): method test_dynamic_shape_inference (line 49) | def test_dynamic_shape_inference(self): method test_dict_io (line 69) | def test_dict_io(self): method test_invalid_inputs_error (line 94) | def test_invalid_inputs_error(self): method test_serialization (line 117) | def test_serialization(self): method test_function_with_empty_outputs (line 129) | def test_function_with_empty_outputs(self): method test_function_with_empty_inputs (line 136) | def test_function_with_empty_inputs(self): method test_function_with_unconnected_inputs (line 143) | def test_function_with_unconnected_inputs(self): method test_function_with_intermediate_tensor_input (line 166) | def test_function_with_intermediate_tensor_input(self): method test_function_with_intermediate_tensor_input_chain (line 184) | def test_function_with_intermediate_tensor_input_chain(self): FILE: keras/src/ops/image.py class RGBToGrayscale (line 10) | class RGBToGrayscale(Operation): method __init__ (line 11) | def __init__(self, data_format=None, *, name=None): method call (line 15) | def call(self, images): method compute_output_spec (line 20) | def compute_output_spec(self, images): function rgb_to_grayscale (line 36) | def rgb_to_grayscale(images, data_format=None): class RGBToHSV (line 79) | class RGBToHSV(Operation): method __init__ (line 80) | def __init__(self, data_format=None, *, name=None): method call (line 84) | def call(self, images): method compute_output_spec (line 87) | def compute_output_spec(self, images): function rgb_to_hsv (line 105) | def rgb_to_hsv(images, data_format=None): class HSVToRGB (line 151) | class HSVToRGB(Operation): method __init__ (line 152) | def __init__(self, data_format=None, *, name=None): method call (line 156) | def call(self, images): method compute_output_spec (line 159) | def compute_output_spec(self, images): function hsv_to_rgb (line 177) | def hsv_to_rgb(images, data_format=None): class Resize (line 220) | class Resize(Operation): method __init__ (line 221) | def __init__( method call (line 244) | def call(self, images): method compute_output_spec (line 257) | def compute_output_spec(self, images): function resize (line 275) | def resize( function _resize (line 384) | def _resize( class AffineTransform (line 415) | class AffineTransform(Operation): method __init__ (line 416) | def __init__( method call (line 431) | def call(self, images, transform): method compute_output_spec (line 441) | def compute_output_spec(self, images, transform): function affine_transform (line 458) | def affine_transform( class ExtractPatches (line 557) | class ExtractPatches(Operation): method __init__ (line 558) | def __init__( method call (line 580) | def call(self, images): method compute_output_spec (line 590) | def compute_output_spec(self, images): method get_config (line 629) | def get_config(self): function extract_patches (line 640) | def extract_patches( function _extract_patches (line 734) | def _extract_patches( function _extract_patches_2d (line 751) | def _extract_patches_2d( function _extract_patches_3d (line 797) | def _extract_patches_3d( function extract_patches_3d (line 848) | def extract_patches_3d( class MapCoordinates (line 913) | class MapCoordinates(Operation): method __init__ (line 914) | def __init__(self, order, fill_mode="constant", fill_value=0, *, name=... method call (line 920) | def call(self, inputs, coordinates): method compute_output_spec (line 929) | def compute_output_spec(self, inputs, coordinates): function map_coordinates (line 946) | def map_coordinates( class PadImages (line 1000) | class PadImages(Operation): method __init__ (line 1001) | def __init__( method call (line 1022) | def call(self, images): method compute_output_spec (line 1034) | def compute_output_spec(self, images): function pad_images (line 1057) | def pad_images( function _pad_images (line 1127) | def _pad_images( class CropImages (line 1213) | class CropImages(Operation): method __init__ (line 1214) | def __init__( method call (line 1235) | def call(self, images): method compute_output_spec (line 1247) | def compute_output_spec(self, images): function crop_images (line 1284) | def crop_images( function _crop_images (line 1350) | def _crop_images( class PerspectiveTransform (line 1443) | class PerspectiveTransform(Operation): method __init__ (line 1444) | def __init__( method call (line 1457) | def call(self, images, start_points, end_points): method compute_output_spec (line 1467) | def compute_output_spec(self, images, start_points, end_points): function perspective_transform (line 1494) | def perspective_transform( class GaussianBlur (line 1588) | class GaussianBlur(Operation): method __init__ (line 1589) | def __init__( method call (line 1602) | def call(self, images): method compute_output_spec (line 1610) | def compute_output_spec(self, images): function gaussian_blur (line 1621) | def gaussian_blur( class ElasticTransform (line 1675) | class ElasticTransform(Operation): method __init__ (line 1676) | def __init__( method call (line 1697) | def call(self, images): method compute_output_spec (line 1709) | def compute_output_spec(self, images): function elastic_transform (line 1720) | def elastic_transform( class ScaleAndTranslate (line 1806) | class ScaleAndTranslate(Operation): method __init__ (line 1807) | def __init__(self, spatial_dims, method, antialias=True, *, name=None): method call (line 1813) | def call(self, images, output_shape, scale, translation): method compute_output_spec (line 1824) | def compute_output_spec(self, images, output_shape, scale, translation): function scale_and_translate (line 1829) | def scale_and_translate( FILE: keras/src/ops/image_test.py class ImageOpsDynamicShapeTest (line 20) | class ImageOpsDynamicShapeTest(testing.TestCase): method setUp (line 21) | def setUp(self): method tearDown (line 27) | def tearDown(self): method test_rgb_to_grayscale (line 31) | def test_rgb_to_grayscale(self): method test_rgb_to_hsv (line 43) | def test_rgb_to_hsv(self): method test_hsv_to_rgb (line 55) | def test_hsv_to_rgb(self): method test_resize (line 67) | def test_resize(self): method test_affine_transform (line 87) | def test_affine_transform(self): method test_extract_patches (line 101) | def test_extract_patches(self): method test_extract_patches_3d (line 127) | def test_extract_patches_3d(self): method test_map_coordinates (line 145) | def test_map_coordinates(self): method test_pad_images (line 151) | def test_pad_images(self): method test_crop_images (line 176) | def test_crop_images(self): method test_perspective_transform (line 196) | def test_perspective_transform(self): method test_gaussian_blur (line 212) | def test_gaussian_blur(self): method test_elastic_transform (line 224) | def test_elastic_transform(self): method test_scale_and_translate (line 236) | def test_scale_and_translate(self): class ImageOpsStaticShapeTest (line 252) | class ImageOpsStaticShapeTest(testing.TestCase): method setUp (line 253) | def setUp(self): method tearDown (line 259) | def tearDown(self): method test_rgb_to_grayscale (line 263) | def test_rgb_to_grayscale(self): method test_rgb_to_hsv (line 275) | def test_rgb_to_hsv(self): method test_hsv_to_rgb (line 287) | def test_hsv_to_rgb(self): method test_resize (line 299) | def test_resize(self): method test_affine_transform (line 311) | def test_affine_transform(self): method test_extract_patches (line 325) | def test_extract_patches(self): method test_extract_patches_3d (line 343) | def test_extract_patches_3d(self): method test_map_coordinates (line 361) | def test_map_coordinates(self): method test_map_coordinates_uint8 (line 367) | def test_map_coordinates_uint8(self): method test_map_coordinates_float32 (line 379) | def test_map_coordinates_float32(self): method test_map_coordinates_nearest (line 391) | def test_map_coordinates_nearest(self): method test_map_coordinates_manual_cast (line 403) | def test_map_coordinates_manual_cast(self): method test_pad_images (line 419) | def test_pad_images(self): method test_crop_images (line 443) | def test_crop_images(self): method test_perspective_transform (line 468) | def test_perspective_transform(self): method test_gaussian_blur (line 484) | def test_gaussian_blur(self): method test_elastic_transform (line 516) | def test_elastic_transform(self): method test_scale_and_translate (line 528) | def test_scale_and_translate(self): function _compute_affine_transform_coordinates (line 550) | def _compute_affine_transform_coordinates(image, transform): function _fixed_map_coordinates (line 590) | def _fixed_map_coordinates( function _perspective_transform_numpy (line 622) | def _perspective_transform_numpy( function gaussian_blur_np (line 693) | def gaussian_blur_np( function elastic_transform_np (line 778) | def elastic_transform_np( function _compute_homography_matrix (line 884) | def _compute_homography_matrix(start_points, end_points): class ImageOpsCorrectnessTest (line 1026) | class ImageOpsCorrectnessTest(testing.TestCase): method setUp (line 1027) | def setUp(self): method tearDown (line 1033) | def tearDown(self): method test_rgb_to_grayscale (line 1037) | def test_rgb_to_grayscale(self): method test_rgb_to_hsv (line 1071) | def test_rgb_to_hsv(self): method test_hsv_to_rgb (line 1105) | def test_hsv_to_rgb(self): method test_resize (line 1151) | def test_resize(self, interpolation, antialias): method test_resize_uint8_round (line 1244) | def test_resize_uint8_round(self): method test_resize_uint8_round_saturate (line 1282) | def test_resize_uint8_round_saturate(self): method test_resize_with_crop (line 1324) | def test_resize_with_crop(self): method test_resize_with_pad (line 1345) | def test_resize_with_pad(self, fill_value): method test_resize_invalid_size_zero_or_negative (line 1408) | def test_resize_invalid_size_zero_or_negative(self, invalid_size): method test_affine_transform (line 1423) | def test_affine_transform(self, interpolation, fill_mode): method test_extract_patches (line 1551) | def test_extract_patches(self, size, strides, dilation_rate, padding): method test_map_coordinates (line 1629) | def test_map_coordinates(self, shape, dtype, order, fill_mode): method test_pad_images (line 1662) | def test_pad_images( method test_crop_images (line 1744) | def test_crop_images( method test_perspective_transform (line 1819) | def test_perspective_transform(self, interpolation): method test_gaussian_blur (line 1858) | def test_gaussian_blur(self): method test_gaussian_blur_even_kernel_size (line 1906) | def test_gaussian_blur_even_kernel_size(self): method test_elastic_transform (line 1963) | def test_elastic_transform(self): method test_map_coordinates_constant_padding (line 2022) | def test_map_coordinates_constant_padding(self): method test_scale_and_translate (line 2052) | def test_scale_and_translate(self, method, antialias): class ImageOpsDtypeTest (line 2078) | class ImageOpsDtypeTest(testing.TestCase): method setUp (line 2087) | def setUp(self): method tearDown (line 2093) | def tearDown(self): method test_affine_transform (line 2098) | def test_affine_transform(self, dtype): method test_crop_images (line 2112) | def test_crop_images(self, dtype): method test_elastic_transform (line 2122) | def test_elastic_transform(self, dtype): method test_extract_patches (line 2132) | def test_extract_patches(self, dtype): method test_gaussian_blur (line 2142) | def test_gaussian_blur(self, dtype): method test_hsv_to_rgb (line 2152) | def test_hsv_to_rgb(self, dtype): method test_map_coordinates (line 2162) | def test_map_coordinates(self, dtype): method test_pad_images (line 2176) | def test_pad_images(self, dtype): method test_perspective_transform (line 2186) | def test_perspective_transform(self, dtype): method test_resize (line 2204) | def test_resize(self, dtype): method test_rgb_to_grayscale (line 2214) | def test_rgb_to_grayscale(self, dtype): method test_rgb_to_hsv (line 2224) | def test_rgb_to_hsv(self, dtype): method test_scale_and_translate (line 2234) | def test_scale_and_translate(self, dtype): class ImageOpsBehaviorTests (line 2259) | class ImageOpsBehaviorTests(testing.TestCase): method setUp (line 2260) | def setUp(self): method tearDown (line 2266) | def tearDown(self): method test_rgb_to_grayscale_invalid_rank (line 2271) | def test_rgb_to_grayscale_invalid_rank(self, rank): method test_rgb_to_hsv_invalid_rank (line 2292) | def test_rgb_to_hsv_invalid_rank(self, rank): method test_rgb_to_hsv_invalid_dtype (line 2309) | def test_rgb_to_hsv_invalid_dtype(self): method test_hsv_to_rgb_invalid_rank (line 2326) | def test_hsv_to_rgb_invalid_rank(self, rank): method test_hsv_to_rgb_invalid_dtype (line 2343) | def test_hsv_to_rgb_invalid_dtype(self): method test_resize_invalid_rank (line 2359) | def test_resize_invalid_rank(self): method test_affine_transform_invalid_images_rank (line 2378) | def test_affine_transform_invalid_images_rank(self): method test_affine_transform_invalid_transform_rank (line 2411) | def test_affine_transform_invalid_transform_rank(self): method test_extract_patches_invalid_size (line 2443) | def test_extract_patches_invalid_size(self): method test_extract_patches_unified_3d (line 2455) | def test_extract_patches_unified_3d(self): method test_map_coordinates_invalid_coordinates_rank (line 2467) | def test_map_coordinates_invalid_coordinates_rank(self): method test_crop_images_unknown_shape (line 2487) | def test_crop_images_unknown_shape(self): method test_perspective_transform_invalid_images_rank (line 2502) | def test_perspective_transform_invalid_images_rank(self): method test_perspective_transform_invalid_points_rank (line 2548) | def test_perspective_transform_invalid_points_rank(self): method test_gaussian_blur_invalid_images_rank (line 2582) | def test_gaussian_blur_invalid_images_rank(self): method test_elastic_transform_invalid_images_rank (line 2624) | def test_elastic_transform_invalid_images_rank(self): class ExtractPatches3DTest (line 2657) | class ExtractPatches3DTest(testing.TestCase): method setUp (line 2660) | def setUp(self): method test_extract_patches_3d_basic (line 2669) | def test_extract_patches_3d_basic(self, dtype, data_format): method test_extract_patches_3d_valid_padding (line 2683) | def test_extract_patches_3d_valid_padding(self, dtype): method test_extract_patches_3d_same_padding (line 2692) | def test_extract_patches_3d_same_padding(self, dtype): method test_extract_patches_3d_with_dilation (line 2709) | def test_extract_patches_3d_with_dilation(self, dtype, data_format): method test_extract_patches_3d_overlapping (line 2757) | def test_extract_patches_3d_overlapping(self, dtype): method test_extract_patches_3d_int_size (line 2770) | def test_extract_patches_3d_int_size(self, dtype): method test_extract_patches_3d_no_stride_provided (line 2777) | def test_extract_patches_3d_no_stride_provided(self, dtype): method test_extract_patches_3d_unbatched (line 2785) | def test_extract_patches_3d_unbatched(self, dtype): method test_extract_patches_3d_value_check (line 2792) | def test_extract_patches_3d_value_check(self, dtype): method test_extract_patches_3d_invalid_size (line 2811) | def test_extract_patches_3d_invalid_size(self, dtype): method test_extract_patches_3d_invalid_strides (line 2817) | def test_extract_patches_3d_invalid_strides(self, dtype): method test_extract_patches_3d_non_cubic (line 2827) | def test_extract_patches_3d_non_cubic(self, dtype, data_format): FILE: keras/src/ops/linalg.py class Cholesky (line 10) | class Cholesky(Operation): method __init__ (line 11) | def __init__(self, upper=False, *, name=None): method call (line 15) | def call(self, x): method compute_output_spec (line 18) | def compute_output_spec(self, x): function cholesky (line 25) | def cholesky(x, upper=False): function _cholesky (line 41) | def _cholesky(x, upper=False): class CholeskyInverse (line 51) | class CholeskyInverse(Operation): method __init__ (line 52) | def __init__(self, upper=False, *, name=None): method call (line 56) | def call(self, x): method compute_output_spec (line 59) | def compute_output_spec(self, x): function cholesky_inverse (line 68) | def cholesky_inverse(x, upper=False): function _cholesky_inverse (line 87) | def _cholesky_inverse(x, upper=False): class Det (line 97) | class Det(Operation): method call (line 98) | def call(self, x): method compute_output_spec (line 101) | def compute_output_spec(self, x): function det (line 108) | def det(x): function _det (line 123) | def _det(x): class Eig (line 130) | class Eig(Operation): method call (line 131) | def call(self, x): method compute_output_spec (line 134) | def compute_output_spec(self, x): function eig (line 144) | def eig(x): function _eig (line 159) | def _eig(x): class Eigh (line 166) | class Eigh(Operation): method call (line 167) | def call(self, x): method compute_output_spec (line 170) | def compute_output_spec(self, x): function eigh (line 180) | def eigh(x): function _eigh (line 196) | def _eigh(x): class Inv (line 203) | class Inv(Operation): method call (line 204) | def call(self, x): method compute_output_spec (line 207) | def compute_output_spec(self, x): function inv (line 214) | def inv(x): function _inv (line 229) | def _inv(x): class LuFactor (line 236) | class LuFactor(Operation): method call (line 237) | def call(self, x): method compute_output_spec (line 240) | def compute_output_spec(self, x): function lu_factor (line 252) | def lu_factor(x): function _lu_factor (line 269) | def _lu_factor(x): class Norm (line 283) | class Norm(Operation): method __init__ (line 284) | def __init__(self, ord=None, axis=None, keepdims=False, *, name=None): method compute_output_spec (line 299) | def compute_output_spec(self, x): method call (line 333) | def call(self, x): function norm (line 341) | def norm(x, ord=None, axis=None, keepdims=False): class Qr (line 402) | class Qr(Operation): method __init__ (line 403) | def __init__(self, mode="reduced", *, name=None): method compute_output_spec (line 413) | def compute_output_spec(self, x): method call (line 440) | def call(self, x): function qr (line 446) | def qr(x, mode="reduced"): class Solve (line 475) | class Solve(Operation): method call (line 476) | def call(self, a, b): method compute_output_spec (line 479) | def compute_output_spec(self, a, b): function solve (line 488) | def solve(a, b): function _solve (line 506) | def _solve(a, b): class SolveTriangular (line 516) | class SolveTriangular(Operation): method __init__ (line 517) | def __init__(self, lower=False, *, name=None): method call (line 521) | def call(self, a, b): method compute_output_spec (line 524) | def compute_output_spec(self, a, b): function solve_triangular (line 535) | def solve_triangular(a, b, lower=False): function _solve_triangular (line 553) | def _solve_triangular(a, b, lower=False): class SVD (line 563) | class SVD(Operation): method __init__ (line 564) | def __init__(self, full_matrices=True, compute_uv=True, *, name=None): method call (line 569) | def call(self, x): method compute_output_spec (line 572) | def compute_output_spec(self, x): function svd (line 594) | def svd(x, full_matrices=True, compute_uv=True): function _svd (line 612) | def _svd(x, full_matrices=True, compute_uv=True): class Lstsq (line 618) | class Lstsq(Operation): method __init__ (line 619) | def __init__(self, rcond=None, *, name=None): method call (line 623) | def call(self, a, b): method compute_output_spec (line 626) | def compute_output_spec(self, a, b): function lstsq (line 651) | def lstsq(a, b, rcond=None): function _assert_1d (line 694) | def _assert_1d(*arrays): function _assert_2d (line 702) | def _assert_2d(*arrays): function _assert_square (line 711) | def _assert_square(*arrays): function _assert_a_b_compat (line 721) | def _assert_a_b_compat(a, b): class JVP (line 738) | class JVP(Operation): method __init__ (line 739) | def __init__(self, has_aux=False, *, name=None): method call (line 743) | def call(self, fun, primals, tangents): method compute_output_spec (line 766) | def compute_output_spec(self, fun, primals, tangents): function jvp (line 786) | def jvp(fun, primals, tangents, has_aux=False): FILE: keras/src/ops/linalg_test.py class LinalgOpsDynamicShapeTest (line 13) | class LinalgOpsDynamicShapeTest(testing.TestCase): method test_cholesky (line 14) | def test_cholesky(self): method test_cholesky_inverse (line 27) | def test_cholesky_inverse(self): method test_det (line 40) | def test_det(self): method test_eig (line 53) | def test_eig(self): method test_eigh (line 59) | def test_eigh(self): method test_inv (line 65) | def test_inv(self): method test_lu_factor (line 78) | def test_lu_factor(self): method test_norm (line 89) | def test_norm(self): method test_qr (line 99) | def test_qr(self): method test_qr_invalid_mode (line 115) | def test_qr_invalid_mode(self): method test_solve (line 124) | def test_solve(self): method test_solve_triangular (line 150) | def test_solve_triangular(self): method test_svd (line 181) | def test_svd(self): class LinalgOpsStaticShapeTest (line 197) | class LinalgOpsStaticShapeTest(testing.TestCase): method test_cholesky (line 198) | def test_cholesky(self): method test_cholesky_inverse (line 207) | def test_cholesky_inverse(self): method test_det (line 216) | def test_det(self): method test_eig (line 225) | def test_eig(self): method test_eigh (line 235) | def test_eigh(self): method test_inv (line 245) | def test_inv(self): method test_lu_factor (line 254) | def test_lu_factor(self): method test_norm (line 265) | def test_norm(self): method test_qr (line 275) | def test_qr(self): method test_solve (line 290) | def test_solve(self): method test_solve_triangular (line 311) | def test_solve_triangular(self): method test_svd (line 327) | def test_svd(self): class LinalgOpsCorrectnessTest (line 343) | class LinalgOpsCorrectnessTest(testing.TestCase): method test_cholesky (line 344) | def test_cholesky(self): method test_cholesky_inverse (line 366) | def test_cholesky_inverse(self, upper): method test_det (line 398) | def test_det(self): method test_eig (line 410) | def test_eig(self): method test_eigh (line 417) | def test_eigh(self): method test_inv (line 424) | def test_inv(self): method test_lu_factor (line 433) | def test_lu_factor(self): method test_norm (line 494) | def test_norm(self, ndim, ord, axis, keepdims): method test_qr (line 535) | def test_qr(self): method test_solve (line 547) | def test_solve(self): method test_solve_triangular (line 554) | def test_solve_triangular(self): method test_svd (line 573) | def test_svd(self): method test_lstsq (line 595) | def test_lstsq(self, b_rank, rcond): class QrOpTest (line 614) | class QrOpTest(testing.TestCase): method test_qr_init_mode_reduced (line 615) | def test_qr_init_mode_reduced(self): method test_qr_init_mode_complete (line 619) | def test_qr_init_mode_complete(self): method test_qr_init_invalid_mode (line 623) | def test_qr_init_invalid_mode(self): method test_compute_output_spec_low_rank (line 633) | def test_compute_output_spec_low_rank(self): method test_compute_output_spec_undefined_dimensions (line 641) | def test_compute_output_spec_undefined_dimensions(self): method test_qr_call_mode_reduced (line 651) | def test_qr_call_mode_reduced(self): method test_qr_call_mode_complete (line 658) | def test_qr_call_mode_complete(self): method test_jvp (line 665) | def test_jvp(self): method test_jvp_symbolic_has_aux_false (line 683) | def test_jvp_symbolic_has_aux_false(self): FILE: keras/src/ops/math.py function _segment_reduce_validation (line 11) | def _segment_reduce_validation(data, segment_ids): class SegmentReduction (line 34) | class SegmentReduction(Operation): method __init__ (line 35) | def __init__(self, num_segments=None, sorted=False, *, name=None): method compute_output_spec (line 40) | def compute_output_spec(self, data, _): class SegmentSum (line 45) | class SegmentSum(SegmentReduction): method call (line 46) | def call(self, data, segment_ids): function segment_sum (line 57) | def segment_sum(data, segment_ids, num_segments=None, sorted=False): class SegmentMax (line 91) | class SegmentMax(SegmentReduction): method call (line 92) | def call(self, data, segment_ids): function segment_max (line 103) | def segment_max(data, segment_ids, num_segments=None, sorted=False): class TopK (line 136) | class TopK(Operation): method __init__ (line 137) | def __init__(self, k, sorted=True, *, name=None): method compute_output_spec (line 142) | def compute_output_spec(self, x): method call (line 151) | def call(self, x): function top_k (line 156) | def top_k(x, k, sorted=True): class InTopK (line 185) | class InTopK(Operation): method __init__ (line 186) | def __init__(self, k, *, name=None): method compute_output_spec (line 190) | def compute_output_spec(self, targets, predictions): method call (line 193) | def call(self, targets, predictions): function in_top_k (line 198) | def in_top_k(targets, predictions, k): class Logsumexp (line 225) | class Logsumexp(Operation): method __init__ (line 226) | def __init__(self, axis=None, keepdims=False, *, name=None): method compute_output_spec (line 231) | def compute_output_spec(self, x): method call (line 235) | def call(self, x): function logsumexp (line 240) | def logsumexp(x, axis=None, keepdims=False): class ExtractSequences (line 266) | class ExtractSequences(Operation): method __init__ (line 267) | def __init__(self, sequence_length, sequence_stride, *, name=None): method compute_output_spec (line 272) | def compute_output_spec(self, x): method call (line 287) | def call(self, x): function extract_sequences (line 296) | def extract_sequences(x, sequence_length, sequence_stride): class FFT (line 330) | class FFT(Operation): method compute_output_spec (line 331) | def compute_output_spec(self, x): method call (line 368) | def call(self, x): function fft (line 373) | def fft(x): class FFT2 (line 398) | class FFT2(Operation): method compute_output_spec (line 399) | def compute_output_spec(self, x): method call (line 437) | def call(self, x): function fft2 (line 442) | def fft2(x): class IFFT2 (line 469) | class IFFT2(Operation): method compute_output_spec (line 470) | def compute_output_spec(self, x): method call (line 508) | def call(self, x): function ifft2 (line 513) | def ifft2(x): class RFFT (line 541) | class RFFT(Operation): method __init__ (line 542) | def __init__(self, fft_length=None, *, name=None): method compute_output_spec (line 546) | def compute_output_spec(self, x): method call (line 568) | def call(self, x): function rfft (line 573) | def rfft(x, fft_length=None): class IRFFT (line 612) | class IRFFT(Operation): method __init__ (line 613) | def __init__(self, fft_length=None, *, name=None): method compute_output_spec (line 617) | def compute_output_spec(self, x): method call (line 649) | def call(self, x): function irfft (line 654) | def irfft(x, fft_length=None): class STFT (line 697) | class STFT(Operation): method __init__ (line 698) | def __init__( method compute_output_spec (line 715) | def compute_output_spec(self, x): method call (line 731) | def call(self, x): function stft (line 743) | def stft( class ISTFT (line 804) | class ISTFT(Operation): method __init__ (line 805) | def __init__( method compute_output_spec (line 824) | def compute_output_spec(self, x): method call (line 857) | def call(self, x): function istft (line 870) | def istft( class Rsqrt (line 936) | class Rsqrt(Operation): method call (line 937) | def call(self, x): method compute_output_spec (line 941) | def compute_output_spec(self, x): function rsqrt (line 946) | def rsqrt(x): class Erf (line 967) | class Erf(Operation): method compute_output_spec (line 968) | def compute_output_spec(self, x): method call (line 971) | def call(self, x): function erf (line 976) | def erf(x): class Erfinv (line 997) | class Erfinv(Operation): method compute_output_spec (line 998) | def compute_output_spec(self, x): method call (line 1001) | def call(self, x): function erfinv (line 1006) | def erfinv(x): class Logdet (line 1027) | class Logdet(Operation): method call (line 1028) | def call(self, x): method compute_output_spec (line 1031) | def compute_output_spec(self, x): function logdet (line 1036) | def logdet(x): class ViewAsComplex (line 1050) | class ViewAsComplex(Operation): method call (line 1051) | def call(self, x): method compute_output_spec (line 1059) | def compute_output_spec(self, x): class ViewAsReal (line 1063) | class ViewAsReal(Operation): method call (line 1064) | def call(self, x): method compute_output_spec (line 1070) | def compute_output_spec(self, x): function view_as_complex (line 1075) | def view_as_complex(x): function view_as_real (line 1116) | def view_as_real(x): FILE: keras/src/ops/math_test.py function _stft (line 17) | def _stft( function _istft (line 57) | def _istft( function _sum_reduce (line 137) | def _sum_reduce(left, right): function _max_reduce (line 141) | def _max_reduce(left, right): class MathOpsDynamicShapeTest (line 145) | class MathOpsDynamicShapeTest(testing.TestCase): method test_segment_reduce (line 147) | def test_segment_reduce(self, segment_reduce_op): method test_top_k (line 167) | def test_top_k(self): method test_in_top_k (line 173) | def test_in_top_k(self): method test_logsumexp (line 180) | def test_logsumexp(self): method test_extract_sequences (line 187) | def test_extract_sequences(self): method test_fft (line 203) | def test_fft(self): method test_fft2 (line 212) | def test_fft2(self): method test_ifft2 (line 221) | def test_ifft2(self): method test_rfft (line 231) | def test_rfft(self, fft_length): method test_irfft (line 240) | def test_irfft(self, fft_length): method test_stft (line 248) | def test_stft(self): method test_istft (line 264) | def test_istft(self): method test_rsqrt (line 282) | def test_rsqrt(self): method test_logdet (line 286) | def test_logdet(self): class MathOpsStaticShapeTest (line 292) | class MathOpsStaticShapeTest(testing.TestCase): method test_segment_reduce (line 298) | def test_segment_reduce(self, segment_reduce_op): method test_segment_reduce_explicit_num_segments (line 311) | def test_segment_reduce_explicit_num_segments(self, segment_reduce_op): method test_topk (line 326) | def test_topk(self): method test_in_top_k (line 332) | def test_in_top_k(self): method test_logsumexp (line 337) | def test_logsumexp(self): method test_extract_sequences (line 342) | def test_extract_sequences(self): method test_fft (line 350) | def test_fft(self): method test_fft2 (line 358) | def test_fft2(self): method test_ifft2 (line 366) | def test_ifft2(self): method test_rfft (line 374) | def test_rfft(self): method test_irfft (line 381) | def test_irfft(self): method test_rsqrt (line 388) | def test_rsqrt(self): method test_stft (line 392) | def test_stft(self): method test_istft (line 406) | def test_istft(self): method test_logdet (line 426) | def test_logdet(self): class MathOpsCorrectnessTest (line 436) | class MathOpsCorrectnessTest(testing.TestCase): method run_segment_reduce_test (line 437) | def run_segment_reduce_test( method test_segment_reduce (line 508) | def test_segment_reduce( method test_segment_reduce_explicit_num_segments (line 562) | def test_segment_reduce_explicit_num_segments( method test_top_k (line 600) | def test_top_k(self): method test_in_top_k (line 626) | def test_in_top_k(self): method test_logsumexp (line 672) | def test_logsumexp(self): method test_extract_sequences (line 682) | def test_extract_sequences(self): method test_fft (line 711) | def test_fft(self): method test_fft2 (line 723) | def test_fft2(self): method test_ifft2 (line 735) | def test_ifft2(self): method test_rfft (line 748) | def test_rfft(self, n): method test_irfft (line 768) | def test_irfft(self, n): method test_stft (line 796) | def test_stft( method test_istft (line 832) | def test_istft( method test_rsqrt (line 901) | def test_rsqrt(self): method test_erf_operation_basic (line 906) | def test_erf_operation_basic(self): method test_erf_operation_dtype (line 919) | def test_erf_operation_dtype(self): method test_erf_operation_edge_cases (line 929) | def test_erf_operation_edge_cases(self): method test_erfinv_operation_basic (line 936) | def test_erfinv_operation_basic(self): method test_erfinv_operation_dtype (line 949) | def test_erfinv_operation_dtype(self): method test_erfinv_operation_edge_cases (line 961) | def test_erfinv_operation_edge_cases(self): method test_logdet (line 970) | def test_logdet(self): class MathDtypeTest (line 984) | class MathDtypeTest(testing.TestCase): class ExtractSequencesOpTest (line 1010) | class ExtractSequencesOpTest(testing.TestCase): method test_extract_sequences_init_length_1_stride_1 (line 1011) | def test_extract_sequences_init_length_1_stride_1(self): method test_extract_sequences_init_length_5_stride_2 (line 1019) | def test_extract_sequences_init_length_5_stride_2(self): method test_compute_output_spec_low_rank (line 1027) | def test_compute_output_spec_low_rank(self): method test_extract_sequences_call (line 1036) | def test_extract_sequences_call(self): method calculate_expected_shape (line 1047) | def calculate_expected_shape( class SegmentSumTest (line 1056) | class SegmentSumTest(testing.TestCase): method test_segment_sum_call (line 1057) | def test_segment_sum_call(self): class SegmentMaxTest (line 1070) | class SegmentMaxTest(testing.TestCase): method test_segment_max_call (line 1071) | def test_segment_max_call(self): class TopKTest (line 1084) | class TopKTest(testing.TestCase): method test_top_k_call_values (line 1085) | def test_top_k_call_values(self): method test_top_k_call_indices (line 1094) | def test_top_k_call_indices(self): class InTopKTest (line 1104) | class InTopKTest(testing.TestCase): method test_in_top_k_call (line 1105) | def test_in_top_k_call(self): class LogsumexpTest (line 1118) | class LogsumexpTest(testing.TestCase): method test_logsumexp_call (line 1119) | def test_logsumexp_call(self): class FFTTest (line 1131) | class FFTTest(testing.TestCase): method test_fft_input_not_tuple_or_list (line 1132) | def test_fft_input_not_tuple_or_list(self): method test_fft_input_parts_different_shapes (line 1139) | def test_fft_input_parts_different_shapes(self): method test_fft_input_not_1d (line 1149) | def test_fft_input_not_1d(self): method test_fft_last_axis_not_fully_defined (line 1156) | def test_fft_last_axis_not_fully_defined(self): class FFT2Test (line 1166) | class FFT2Test(testing.TestCase): method test_fft2_correct_input (line 1167) | def test_fft2_correct_input(self): method test_fft2_incorrect_input_type (line 1174) | def test_fft2_incorrect_input_type(self): method test_fft2_mismatched_shapes (line 1182) | def test_fft2_mismatched_shapes(self): method test_fft2_low_rank (line 1192) | def test_fft2_low_rank(self): method test_fft2_undefined_dimensions (line 1198) | def test_fft2_undefined_dimensions(self): class RFFTTest (line 1208) | class RFFTTest(testing.TestCase): method test_rfft_low_rank_input (line 1209) | def test_rfft_low_rank_input(self): method test_rfft_defined_fft_length (line 1215) | def test_rfft_defined_fft_length(self): method test_rfft_undefined_fft_length_undefined_last_dim (line 1238) | def test_rfft_undefined_fft_length_undefined_last_dim(self): class ISTFTTest (line 1247) | class ISTFTTest(testing.TestCase): method test_istft_incorrect_input_type (line 1248) | def test_istft_incorrect_input_type(self): method test_istft_mismatched_shapes (line 1258) | def test_istft_mismatched_shapes(self): method test_istft_low_rank_input (line 1270) | def test_istft_low_rank_input(self): method test_input_not_tuple_or_list_raises_error (line 1278) | def test_input_not_tuple_or_list_raises_error(self): method test_input_tuple_with_less_than_two_elements_raises_error (line 1286) | def test_input_tuple_with_less_than_two_elements_raises_error(self): method test_input_tuple_with_more_than_two_elements_raises_error (line 1294) | def test_input_tuple_with_more_than_two_elements_raises_error(self): method test_mismatched_shapes_input_validation (line 1306) | def test_mismatched_shapes_input_validation(self): method test_insufficient_rank_input_validation (line 1319) | def test_insufficient_rank_input_validation(self): method test_with_specified_fft_length (line 1329) | def test_with_specified_fft_length(self): method test_inferred_fft_length_with_defined_last_dimension (line 1343) | def test_inferred_fft_length_with_defined_last_dimension(self): method test_undefined_fft_length_and_last_dimension (line 1357) | def test_undefined_fft_length_and_last_dimension(self): class TestMathErrors (line 1369) | class TestMathErrors(testing.TestCase): method test_segment_reduce_no_num_segments (line 1374) | def test_segment_reduce_no_num_segments(self, segment_reduce_op): method test_segment_reduce_sort_and_num_segments (line 1387) | def test_segment_reduce_sort_and_num_segments(self, segment_reduce_op): method test_segment_reduce_multi_dim_segment_ids (line 1398) | def test_segment_reduce_multi_dim_segment_ids(self, segment_reduce_op): method test_segment_reduce_leading_not_match (line 1408) | def test_segment_reduce_leading_not_match(self, segment_reduce_op): method test_stft_invalid_input_type (line 1433) | def test_stft_invalid_input_type(self): method test_invalid_fft_length (line 1442) | def test_invalid_fft_length(self): method test_stft_invalid_window (line 1451) | def test_stft_invalid_window(self): method test_stft_invalid_window_shape (line 1463) | def test_stft_invalid_window_shape(self): method test_stft_invalid_sequence_stride (line 1476) | def test_stft_invalid_sequence_stride(self, sequence_stride): method test_istft_invalid_sequence_stride (line 1486) | def test_istft_invalid_sequence_stride(self, sequence_stride): method test_istft_invalid_window_shape_2D_inputs (line 1495) | def test_istft_invalid_window_shape_2D_inputs(self): class ViewAsComplexRealTest (line 1518) | class ViewAsComplexRealTest(testing.TestCase): method test_view_as_complex_basic (line 1519) | def test_view_as_complex_basic(self): method test_view_as_real_basic (line 1529) | def test_view_as_real_basic(self): method test_view_as_complex_invalid_shape (line 1539) | def test_view_as_complex_invalid_shape(self): method test_view_as_complex_symbolic_input (line 1546) | def test_view_as_complex_symbolic_input(self): method test_view_as_real_symbolic_input (line 1553) | def test_view_as_real_symbolic_input(self): method test_view_as_complex_multi_dimensional (line 1560) | def test_view_as_complex_multi_dimensional(self): method test_view_as_real_multi_dimensional (line 1570) | def test_view_as_real_multi_dimensional(self): FILE: keras/src/ops/nn.py class Relu (line 20) | class Relu(Operation): method call (line 21) | def call(self, x): method compute_output_spec (line 24) | def compute_output_spec(self, x): function relu (line 29) | def relu(x): class Relu6 (line 51) | class Relu6(Operation): method call (line 52) | def call(self, x): method compute_output_spec (line 55) | def compute_output_spec(self, x): function relu6 (line 60) | def relu6(x): class Sigmoid (line 82) | class Sigmoid(Operation): method call (line 83) | def call(self, x): method compute_output_spec (line 86) | def compute_output_spec(self, x): function sigmoid (line 91) | def sigmoid(x): class SparseSigmoid (line 114) | class SparseSigmoid(Operation): method call (line 115) | def call(self, x): method compute_output_spec (line 118) | def compute_output_spec(self, x): function sparse_sigmoid (line 123) | def sparse_sigmoid(x): class Softplus (line 150) | class Softplus(Operation): method call (line 151) | def call(self, x): method compute_output_spec (line 154) | def compute_output_spec(self, x): function softplus (line 159) | def softplus(x): class Softsign (line 183) | class Softsign(Operation): method call (line 184) | def call(self, x): method compute_output_spec (line 187) | def compute_output_spec(self, x): function softsign (line 192) | def softsign(x): class SoftShrink (line 215) | class SoftShrink(Operation): method __init__ (line 216) | def __init__(self, threshold=0.5, *, name=None): method call (line 220) | def call(self, x): method compute_output_spec (line 223) | def compute_output_spec(self, x): function soft_shrink (line 228) | def soft_shrink(x, threshold=0.5): class SparsePlus (line 257) | class SparsePlus(Operation): method call (line 258) | def call(self, x): method compute_output_spec (line 261) | def compute_output_spec(self, x): function sparse_plus (line 266) | def sparse_plus(x): class Silu (line 295) | class Silu(Operation): method call (line 296) | def call(self, x): method compute_output_spec (line 299) | def compute_output_spec(self, x): function silu (line 311) | def silu(x): class Squareplus (line 337) | class Squareplus(Operation): method __init__ (line 338) | def __init__(self, b=4, *, name=None): method call (line 342) | def call(self, x): method compute_output_spec (line 345) | def compute_output_spec(self, x): function squareplus (line 350) | def squareplus(x, b=4): class LogSigmoid (line 377) | class LogSigmoid(Operation): method call (line 378) | def call(self, x): method compute_output_spec (line 381) | def compute_output_spec(self, x): function log_sigmoid (line 391) | def log_sigmoid(x): class LeakyRelu (line 414) | class LeakyRelu(Operation): method __init__ (line 415) | def __init__(self, negative_slope=0.2, *, name=None): method call (line 419) | def call(self, x): method compute_output_spec (line 422) | def compute_output_spec(self, x): function leaky_relu (line 427) | def leaky_relu(x, negative_slope=0.2): class HardSigmoid (line 455) | class HardSigmoid(Operation): method call (line 456) | def call(self, x): method compute_output_spec (line 459) | def compute_output_spec(self, x): function hard_sigmoid (line 469) | def hard_sigmoid(x): class HardSilu (line 495) | class HardSilu(Operation): method call (line 496) | def call(self, x): method compute_output_spec (line 499) | def compute_output_spec(self, x): function hard_silu (line 511) | def hard_silu(x): class Elu (line 540) | class Elu(Operation): method __init__ (line 541) | def __init__(self, alpha=1.0, *, name=None): method call (line 545) | def call(self, x): method compute_output_spec (line 548) | def compute_output_spec(self, x): function elu (line 553) | def elu(x, alpha=1.0): class Selu (line 580) | class Selu(Operation): method call (line 581) | def call(self, x): method compute_output_spec (line 584) | def compute_output_spec(self, x): function selu (line 589) | def selu(x): class Gelu (line 616) | class Gelu(Operation): method __init__ (line 617) | def __init__(self, approximate=True, *, name=None): method call (line 621) | def call(self, x): method compute_output_spec (line 624) | def compute_output_spec(self, x): function gelu (line 629) | def gelu(x, approximate=True): class Celu (line 659) | class Celu(Operation): method __init__ (line 660) | def __init__(self, alpha=1.0, *, name=None): method call (line 664) | def call(self, x): method compute_output_spec (line 667) | def compute_output_spec(self, x): function celu (line 672) | def celu(x, alpha=1.0): class Glu (line 699) | class Glu(Operation): method __init__ (line 700) | def __init__(self, axis=-1, *, name=None): method call (line 704) | def call(self, x): method compute_output_spec (line 707) | def compute_output_spec(self, x): function glu (line 720) | def glu(x, axis=-1): class TanhShrink (line 748) | class TanhShrink(Operation): method call (line 749) | def call(self, x): method compute_output_spec (line 752) | def compute_output_spec(self, x): function tanh_shrink (line 757) | def tanh_shrink(x): class HardTanh (line 784) | class HardTanh(Operation): method call (line 785) | def call(self, x): method compute_output_spec (line 788) | def compute_output_spec(self, x): function hard_tanh (line 793) | def hard_tanh(x): class HardShrink (line 820) | class HardShrink(Operation): method __init__ (line 821) | def __init__(self, threshold=0.5, *, name=None): method call (line 825) | def call(self, x): method compute_output_spec (line 828) | def compute_output_spec(self, x): function hard_shrink (line 833) | def hard_shrink(x, threshold=0.5): class Threshold (line 861) | class Threshold(Operation): method __init__ (line 862) | def __init__(self, threshold, default_value, *, name=None): method call (line 867) | def call(self, x): method compute_output_spec (line 870) | def compute_output_spec(self, x): function threshold (line 875) | def threshold(x, threshold, default_value): class Softmax (line 903) | class Softmax(Operation): method __init__ (line 904) | def __init__(self, axis=-1, *, name=None): method call (line 908) | def call(self, x): method compute_output_spec (line 911) | def compute_output_spec(self, x): function softmax (line 916) | def softmax(x, axis=-1): class LogSoftmax (line 977) | class LogSoftmax(Operation): method __init__ (line 978) | def __init__(self, axis=-1, *, name=None): method call (line 982) | def call(self, x): method compute_output_spec (line 985) | def compute_output_spec(self, x): function log_softmax (line 995) | def log_softmax(x, axis=-1): class Sparsemax (line 1040) | class Sparsemax(Operation): method __init__ (line 1041) | def __init__(self, axis=-1, *, name=None): method call (line 1045) | def call(self, x): method compute_output_spec (line 1048) | def compute_output_spec(self, x): function sparsemax (line 1053) | def sparsemax(x, axis=-1): class MaxPool (line 1082) | class MaxPool(Operation): method __init__ (line 1083) | def __init__( method call (line 1098) | def call(self, inputs): method compute_output_spec (line 1107) | def compute_output_spec(self, inputs): function max_pool (line 1119) | def max_pool( class AdaptiveMaxPool (line 1170) | class AdaptiveMaxPool(Operation): method __init__ (line 1173) | def __init__(self, output_size, data_format=None, *, name=None): method call (line 1178) | def call(self, inputs): method compute_output_spec (line 1183) | def compute_output_spec(self, inputs): function adaptive_max_pool (line 1198) | def adaptive_max_pool( class AveragePool (line 1251) | class AveragePool(Operation): method __init__ (line 1252) | def __init__( method call (line 1267) | def call(self, inputs): method compute_output_spec (line 1276) | def compute_output_spec(self, inputs): function average_pool (line 1293) | def average_pool( class AdaptiveAveragePool (line 1346) | class AdaptiveAveragePool(Operation): method __init__ (line 1349) | def __init__(self, output_size, data_format=None, *, name=None): method call (line 1354) | def call(self, inputs): method compute_output_spec (line 1359) | def compute_output_spec(self, inputs): function adaptive_average_pool (line 1376) | def adaptive_average_pool( class Conv (line 1432) | class Conv(Operation): method __init__ (line 1433) | def __init__( method call (line 1448) | def call(self, inputs, kernel): method compute_output_spec (line 1458) | def compute_output_spec(self, inputs, kernel): function conv (line 1472) | def conv( class DepthwiseConv (line 1527) | class DepthwiseConv(Operation): method __init__ (line 1528) | def __init__( method call (line 1543) | def call(self, inputs, kernel): method compute_output_spec (line 1553) | def compute_output_spec(self, inputs, kernel): function depthwise_conv (line 1572) | def depthwise_conv( class SeparableConv (line 1632) | class SeparableConv(Operation): method __init__ (line 1633) | def __init__( method call (line 1648) | def call(self, inputs, depthwise_kernel, pointwise_kernel): method compute_output_spec (line 1659) | def compute_output_spec(self, inputs, depthwise_kernel, pointwise_kern... function separable_conv (line 1683) | def separable_conv( class ConvTranspose (line 1752) | class ConvTranspose(Operation): method __init__ (line 1753) | def __init__( method call (line 1770) | def call( method compute_output_spec (line 1785) | def compute_output_spec(self, inputs, kernel): function conv_transpose (line 1807) | def conv_transpose( class OneHot (line 1876) | class OneHot(Operation): method __init__ (line 1877) | def __init__( method call (line 1886) | def call(self, x): method compute_output_spec (line 1895) | def compute_output_spec(self, x): function one_hot (line 1910) | def one_hot(x, num_classes, axis=-1, dtype=None, sparse=False): class BinaryCrossentropy (line 1958) | class BinaryCrossentropy(Operation): method __init__ (line 1959) | def __init__(self, from_logits=False, *, name=None): method call (line 1963) | def call(self, target, output): method compute_output_spec (line 1968) | def compute_output_spec(self, target, output): function binary_crossentropy (line 1984) | def binary_crossentropy(target, output, from_logits=False): class CategoricalCrossentropy (line 2025) | class CategoricalCrossentropy(Operation): method __init__ (line 2026) | def __init__(self, from_logits=False, axis=-1, *, name=None): method call (line 2031) | def call(self, target, output): method compute_output_spec (line 2036) | def compute_output_spec(self, target, output): function categorical_crossentropy (line 2058) | def categorical_crossentropy(target, output, from_logits=False, axis=-1): class SparseCategoricalCrossentropy (line 2109) | class SparseCategoricalCrossentropy(Operation): method __init__ (line 2110) | def __init__(self, from_logits=False, axis=-1, *, name=None): method call (line 2115) | def call(self, target, output): method compute_output_spec (line 2120) | def compute_output_spec(self, target, output): function sparse_categorical_crossentropy (line 2145) | def sparse_categorical_crossentropy(target, output, from_logits=False, a... class MultiHot (line 2194) | class MultiHot(Operation): method __init__ (line 2195) | def __init__( method call (line 2215) | def call(self, inputs): method compute_output_spec (line 2223) | def compute_output_spec(self, inputs): function multi_hot (line 2249) | def multi_hot( class Moments (line 2289) | class Moments(Operation): method __init__ (line 2290) | def __init__(self, axes, keepdims=False, synchronized=False, *, name=N... method call (line 2296) | def call(self, x): method compute_output_spec (line 2304) | def compute_output_spec(self, x): function moments (line 2323) | def moments(x, axes, keepdims=False, synchronized=False): class BatchNorm (line 2359) | class BatchNorm(Operation): method __init__ (line 2360) | def __init__(self, axis, epsilon=1e-3, *, name=None): method call (line 2365) | def call(self, x, mean, variance, offset=None, scale=None): method _check_shape (line 2376) | def _check_shape(self, name, shape, expected_shape): method compute_output_spec (line 2384) | def compute_output_spec(self, x, mean, variance, offset, scale): function batch_normalization (line 2401) | def batch_normalization( class CTCLoss (line 2454) | class CTCLoss(Operation): method __init__ (line 2455) | def __init__(self, mask_index=0, *, name=None): method call (line 2459) | def call(self, target, output, target_length, output_length): method _check_shape_first_dim (line 2464) | def _check_shape_first_dim(self, name1, shape1, name2, shape2): method compute_output_spec (line 2472) | def compute_output_spec(self, target, output, target_length, output_le... function ctc_loss (line 2492) | def ctc_loss(target, output, target_length, output_length, mask_index=0): class CTCDecode (line 2517) | class CTCDecode(Operation): method __init__ (line 2518) | def __init__( method call (line 2535) | def call(self, inputs, sequence_lengths): method compute_output_spec (line 2546) | def compute_output_spec(self, inputs, sequence_lengths): function ctc_decode (line 2567) | def ctc_decode( class Normalize (line 2628) | class Normalize(Operation): method __init__ (line 2629) | def __init__(self, axis=-1, order=2, epsilon=None, *, name=None): method compute_output_spec (line 2635) | def compute_output_spec(self, x): method call (line 2638) | def call(self, x): function normalize (line 2650) | def normalize(x, axis=-1, order=2, epsilon=None): function _normalize (line 2683) | def _normalize(x, axis=-1, order=2, epsilon=None): class PSNR (line 2707) | class PSNR(Operation): method __init__ (line 2708) | def __init__( method call (line 2717) | def call(self, x1, x2): method compute_output_spec (line 2724) | def compute_output_spec(self, x1, x2): function psnr (line 2737) | def psnr( class DotProductAttention (line 2782) | class DotProductAttention(Operation): method __init__ (line 2783) | def __init__( method call (line 2796) | def call( method compute_output_spec (line 2817) | def compute_output_spec( function dot_product_attention (line 2833) | def dot_product_attention( class RMSNorm (line 2937) | class RMSNorm(Operation): method __init__ (line 2938) | def __init__(self, axis=-1, epsilon=None, *, name=None): method compute_output_spec (line 2943) | def compute_output_spec(self, x, scale): method call (line 2946) | def call(self, x, scale=None): function rms_normalization (line 2958) | def rms_normalization(x, scale=None, axis=-1, epsilon=None): function _rms_normalization (line 2992) | def _rms_normalization(x, scale=None, axis=-1, epsilon=None): class LayerNorm (line 3029) | class LayerNorm(Operation): method __init__ (line 3030) | def __init__(self, axis=-1, epsilon=None, rms_scaling=False, *, name=N... method compute_output_spec (line 3036) | def compute_output_spec(self, x, gamma, beta): method call (line 3039) | def call(self, x, gamma=None, beta=None): function layer_normalization (line 3056) | def layer_normalization( function _layer_normalization (line 3108) | def _layer_normalization( class Polar (line 3170) | class Polar(Operation): method compute_output_spec (line 3171) | def compute_output_spec(self, abs_, angle): method call (line 3174) | def call(self, abs_, angle): function polar (line 3179) | def polar(abs_, angle): function _polar (line 3215) | def _polar(abs_, angle): class Unfold (line 3237) | class Unfold(Operation): method __init__ (line 3238) | def __init__( method compute_output_spec (line 3247) | def compute_output_spec(self, x): method call (line 3265) | def call(self, x): function unfold (line 3272) | def unfold(x, kernel_size, dilation=1, padding=0, stride=1): function _unfold (line 3316) | def _unfold(x, kernel_size, dilation=1, padding=0, stride=1): class Fold (line 3327) | class Fold(Operation): method __init__ (line 3328) | def __init__( method compute_output_spec (line 3345) | def compute_output_spec(self, x): method call (line 3363) | def call(self, x): function fold (line 3375) | def fold(x, output_size, kernel_size, dilation=1, padding=0, stride=1): class DepthToSpace (line 3433) | class DepthToSpace(Operation): method __init__ (line 3434) | def __init__(self, block_size, data_format="channels_last", *, name=No... method compute_output_spec (line 3439) | def compute_output_spec(self, x): method call (line 3467) | def call(self, x): function depth_to_space (line 3474) | def depth_to_space(x, block_size, data_format="channels_last"): class SpaceToDepth (line 3532) | class SpaceToDepth(Operation): method __init__ (line 3533) | def __init__(self, block_size, data_format="channels_last", *, name=No... method compute_output_spec (line 3538) | def compute_output_spec(self, x): method call (line 3571) | def call(self, x): function space_to_depth (line 3578) | def space_to_depth(x, block_size, data_format="channels_last"): FILE: keras/src/ops/nn_test.py function _dot_product_attention (line 39) | def _dot_product_attention( class NNOpsDynamicShapeTest (line 90) | class NNOpsDynamicShapeTest(testing.TestCase): method test_relu (line 91) | def test_relu(self): method test_relu6 (line 95) | def test_relu6(self): method test_sigmoid (line 99) | def test_sigmoid(self): method test_sparse_sigmoid (line 103) | def test_sparse_sigmoid(self): method test_softplus (line 107) | def test_softplus(self): method test_softsign (line 111) | def test_softsign(self): method test_silu (line 115) | def test_silu(self): method test_log_sigmoid (line 119) | def test_log_sigmoid(self): method test_leaky_relu (line 123) | def test_leaky_relu(self): method test_hard_sigmoid (line 127) | def test_hard_sigmoid(self): method test_hard_silu (line 131) | def test_hard_silu(self): method test_elu (line 135) | def test_elu(self): method test_selu (line 139) | def test_selu(self): method test_gelu (line 143) | def test_gelu(self): method test_celu (line 147) | def test_celu(self): method test_glu (line 151) | def test_glu(self): method test_tanh_shrink (line 155) | def test_tanh_shrink(self): method test_hard_tanh (line 159) | def test_hard_tanh(self): method test_hard_shrink (line 163) | def test_hard_shrink(self): method test_threshld (line 167) | def test_threshld(self): method test_squareplus (line 171) | def test_squareplus(self): method test_soft_shrink (line 175) | def test_soft_shrink(self): method test_sparse_plus (line 179) | def test_sparse_plus(self): method test_softmax (line 183) | def test_softmax(self): method test_softmax_in_graph (line 189) | def test_softmax_in_graph(self): method test_log_softmax (line 205) | def test_log_softmax(self): method test_sparsemax (line 211) | def test_sparsemax(self): method test_max_pool (line 215) | def test_max_pool(self): method test_average_pool (line 258) | def test_average_pool(self): method test_multi_hot (line 304) | def test_multi_hot(self): method test_multi_hot_dtype (line 314) | def test_multi_hot_dtype(self, dtype, sparse): method test_conv (line 323) | def test_conv(self): method test_depthwise_conv (line 459) | def test_depthwise_conv(self): method test_separable_conv (line 539) | def test_separable_conv(self): method test_conv_transpose (line 607) | def test_conv_transpose(self): method test_one_hot (line 663) | def test_one_hot(self): method test_one_hot_dtype (line 673) | def test_one_hot_dtype(self, dtype, sparse): method test_moments (line 682) | def test_moments(self): method test_batch_normalization (line 696) | def test_batch_normalization(self): method test_ctc_decode (line 744) | def test_ctc_decode(self): method test_normalize (line 761) | def test_normalize(self): method test_psnr (line 765) | def test_psnr(self): method test_dot_product_attention (line 771) | def test_dot_product_attention(self): method test_rms_normalization (line 778) | def test_rms_normalization(self): method test_layer_normalization (line 784) | def test_layer_normalization(self): class NNOpsStaticShapeTest (line 792) | class NNOpsStaticShapeTest(testing.TestCase): method test_relu (line 793) | def test_relu(self): method test_relu6 (line 797) | def test_relu6(self): method test_sigmoid (line 801) | def test_sigmoid(self): method test_sparse_sigmoid (line 805) | def test_sparse_sigmoid(self): method test_softplus (line 809) | def test_softplus(self): method test_softsign (line 813) | def test_softsign(self): method test_silu (line 817) | def test_silu(self): method test_log_sigmoid (line 821) | def test_log_sigmoid(self): method test_leaky_relu (line 825) | def test_leaky_relu(self): method test_hard_sigmoid (line 829) | def test_hard_sigmoid(self): method test_hard_silu (line 833) | def test_hard_silu(self): method test_elu (line 837) | def test_elu(self): method test_selu (line 841) | def test_selu(self): method test_gelu (line 845) | def test_gelu(self): method test_celu (line 849) | def test_celu(self): method test_glu (line 853) | def test_glu(self): method test_tanh_shrink (line 857) | def test_tanh_shrink(self): method test_hard_tanh (line 861) | def test_hard_tanh(self): method test_hard_shrink (line 865) | def test_hard_shrink(self): method test_threshold (line 869) | def test_threshold(self): method test_squareplus (line 873) | def test_squareplus(self): method test_soft_shrink (line 877) | def test_soft_shrink(self): method test_sparse_plus (line 881) | def test_sparse_plus(self): method test_softmax (line 885) | def test_softmax(self): method test_log_softmax (line 891) | def test_log_softmax(self): method test_sparsemax (line 897) | def test_sparsemax(self): method test_max_pool (line 901) | def test_max_pool(self): method test_average_pool (line 935) | def test_average_pool(self): method test_conv (line 969) | def test_conv(self): method test_depthwise_conv (line 1049) | def test_depthwise_conv(self): method test_separable_conv (line 1097) | def test_separable_conv(self): method test_conv_transpose (line 1153) | def test_conv_transpose(self): method test_batched_and_unbatched_inputs_multi_hot (line 1201) | def test_batched_and_unbatched_inputs_multi_hot(self): method test_one_hot (line 1213) | def test_one_hot(self): method test_binary_crossentropy (line 1220) | def test_binary_crossentropy(self): method test_categorical_crossentropy (line 1225) | def test_categorical_crossentropy(self): method test_sparse_categorical_crossentropy (line 1230) | def test_sparse_categorical_crossentropy(self): method test_moments (line 1237) | def test_moments(self): method test_batch_normalization (line 1245) | def test_batch_normalization(self): method test_ctc_loss (line 1267) | def test_ctc_loss(self): method test_ctc_decode (line 1274) | def test_ctc_decode(self): method test_normalize (line 1291) | def test_normalize(self): method test_psnr (line 1295) | def test_psnr(self): method test_dot_product_attention (line 1301) | def test_dot_product_attention(self): method test_rms_normalization (line 1308) | def test_rms_normalization(self): method test_layer_normalization (line 1313) | def test_layer_normalization(self): method test_polar (line 1319) | def test_polar(self): class NNOpsCorrectnessTest (line 1326) | class NNOpsCorrectnessTest(testing.TestCase): method test_dot_product_attention_inside_scan (line 1328) | def test_dot_product_attention_inside_scan(self): method test_relu (line 1354) | def test_relu(self): method test_relu6 (line 1358) | def test_relu6(self): method test_sigmoid (line 1362) | def test_sigmoid(self): method test_sparse_sigmoid (line 1368) | def test_sparse_sigmoid(self): method test_softplus (line 1372) | def test_softplus(self): method test_softsign (line 1379) | def test_softsign(self): method test_silu (line 1383) | def test_silu(self): method test_log_sigmoid (line 1390) | def test_log_sigmoid(self): method test_leaky_relu (line 1397) | def test_leaky_relu(self): method test_hard_sigmoid (line 1404) | def test_hard_sigmoid(self): method test_hard_silu (line 1411) | def test_hard_silu(self): method test_elu (line 1418) | def test_elu(self): method test_selu (line 1429) | def test_selu(self): method test_gelu (line 1436) | def test_gelu(self): method test_celu (line 1443) | def test_celu(self): method test_glu (line 1450) | def test_glu(self): method test_tanh_shrink (line 1457) | def test_tanh_shrink(self): method test_hard_tanh (line 1464) | def test_hard_tanh(self): method test_hard_shrink (line 1471) | def test_hard_shrink(self): method test_threshold (line 1478) | def test_threshold(self): method test_squareplus (line 1485) | def test_squareplus(self): method test_soft_shrink (line 1492) | def test_soft_shrink(self): method test_sparse_plus (line 1499) | def test_sparse_plus(self): method test_softmax (line 1506) | def test_softmax(self): method test_softmax_correctness_with_axis_tuple (line 1531) | def test_softmax_correctness_with_axis_tuple(self): method test_log_softmax (line 1541) | def test_log_softmax(self): method test_log_softmax_correctness_with_axis_tuple (line 1572) | def test_log_softmax_correctness_with_axis_tuple(self): method test_polar_corectness (line 1582) | def test_polar_corectness(self): method test_sparsemax (line 1590) | def test_sparsemax(self): method test_max_pool (line 1597) | def test_max_pool(self): method test_average_pool_valid_padding (line 1629) | def test_average_pool_valid_padding(self): method test_average_pool_same_padding (line 1653) | def test_average_pool_same_padding(self): method test_conv_1d (line 1695) | def test_conv_1d(self, strides, padding, dilation_rate): method test_conv_2d (line 1726) | def test_conv_2d(self, strides, padding): method test_conv_2d_group_2 (line 1748) | def test_conv_2d_group_2(self, strides, dilation_rate): method test_conv_3d (line 1786) | def test_conv_3d(self, strides, padding, data_format): method test_depthwise_conv_2d (line 1841) | def test_depthwise_conv_2d(self, strides, padding, dilation_rate): method test_separable_conv_2d (line 1880) | def test_separable_conv_2d(self, strides, padding, dilation_rate): method test_conv_transpose_1d (line 1928) | def test_conv_transpose_1d(self, padding): method test_conv_transpose_2d (line 1949) | def test_conv_transpose_2d(self, strides, padding): method test_one_hot (line 1978) | def test_one_hot(self, sparse): method test_binary_crossentropy (line 2039) | def test_binary_crossentropy(self): method test_categorical_crossentropy (line 2067) | def test_categorical_crossentropy(self): method test_sparse_categorical_crossentropy (line 2113) | def test_sparse_categorical_crossentropy(self): method test_multi_hot (line 2133) | def test_multi_hot(self, sparse): method test_moments (line 2158) | def test_moments(self): method test_moments_sync (line 2204) | def test_moments_sync(self): method test_moments_sync_with_distribution_strategy (line 2234) | def test_moments_sync_with_distribution_strategy(self, dtype): method test_batch_normalization (line 2272) | def test_batch_normalization(self): method test_ctc_loss (line 2310) | def test_ctc_loss(self): method test_ctc_decode (line 2330) | def test_ctc_decode(self): method test_normalize (line 2406) | def test_normalize(self): method test_psnr (line 2444) | def test_psnr(self): method test_dot_product_attention (line 2471) | def test_dot_product_attention( method test_rms_normalization (line 2584) | def test_rms_normalization(self, scale): method test_layer_normalization (line 2597) | def test_layer_normalization(self): class NNOpsDtypeTest (line 2609) | class NNOpsDtypeTest(testing.TestCase): method test_elu (line 2615) | def test_elu(self, dtype): method test_gelu (line 2633) | def test_gelu(self, dtype): method test_celu (line 2664) | def test_celu(self, dtype): method test_tanh_shrink (line 2682) | def test_tanh_shrink(self, dtype): method test_hard_tanh (line 2700) | def test_hard_tanh(self, dtype): method test_hard_shrink (line 2718) | def test_hard_shrink(self, dtype): method test_threshold (line 2736) | def test_threshold(self, dtype): method test_soft_shrink (line 2754) | def test_soft_shrink(self, dtype): method test_sparse_plus (line 2772) | def test_sparse_plus(self, dtype): method test_glu (line 2790) | def test_glu(self, dtype): method test_squareplus (line 2808) | def test_squareplus(self, dtype): method test_hard_sigmoid (line 2826) | def test_hard_sigmoid(self, dtype): method test_hard_silu (line 2844) | def test_hard_silu(self, dtype): method test_leaky_relu (line 2862) | def test_leaky_relu(self, dtype): method test_log_sigmoid (line 2880) | def test_log_sigmoid(self, dtype): method test_log_softmax (line 2898) | def test_log_softmax(self, dtype): method test_relu (line 2916) | def test_relu(self, dtype): method test_relu6 (line 2934) | def test_relu6(self, dtype): method test_selu (line 2952) | def test_selu(self, dtype): method test_sigmoid (line 2970) | def test_sigmoid(self, dtype): method test_sparse_sigmoid (line 2988) | def test_sparse_sigmoid(self, dtype): method test_silu (line 3006) | def test_silu(self, dtype): method test_softplus (line 3024) | def test_softplus(self, dtype): method test_softmax (line 3042) | def test_softmax(self, dtype): method test_softsign (line 3060) | def test_softsign(self, dtype): method test_polar (line 3078) | def test_polar(self, dtype): method test_ctc_loss (line 3096) | def test_ctc_loss(self, dtype): method test_ctc_decode (line 3123) | def test_ctc_decode(self, dtype): method test_dot_product_attention (line 3163) | def test_dot_product_attention(self, dtypes): method test_rms_normalization (line 3183) | def test_rms_normalization(self, dtypes): method test_layer_normalization (line 3197) | def test_layer_normalization(self, dtypes): class NNOpsBehaviorTest (line 3212) | class NNOpsBehaviorTest(testing.TestCase): method test_logit_recovery_binary_crossentropy (line 3213) | def test_logit_recovery_binary_crossentropy(self): method test_softmax_on_axis_with_size_one_warns (line 3228) | def test_softmax_on_axis_with_size_one_warns(self): method test_normalize_order_validation (line 3245) | def test_normalize_order_validation(self): method test_check_shape_first_dim_mismatch (line 3270) | def test_check_shape_first_dim_mismatch(self): method test_invalid_strategy_ctc_decode (line 3281) | def test_invalid_strategy_ctc_decode(self): method test_layer_normalization_rms_scaling_warning (line 3302) | def test_layer_normalization_rms_scaling_warning(self): method test_unfold (line 3309) | def test_unfold(self): method test_fold (line 3500) | def test_fold(self): method test_fold_tuple_params (line 3569) | def test_fold_tuple_params(self): method test_fold_no_padding (line 3610) | def test_fold_no_padding(self): method test_fold_non_square_output (line 3624) | def test_fold_non_square_output(self): method test_fold_batch_and_channels (line 3632) | def test_fold_batch_and_channels(self): method test_fold_divisibility_validation (line 3640) | def test_fold_divisibility_validation(self): method test_depth_to_space (line 3647) | def test_depth_to_space(self): method test_space_to_depth (line 3686) | def test_space_to_depth(self): method test_depth_to_space_space_to_depth_roundtrip (line 3727) | def test_depth_to_space_space_to_depth_roundtrip(self): method test_depth_to_space_block_size_validation (line 3749) | def test_depth_to_space_block_size_validation(self): method test_space_to_depth_block_size_validation (line 3769) | def test_space_to_depth_block_size_validation(self): FILE: keras/src/ops/node.py class Node (line 8) | class Node: method __init__ (line 40) | def __init__( method __repr__ (line 84) | def __repr__(self): method input_tensors (line 88) | def input_tensors(self): method output_tensors (line 92) | def output_tensors(self): method parent_nodes (line 96) | def parent_nodes(self): class KerasHistory (line 111) | class KerasHistory( function is_keras_tensor (line 142) | def is_keras_tensor(obj): FILE: keras/src/ops/node_test.py class DummyLayer (line 9) | class DummyLayer(Layer): class NodeTest (line 13) | class NodeTest(testing.TestCase): method test_simple_case (line 15) | def test_simple_case(self): method test_single_wired_layers (line 27) | def test_single_wired_layers(self): method test_output_tensor_error (line 60) | def test_output_tensor_error(self): FILE: keras/src/ops/numpy.py class Rot90 (line 19) | class Rot90(Operation): method __init__ (line 20) | def __init__(self, k=1, axes=(0, 1), *, name=None): method call (line 25) | def call(self, array): method compute_output_spec (line 28) | def compute_output_spec(self, array): function rot90 (line 49) | def rot90(array, k=1, axes=(0, 1)): function shape_equal (line 88) | def shape_equal(shape1, shape2, axis=None, allow_none=True): class Absolute (line 146) | class Absolute(Operation): method call (line 147) | def call(self, x): method compute_output_spec (line 150) | def compute_output_spec(self, x): function absolute (line 156) | def absolute(x): class Abs (line 178) | class Abs(Absolute): function abs (line 183) | def abs(x): class Add (line 188) | class Add(Operation): method call (line 189) | def call(self, x1, x2): method compute_output_spec (line 192) | def compute_output_spec(self, x1, x2): function add (line 209) | def add(x1, x2): class All (line 240) | class All(Operation): method __init__ (line 241) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 249) | def call(self, x): method compute_output_spec (line 256) | def compute_output_spec(self, x): function all (line 268) | def all(x, axis=None, keepdims=False): class AllClose (line 304) | class AllClose(Operation): method __init__ (line 305) | def __init__(self, rtol=1e-05, atol=1e-08, equal_nan=False, *, name=No... method call (line 311) | def call(self, x1, x2): method compute_output_spec (line 320) | def compute_output_spec(self, x1, x2): function allclose (line 325) | def allclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False): class Angle (line 354) | class Angle(Operation): method call (line 355) | def call(self, x): method compute_output_spec (line 358) | def compute_output_spec(self, x): function angle (line 368) | def angle(x): class Any (line 389) | class Any(Operation): method __init__ (line 390) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 398) | def call(self, x): method compute_output_spec (line 405) | def compute_output_spec(self, x): function any (line 417) | def any(x, axis=None, keepdims=False): class Amax (line 453) | class Amax(Operation): method __init__ (line 454) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 461) | def call(self, x): method compute_output_spec (line 468) | def compute_output_spec(self, x): function amax (line 476) | def amax(x, axis=None, keepdims=False): class Amin (line 512) | class Amin(Operation): method __init__ (line 513) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 520) | def call(self, x): method compute_output_spec (line 523) | def compute_output_spec(self, x): function amin (line 531) | def amin(x, axis=None, keepdims=False): class Append (line 567) | class Append(Operation): method __init__ (line 568) | def __init__(self, axis=None, *, name=None): method call (line 572) | def call(self, x1, x2): method compute_output_spec (line 575) | def compute_output_spec(self, x1, x2): function append (line 602) | def append( class Arange (line 643) | class Arange(Operation): method __init__ (line 644) | def __init__(self, dtype=None, *, name=None): method call (line 648) | def call(self, start, stop=None, step=None): method compute_output_spec (line 651) | def compute_output_spec(self, start, stop=None, step=None): function arange (line 669) | def arange(start, stop=None, step=None, dtype=None): class Arccos (line 720) | class Arccos(Operation): method call (line 721) | def call(self, x): method compute_output_spec (line 724) | def compute_output_spec(self, x): function arccos (line 734) | def arccos(x): class Arccosh (line 756) | class Arccosh(Operation): method call (line 757) | def call(self, x): method compute_output_spec (line 760) | def compute_output_spec(self, x): function arccosh (line 770) | def arccosh(x): class Arcsin (line 789) | class Arcsin(Operation): method call (line 790) | def call(self, x): method compute_output_spec (line 793) | def compute_output_spec(self, x): function arcsin (line 804) | def arcsin(x): class Arcsinh (line 824) | class Arcsinh(Operation): method call (line 825) | def call(self, x): method compute_output_spec (line 828) | def compute_output_spec(self, x): function arcsinh (line 839) | def arcsinh(x): class Arctan (line 858) | class Arctan(Operation): method call (line 859) | def call(self, x): method compute_output_spec (line 862) | def compute_output_spec(self, x): function arctan (line 873) | def arctan(x): class Arctan2 (line 893) | class Arctan2(Operation): method call (line 894) | def call(self, x1, x2): method compute_output_spec (line 897) | def compute_output_spec(self, x1, x2): function arctan2 (line 912) | def arctan2(x1, x2): class Arctanh (line 955) | class Arctanh(Operation): method call (line 956) | def call(self, x): method compute_output_spec (line 959) | def compute_output_spec(self, x): function arctanh (line 970) | def arctanh(x): class Argmax (line 989) | class Argmax(Operation): method __init__ (line 990) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 995) | def call(self, x): method compute_output_spec (line 998) | def compute_output_spec(self, x): function argmax (line 1009) | def argmax(x, axis=None, keepdims=False): class Argmin (line 1040) | class Argmin(Operation): method __init__ (line 1041) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 1046) | def call(self, x): method compute_output_spec (line 1049) | def compute_output_spec(self, x): function argmin (line 1060) | def argmin(x, axis=None, keepdims=False): class Argsort (line 1091) | class Argsort(Operation): method __init__ (line 1092) | def __init__(self, axis=-1, *, name=None): method call (line 1096) | def call(self, x): method compute_output_spec (line 1099) | def compute_output_spec(self, x): function argsort (line 1106) | def argsort(x, axis=-1): class Array (line 1143) | class Array(Operation): method __init__ (line 1144) | def __init__(self, dtype=None, *, name=None): method call (line 1148) | def call(self, x): method compute_output_spec (line 1151) | def compute_output_spec(self, x, dtype=None): function array (line 1161) | def array(x, dtype=None): class View (line 1184) | class View(Operation): method __init__ (line 1185) | def __init__(self, dtype=None, *, name=None): method call (line 1189) | def call(self, x): method compute_output_spec (line 1192) | def compute_output_spec(self, x): function view (line 1223) | def view(x, dtype=None): class Average (line 1247) | class Average(Operation): method __init__ (line 1248) | def __init__(self, axis=None, *, name=None): method call (line 1254) | def call(self, x, weights=None): method compute_output_spec (line 1257) | def compute_output_spec(self, x, weights=None): function average (line 1293) | def average(x, axis=None, weights=None): class Bartlett (line 1350) | class Bartlett(Operation): method call (line 1351) | def call(self, x): method compute_output_spec (line 1354) | def compute_output_spec(self, x): function bartlett (line 1359) | def bartlett(x): class Hamming (line 1379) | class Hamming(Operation): method call (line 1380) | def call(self, x): method compute_output_spec (line 1383) | def compute_output_spec(self, x): function hamming (line 1388) | def hamming(x): class Hanning (line 1410) | class Hanning(Operation): method call (line 1411) | def call(self, x): method compute_output_spec (line 1414) | def compute_output_spec(self, x): function hanning (line 1419) | def hanning(x): class Heaviside (line 1441) | class Heaviside(Operation): method call (line 1442) | def call(self, x1, x2): method compute_output_spec (line 1445) | def compute_output_spec(self, x1, x2): function heaviside (line 1455) | def heaviside(x1, x2): class Kaiser (line 1479) | class Kaiser(Operation): method __init__ (line 1480) | def __init__(self, beta, *, name=None): method call (line 1484) | def call(self, x): method compute_output_spec (line 1487) | def compute_output_spec(self, x): function kaiser (line 1492) | def kaiser(x, beta): class Bincount (line 1517) | class Bincount(Operation): method __init__ (line 1518) | def __init__(self, weights=None, minlength=0, sparse=False, *, name=No... method call (line 1524) | def call(self, x): method compute_output_spec (line 1532) | def compute_output_spec(self, x): function bincount (line 1549) | def bincount(x, weights=None, minlength=0, sparse=False): class BitwiseAnd (line 1595) | class BitwiseAnd(Operation): method call (line 1596) | def call(self, x, y): method compute_output_spec (line 1599) | def compute_output_spec(self, x, y): function bitwise_and (line 1605) | def bitwise_and(x, y): class BitwiseInvert (line 1624) | class BitwiseInvert(Operation): method call (line 1625) | def call(self, x): method compute_output_spec (line 1628) | def compute_output_spec(self, x): function bitwise_invert (line 1633) | def bitwise_invert(x): class BitwiseNot (line 1651) | class BitwiseNot(Operation): method call (line 1652) | def call(self, x): method compute_output_spec (line 1655) | def compute_output_spec(self, x): function bitwise_not (line 1660) | def bitwise_not(x): class BitwiseOr (line 1678) | class BitwiseOr(Operation): method call (line 1679) | def call(self, x, y): method compute_output_spec (line 1682) | def compute_output_spec(self, x, y): function bitwise_or (line 1688) | def bitwise_or(x, y): class BitwiseXor (line 1707) | class BitwiseXor(Operation): method call (line 1708) | def call(self, x, y): method compute_output_spec (line 1711) | def compute_output_spec(self, x, y): function bitwise_xor (line 1717) | def bitwise_xor(x, y): class BitwiseLeftShift (line 1736) | class BitwiseLeftShift(Operation): method call (line 1737) | def call(self, x, y): method compute_output_spec (line 1740) | def compute_output_spec(self, x, y): function bitwise_left_shift (line 1751) | def bitwise_left_shift(x, y): class LeftShift (line 1770) | class LeftShift(Operation): method call (line 1771) | def call(self, x, y): method compute_output_spec (line 1774) | def compute_output_spec(self, x, y): function left_shift (line 1783) | def left_shift(x, y): class BitwiseRightShift (line 1802) | class BitwiseRightShift(Operation): method call (line 1803) | def call(self, x, y): method compute_output_spec (line 1806) | def compute_output_spec(self, x, y): function bitwise_right_shift (line 1817) | def bitwise_right_shift(x, y): class RightShift (line 1836) | class RightShift(Operation): method call (line 1837) | def call(self, x, y): method compute_output_spec (line 1840) | def compute_output_spec(self, x, y): function right_shift (line 1849) | def right_shift(x, y): class Blackman (line 1868) | class Blackman(Operation): method call (line 1869) | def call(self, x): method compute_output_spec (line 1872) | def compute_output_spec(self, x): function blackman (line 1877) | def blackman(x): class BroadcastTo (line 1898) | class BroadcastTo(Operation): method __init__ (line 1899) | def __init__(self, shape, *, name=None): method call (line 1903) | def call(self, x): method compute_output_spec (line 1906) | def compute_output_spec(self, x): function broadcast_to (line 1918) | def broadcast_to(x, shape): class Cbrt (line 1941) | class Cbrt(Operation): method call (line 1942) | def call(self, x): method compute_output_spec (line 1945) | def compute_output_spec(self, x): function cbrt (line 1964) | def cbrt(x): class Ceil (line 1981) | class Ceil(Operation): method call (line 1982) | def call(self, x): method compute_output_spec (line 1985) | def compute_output_spec(self, x): function ceil (line 1995) | def ceil(x): class Clip (line 2012) | class Clip(Operation): method __init__ (line 2013) | def __init__(self, x_min, x_max, *, name=None): method call (line 2018) | def call(self, x): method compute_output_spec (line 2021) | def compute_output_spec(self, x): function clip (line 2029) | def clip(x, x_min, x_max): class Concatenate (line 2048) | class Concatenate(Operation): method __init__ (line 2049) | def __init__(self, axis=0, *, name=None): method call (line 2055) | def call(self, xs): method compute_output_spec (line 2058) | def compute_output_spec(self, xs): function concatenate (line 2091) | def concatenate(xs, axis=0): class Conjugate (line 2106) | class Conjugate(Operation): method call (line 2107) | def call(self, x): method compute_output_spec (line 2110) | def compute_output_spec(self, x): function conjugate (line 2116) | def conjugate(x): class Conj (line 2135) | class Conj(Conjugate): function conj (line 2140) | def conj(x): class Copy (line 2145) | class Copy(Operation): method call (line 2146) | def call(self, x): method compute_output_spec (line 2149) | def compute_output_spec(self, x): function copy (line 2155) | def copy(x): class Cos (line 2169) | class Cos(Operation): method call (line 2170) | def call(self, x): method compute_output_spec (line 2173) | def compute_output_spec(self, x): function cos (line 2183) | def cos(x): class Cosh (line 2197) | class Cosh(Operation): method call (line 2198) | def call(self, x): method compute_output_spec (line 2201) | def compute_output_spec(self, x): function cosh (line 2211) | def cosh(x): class CountNonzero (line 2225) | class CountNonzero(Operation): method __init__ (line 2226) | def __init__(self, axis=None, *, name=None): method call (line 2233) | def call(self, x): method compute_output_spec (line 2236) | def compute_output_spec(self, x): function count_nonzero (line 2249) | def count_nonzero(x, axis=None): class Cross (line 2276) | class Cross(Operation): method __init__ (line 2277) | def __init__(self, axisa=-1, axisb=-1, axisc=-1, axis=None, *, name=No... method call (line 2288) | def call(self, x1, x2): method compute_output_spec (line 2291) | def compute_output_spec(self, x1, x2): function cross (line 2326) | def cross(x1, x2, axisa=-1, axisb=-1, axisc=-1, axis=None): class Cumprod (line 2374) | class Cumprod(Operation): method __init__ (line 2375) | def __init__(self, axis=None, dtype=None, *, name=None): method call (line 2380) | def call(self, x): method compute_output_spec (line 2383) | def compute_output_spec(self, x): function cumprod (line 2402) | def cumprod(x, axis=None, dtype=None): class Cumsum (line 2420) | class Cumsum(Operation): method __init__ (line 2421) | def __init__(self, axis=None, dtype=None, *, name=None): method call (line 2426) | def call(self, x): method compute_output_spec (line 2429) | def compute_output_spec(self, x): function cumsum (line 2448) | def cumsum(x, axis=None, dtype=None): class Deg2rad (line 2466) | class Deg2rad(Operation): method call (line 2467) | def call(self, x): method compute_output_spec (line 2470) | def compute_output_spec(self, x): function deg2rad (line 2480) | def deg2rad(x): class Diag (line 2504) | class Diag(Operation): method __init__ (line 2505) | def __init__(self, k=0, *, name=None): method call (line 2509) | def call(self, x): method compute_output_spec (line 2512) | def compute_output_spec(self, x): function diag (line 2542) | def diag(x, k=0): class Diagflat (line 2580) | class Diagflat(Operation): method __init__ (line 2581) | def __init__(self, k=0, *, name=None): method call (line 2585) | def call(self, x): method compute_output_spec (line 2588) | def compute_output_spec(self, x): function diagflat (line 2618) | def diagflat(x, k=0): class Diagonal (line 2636) | class Diagonal(Operation): method __init__ (line 2637) | def __init__(self, offset=0, axis1=0, axis2=1, *, name=None): method call (line 2643) | def call(self, x): method compute_output_spec (line 2651) | def compute_output_spec(self, x): function diagonal (line 2679) | def diagonal(x, offset=0, axis1=0, axis2=1): class Diff (line 2740) | class Diff(Operation): method __init__ (line 2741) | def __init__(self, n=1, axis=-1, *, name=None): method call (line 2746) | def call(self, a): method compute_output_spec (line 2749) | def compute_output_spec(self, a): function diff (line 2758) | def diff(a, n=1, axis=-1): class Digitize (line 2792) | class Digitize(Operation): method call (line 2793) | def call(self, x, bins): method compute_output_spec (line 2796) | def compute_output_spec(self, x, bins): function digitize (line 2808) | def digitize(x, bins): class Dot (line 2830) | class Dot(Operation): method call (line 2831) | def call(self, x1, x2): method compute_output_spec (line 2834) | def compute_output_spec(self, x1, x2): function dot (line 2871) | def dot(x1, x2): class Dstack (line 2899) | class Dstack(Operation): method call (line 2900) | def call(self, xs): method compute_output_spec (line 2903) | def compute_output_spec(self, xs): function dstack (line 2939) | def dstack(xs): class Einsum (line 2973) | class Einsum(Operation): method __init__ (line 2974) | def __init__(self, subscripts, *, name=None): method call (line 2978) | def call(self, *operands, **kwargs): method compute_output_spec (line 2981) | def compute_output_spec(self, *operands): function einsum (line 3153) | def einsum(subscripts, *operands, **kwargs): function empty (line 3242) | def empty(shape, dtype=None): class EmptyLike (line 3255) | class EmptyLike(Operation): method __init__ (line 3256) | def __init__(self, dtype=None, *, name=None): method call (line 3260) | def call(self, x): method compute_output_spec (line 3263) | def compute_output_spec(self, x): function empty_like (line 3273) | def empty_like(x, dtype=None): class Equal (line 3298) | class Equal(Operation): method call (line 3299) | def call(self, x1, x2): method compute_output_spec (line 3302) | def compute_output_spec(self, x1, x2): function equal (line 3310) | def equal(x1, x2): class Exp (line 3325) | class Exp(Operation): method call (line 3326) | def call(self, x): method compute_output_spec (line 3329) | def compute_output_spec(self, x): function exp (line 3337) | def exp(x): class Exp2 (line 3351) | class Exp2(Operation): method call (line 3352) | def call(self, x): method compute_output_spec (line 3355) | def compute_output_spec(self, x): function exp2 (line 3363) | def exp2(x): class ExpandDims (line 3377) | class ExpandDims(Operation): method __init__ (line 3378) | def __init__(self, axis, *, name=None): method call (line 3387) | def call(self, x): method compute_output_spec (line 3390) | def compute_output_spec(self, x): function expand_dims (line 3404) | def expand_dims(x, axis): class Expm1 (line 3422) | class Expm1(Operation): method call (line 3423) | def call(self, x): method compute_output_spec (line 3426) | def compute_output_spec(self, x): function expm1 (line 3435) | def expm1(x): class Flip (line 3449) | class Flip(Operation): method __init__ (line 3450) | def __init__(self, axis=None, *, name=None): method call (line 3454) | def call(self, x): method compute_output_spec (line 3457) | def compute_output_spec(self, x): function flip (line 3462) | def flip(x, axis=None): class Floor (line 3480) | class Floor(Operation): method call (line 3481) | def call(self, x): method compute_output_spec (line 3484) | def compute_output_spec(self, x): function floor (line 3495) | def floor(x): class Full (line 3511) | class Full(Operation): method __init__ (line 3512) | def __init__(self, shape, dtype=None, *, name=None): method call (line 3517) | def call(self, fill_value): method compute_output_spec (line 3520) | def compute_output_spec(self, fill_value): function full (line 3526) | def full(shape, fill_value, dtype=None): class FullLike (line 3543) | class FullLike(Operation): method __init__ (line 3544) | def __init__(self, dtype=None, *, name=None): method call (line 3548) | def call(self, x, fill_value): method compute_output_spec (line 3551) | def compute_output_spec(self, x, fill_value): function full_like (line 3561) | def full_like(x, fill_value, dtype=None): class Gcd (line 3578) | class Gcd(Operation): method call (line 3579) | def call(self, x1, x2): method compute_output_spec (line 3582) | def compute_output_spec(self, x1, x2): function gcd (line 3594) | def gcd(x1, x2): class GetItem (line 3609) | class GetItem(Operation): method call (line 3610) | def call(self, x, key): method compute_output_spec (line 3615) | def compute_output_spec(self, x, key): function get_item (line 3683) | def get_item(x, key): class Geomspace (line 3690) | class Geomspace(Operation): method __init__ (line 3691) | def __init__(self, num=50, endpoint=True, dtype=None, axis=0, *, name=... method call (line 3698) | def call(self, start, stop): method compute_output_spec (line 3708) | def compute_output_spec(self, start, stop): function geomspace (line 3725) | def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): class Greater (line 3764) | class Greater(Operation): method call (line 3765) | def call(self, x1, x2): method compute_output_spec (line 3768) | def compute_output_spec(self, x1, x2): function greater (line 3776) | def greater(x1, x2): class GreaterEqual (line 3791) | class GreaterEqual(Operation): method call (line 3792) | def call(self, x1, x2): method compute_output_spec (line 3795) | def compute_output_spec(self, x1, x2): function greater_equal (line 3808) | def greater_equal(x1, x2): class Hstack (line 3823) | class Hstack(Operation): method call (line 3824) | def call(self, xs): method compute_output_spec (line 3827) | def compute_output_spec(self, xs): function hstack (line 3851) | def hstack(xs): class Hsplit (line 3868) | class Hsplit(Operation): method __init__ (line 3869) | def __init__(self, indices_or_sections, *, name=None): method call (line 3875) | def call(self, x): method compute_output_spec (line 3878) | def compute_output_spec(self, x): function hsplit (line 3890) | def hsplit(x, indices_or_sections): class Hypot (line 3934) | class Hypot(Operation): method call (line 3935) | def call(self, x1, x2): method compute_output_spec (line 3938) | def compute_output_spec(self, x1, x2): function hypot (line 3948) | def hypot(x1, x2): function identity (line 3979) | def identity(n, dtype=None): class Imag (line 3995) | class Imag(Operation): method call (line 3996) | def call(self, x): method compute_output_spec (line 3999) | def compute_output_spec(self, x): function imag (line 4005) | def imag(x): class Isclose (line 4019) | class Isclose(Operation): method __init__ (line 4020) | def __init__(self, equal_nan=False, *, name=None): method call (line 4024) | def call(self, x1, x2, rtol=1e-5, atol=1e-8): method compute_output_spec (line 4027) | def compute_output_spec(self, x1, x2, rtol=1e-5, atol=1e-8): function isclose (line 4035) | def isclose(x1, x2, rtol=1e-5, atol=1e-8, equal_nan=False): class Isfinite (line 4053) | class Isfinite(Operation): method call (line 4054) | def call(self, x): method compute_output_spec (line 4057) | def compute_output_spec(self, x): function isfinite (line 4062) | def isfinite(x): class IsIn (line 4080) | class IsIn(Operation): method __init__ (line 4081) | def __init__( method call (line 4092) | def call(self, x1, x2): method compute_output_spec (line 4097) | def compute_output_spec(self, x1, x2): function isin (line 4102) | def isin(x1, x2, assume_unique=False, invert=False): class Isinf (line 4142) | class Isinf(Operation): method call (line 4143) | def call(self, x): method compute_output_spec (line 4146) | def compute_output_spec(self, x): function isinf (line 4151) | def isinf(x): class Isnan (line 4165) | class Isnan(Operation): method call (line 4166) | def call(self, x): method compute_output_spec (line 4169) | def compute_output_spec(self, x): function isnan (line 4174) | def isnan(x): class Isneginf (line 4188) | class Isneginf(Operation): method call (line 4189) | def call(self, x): method compute_output_spec (line 4192) | def compute_output_spec(self, x): function isneginf (line 4197) | def isneginf(x): class Isposinf (line 4211) | class Isposinf(Operation): method call (line 4212) | def call(self, x): method compute_output_spec (line 4215) | def compute_output_spec(self, x): function isposinf (line 4220) | def isposinf(x): class Isreal (line 4234) | class Isreal(Operation): method call (line 4235) | def call(self, x): method compute_output_spec (line 4238) | def compute_output_spec(self, x): function isreal (line 4243) | def isreal(x): class Kron (line 4263) | class Kron(Operation): method call (line 4264) | def call(self, x1, x2): method compute_output_spec (line 4267) | def compute_output_spec(self, x1, x2): function kron (line 4287) | def kron(x1, x2): class Lcm (line 4306) | class Lcm(Operation): method call (line 4307) | def call(self, x1, x2): method compute_output_spec (line 4310) | def compute_output_spec(self, x1, x2): function lcm (line 4322) | def lcm(x1, x2): class Ldexp (line 4343) | class Ldexp(Operation): method call (line 4344) | def call(self, x1, x2): method compute_output_spec (line 4347) | def compute_output_spec(self, x1, x2): function ldexp (line 4359) | def ldexp(x1, x2): class Less (line 4383) | class Less(Operation): method call (line 4384) | def call(self, x1, x2): method compute_output_spec (line 4387) | def compute_output_spec(self, x1, x2): function less (line 4395) | def less(x1, x2): class LessEqual (line 4410) | class LessEqual(Operation): method call (line 4411) | def call(self, x1, x2): method compute_output_spec (line 4414) | def compute_output_spec(self, x1, x2): function less_equal (line 4427) | def less_equal(x1, x2): class Linspace (line 4442) | class Linspace(Operation): method __init__ (line 4443) | def __init__( method call (line 4460) | def call(self, start, stop): method compute_output_spec (line 4471) | def compute_output_spec(self, start, stop): function linspace (line 4491) | def linspace( class Log (line 4537) | class Log(Operation): method call (line 4538) | def call(self, x): method compute_output_spec (line 4541) | def compute_output_spec(self, x): function log (line 4551) | def log(x): class Log10 (line 4565) | class Log10(Operation): method call (line 4566) | def call(self, x): method compute_output_spec (line 4569) | def compute_output_spec(self, x): function log10 (line 4579) | def log10(x): class Log1p (line 4593) | class Log1p(Operation): method call (line 4594) | def call(self, x): method compute_output_spec (line 4597) | def compute_output_spec(self, x): function log1p (line 4608) | def log1p(x): class Log2 (line 4624) | class Log2(Operation): method call (line 4625) | def call(self, x): method compute_output_spec (line 4628) | def compute_output_spec(self, x): function log2 (line 4638) | def log2(x): class Logaddexp (line 4652) | class Logaddexp(Operation): method call (line 4653) | def call(self, x1, x2): method compute_output_spec (line 4656) | def compute_output_spec(self, x1, x2): function logaddexp (line 4669) | def logaddexp(x1, x2): class Logaddexp2 (line 4687) | class Logaddexp2(Operation): method call (line 4688) | def call(self, x1, x2): method compute_output_spec (line 4691) | def compute_output_spec(self, x1, x2): function logaddexp2 (line 4704) | def logaddexp2(x1, x2): class LogicalAnd (line 4728) | class LogicalAnd(Operation): method call (line 4729) | def call(self, x1, x2): method compute_output_spec (line 4732) | def compute_output_spec(self, x1, x2): function logical_and (line 4745) | def logical_and(x1, x2): class LogicalNot (line 4762) | class LogicalNot(Operation): method call (line 4763) | def call(self, x): method compute_output_spec (line 4766) | def compute_output_spec(self, x): function logical_not (line 4776) | def logical_not(x): class LogicalOr (line 4792) | class LogicalOr(Operation): method call (line 4793) | def call(self, x1, x2): method compute_output_spec (line 4796) | def compute_output_spec(self, x1, x2): function logical_or (line 4809) | def logical_or(x1, x2): class Logspace (line 4826) | class Logspace(Operation): method __init__ (line 4827) | def __init__( method call (line 4837) | def call(self, start, stop): method compute_output_spec (line 4848) | def compute_output_spec(self, start, stop): function logspace (line 4865) | def logspace(start, stop, num=50, endpoint=True, base=10, dtype=None, ax... class Matmul (line 4905) | class Matmul(Operation): method call (line 4906) | def call(self, x1, x2): method compute_output_spec (line 4909) | def compute_output_spec(self, x1, x2): function matmul (line 4928) | def matmul(x1, x2): class Max (line 4952) | class Max(Operation): method __init__ (line 4953) | def __init__(self, axis=None, keepdims=False, initial=None, *, name=No... method call (line 4962) | def call(self, x): method compute_output_spec (line 4967) | def compute_output_spec(self, x): function max (line 4975) | def max(x, axis=None, keepdims=False, initial=None): class Maximum (line 4996) | class Maximum(Operation): method call (line 4997) | def call(self, x1, x2): method compute_output_spec (line 5000) | def compute_output_spec(self, x1, x2): function maximum (line 5017) | def maximum(x1, x2): class Median (line 5032) | class Median(Operation): method __init__ (line 5033) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5040) | def call(self, x): method compute_output_spec (line 5043) | def compute_output_spec(self, x): function median (line 5055) | def median(x, axis=None, keepdims=False): class Meshgrid (line 5074) | class Meshgrid(Operation): method __init__ (line 5075) | def __init__(self, indexing="xy", *, name=None): method call (line 5084) | def call(self, *x): method compute_output_spec (line 5087) | def compute_output_spec(self, *x): function meshgrid (line 5109) | def meshgrid(*x, indexing="xy"): class Min (line 5145) | class Min(Operation): method __init__ (line 5146) | def __init__(self, axis=None, keepdims=False, initial=None, *, name=No... method call (line 5155) | def call(self, x): method compute_output_spec (line 5160) | def compute_output_spec(self, x): function min (line 5168) | def min(x, axis=None, keepdims=False, initial=None): class Minimum (line 5189) | class Minimum(Operation): method call (line 5190) | def call(self, x1, x2): method compute_output_spec (line 5193) | def compute_output_spec(self, x1, x2): function minimum (line 5210) | def minimum(x1, x2): class Mod (line 5225) | class Mod(Operation): method call (line 5226) | def call(self, x1, x2): method compute_output_spec (line 5229) | def compute_output_spec(self, x1, x2): function mod (line 5243) | def mod(x1, x2): class Fmod (line 5258) | class Fmod(Operation): method call (line 5259) | def call(self, x1, x2): method compute_output_spec (line 5262) | def compute_output_spec(self, x1, x2): function fmod (line 5276) | def fmod(x1, x2): class Moveaxis (line 5296) | class Moveaxis(Operation): method __init__ (line 5297) | def __init__(self, source, destination, *, name=None): method call (line 5315) | def call(self, x): method compute_output_spec (line 5318) | def compute_output_spec(self, x): function moveaxis (line 5341) | def moveaxis(x, source, destination): class Nanargmax (line 5360) | class Nanargmax(Operation): method __init__ (line 5361) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5366) | def call(self, x): method compute_output_spec (line 5371) | def compute_output_spec(self, x): function nanargmax (line 5380) | def nanargmax(x, axis=None, keepdims=False): class Nanargmin (line 5419) | class Nanargmin(Operation): method __init__ (line 5420) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5425) | def call(self, x): method compute_output_spec (line 5430) | def compute_output_spec(self, x): function nanargmin (line 5439) | def nanargmin(x, axis=None, keepdims=False): class Nancumsum (line 5478) | class Nancumsum(Operation): method __init__ (line 5479) | def __init__(self, axis=None, dtype=None, *, name=None): method call (line 5484) | def call(self, x): method compute_output_spec (line 5487) | def compute_output_spec(self, x): function nancumsum (line 5509) | def nancumsum(x, axis=None, dtype=None): class Nancumprod (line 5539) | class Nancumprod(Operation): method __init__ (line 5540) | def __init__(self, axis=None, dtype=None, *, name=None): method call (line 5545) | def call(self, x): method compute_output_spec (line 5548) | def compute_output_spec(self, x): function nancumprod (line 5570) | def nancumprod(x, axis=None, dtype=None): class Nanmax (line 5600) | class Nanmax(Operation): method __init__ (line 5601) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5606) | def call(self, x): method compute_output_spec (line 5609) | def compute_output_spec(self, x): function nanmax (line 5622) | def nanmax(x, axis=None, keepdims=False): class Nanmean (line 5657) | class Nanmean(Operation): method __init__ (line 5658) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5663) | def call(self, x): method compute_output_spec (line 5666) | def compute_output_spec(self, x): function nanmean (line 5675) | def nanmean(x, axis=None, keepdims=False): class Nanmin (line 5711) | class Nanmin(Operation): method __init__ (line 5712) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5717) | def call(self, x): method compute_output_spec (line 5720) | def compute_output_spec(self, x): function nanmin (line 5733) | def nanmin(x, axis=None, keepdims=False): class Nanprod (line 5767) | class Nanprod(Operation): method __init__ (line 5768) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5773) | def call(self, x): method compute_output_spec (line 5780) | def compute_output_spec(self, x): function nanprod (line 5800) | def nanprod(x, axis=None, keepdims=False): class Nanstd (line 5833) | class Nanstd(Operation): method __init__ (line 5834) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5839) | def call(self, x): method compute_output_spec (line 5842) | def compute_output_spec(self, x): function nanstd (line 5851) | def nanstd(x, axis=None, keepdims=False): class Nansum (line 5885) | class Nansum(Operation): method __init__ (line 5886) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5891) | def call(self, x): method compute_output_spec (line 5894) | def compute_output_spec(self, x): function nansum (line 5913) | def nansum(x, axis=None, keepdims=False): class Nanvar (line 5946) | class Nanvar(Operation): method __init__ (line 5947) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 5952) | def call(self, x): method compute_output_spec (line 5955) | def compute_output_spec(self, x): function nanvar (line 5964) | def nanvar(x, axis=None, keepdims=False): class NanToNum (line 5998) | class NanToNum(Operation): method __init__ (line 5999) | def __init__(self, nan=0.0, posinf=None, neginf=None, *, name=None): method call (line 6005) | def call(self, x): method compute_output_spec (line 6010) | def compute_output_spec(self, x): function nan_to_num (line 6020) | def nan_to_num(x, nan=0.0, posinf=None, neginf=None): class Ndim (line 6039) | class Ndim(Operation): method call (line 6040) | def call(self, x): method compute_output_spec (line 6045) | def compute_output_spec(self, x): function ndim (line 6050) | def ndim(x): class Nonzero (line 6064) | class Nonzero(Operation): method call (line 6065) | def call(self, x): method compute_output_spec (line 6068) | def compute_output_spec(self, x): function nonzero (line 6075) | def nonzero(x): class NotEqual (line 6089) | class NotEqual(Operation): method call (line 6090) | def call(self, x1, x2): method compute_output_spec (line 6093) | def compute_output_spec(self, x1, x2): function not_equal (line 6101) | def not_equal(x1, x2): class OnesLike (line 6116) | class OnesLike(Operation): method __init__ (line 6117) | def __init__(self, dtype=None, *, name=None): method call (line 6121) | def call(self, x): method compute_output_spec (line 6124) | def compute_output_spec(self, x): function ones_like (line 6135) | def ones_like(x, dtype=None): class ZerosLike (line 6151) | class ZerosLike(Operation): method __init__ (line 6152) | def __init__(self, dtype=None, *, name=None): method call (line 6156) | def call(self, x): method compute_output_spec (line 6159) | def compute_output_spec(self, x, dtype=None): function zeros_like (line 6175) | def zeros_like(x, dtype=None): class Outer (line 6191) | class Outer(Operation): method call (line 6192) | def call(self, x1, x2): method compute_output_spec (line 6195) | def compute_output_spec(self, x1, x2): function outer (line 6215) | def outer(x1, x2): class Pad (line 6236) | class Pad(Operation): method __init__ (line 6237) | def __init__(self, pad_width, mode="constant", *, name=None): method _process_pad_width (line 6242) | def _process_pad_width(self, pad_width): method call (line 6260) | def call(self, x, constant_values=None): method compute_output_spec (line 6275) | def compute_output_spec(self, x, constant_values=None): function pad (line 6298) | def pad(x, pad_width, mode="constant", constant_values=None): class Prod (line 6333) | class Prod(Operation): method __init__ (line 6334) | def __init__(self, axis=None, keepdims=False, dtype=None, *, name=None): method call (line 6343) | def call(self, x): method compute_output_spec (line 6351) | def compute_output_spec(self, x): function prod (line 6372) | def prod(x, axis=None, keepdims=False, dtype=None): class Ptp (line 6393) | class Ptp(Operation): method __init__ (line 6394) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 6399) | def call(self, x): method compute_output_spec (line 6406) | def compute_output_spec(self, x): function ptp (line 6415) | def ptp(x, axis=None, keepdims=False): class Quantile (line 6461) | class Quantile(Operation): method __init__ (line 6462) | def __init__( method call (line 6472) | def call(self, x, q): method compute_output_spec (line 6477) | def compute_output_spec(self, x, q): function quantile (line 6492) | def quantile(x, q, axis=None, method="linear", keepdims=False): class Ravel (line 6530) | class Ravel(Operation): method call (line 6531) | def call(self, x): method compute_output_spec (line 6534) | def compute_output_spec(self, x): function ravel (line 6545) | def ravel(x): class UnravelIndex (line 6561) | class UnravelIndex(Operation): method __init__ (line 6562) | def __init__(self, shape, *, name=None): method call (line 6566) | def call(self, indices): method compute_output_spec (line 6569) | def compute_output_spec(self, indices): function unravel_index (line 6590) | def unravel_index(indices, shape): class Real (line 6612) | class Real(Operation): method call (line 6613) | def call(self, x): method compute_output_spec (line 6616) | def compute_output_spec(self, x): function real (line 6622) | def real(x): class Reciprocal (line 6636) | class Reciprocal(Operation): method call (line 6637) | def call(self, x): method compute_output_spec (line 6640) | def compute_output_spec(self, x): function reciprocal (line 6650) | def reciprocal(x): class Repeat (line 6666) | class Repeat(Operation): method __init__ (line 6667) | def __init__(self, repeats, axis=None, *, name=None): method call (line 6672) | def call(self, x): method compute_output_spec (line 6675) | def compute_output_spec(self, x): function repeat (line 6719) | def repeat(x, repeats, axis=None): class Reshape (line 6736) | class Reshape(Operation): method __init__ (line 6737) | def __init__(self, newshape, *, name=None): method call (line 6741) | def call(self, x): method compute_output_spec (line 6744) | def compute_output_spec(self, x): function reshape (line 6753) | def reshape(x, newshape): class Roll (line 6770) | class Roll(Operation): method __init__ (line 6771) | def __init__(self, shift, axis=None, *, name=None): method call (line 6776) | def call(self, x): method compute_output_spec (line 6779) | def compute_output_spec(self, x): function roll (line 6784) | def roll(x, shift, axis=None): class Round (line 6804) | class Round(Operation): method __init__ (line 6805) | def __init__(self, decimals=0, *, name=None): method call (line 6809) | def call(self, x): method compute_output_spec (line 6812) | def compute_output_spec(self, x): function round (line 6818) | def round(x, decimals=0): class SearchSorted (line 6833) | class SearchSorted(Operation): method __init__ (line 6834) | def __init__(self, side="left", *, name=None): method call (line 6838) | def call(self, sorted_sequence, values): method compute_output_spec (line 6845) | def compute_output_spec(self, sorted_sequence, values): function searchsorted (line 6862) | def searchsorted(sorted_sequence, values, side="left"): class Sign (line 6884) | class Sign(Operation): method call (line 6885) | def call(self, x): method compute_output_spec (line 6888) | def compute_output_spec(self, x): function sign (line 6894) | def sign(x): class Signbit (line 6908) | class Signbit(Operation): method call (line 6909) | def call(self, x): method compute_output_spec (line 6912) | def compute_output_spec(self, x): function signbit (line 6918) | def signbit(x): class Sin (line 6935) | class Sin(Operation): method call (line 6936) | def call(self, x): method compute_output_spec (line 6939) | def compute_output_spec(self, x): function sin (line 6950) | def sin(x): class Sinc (line 6964) | class Sinc(Operation): method call (line 6965) | def call(self, x): method compute_output_spec (line 6968) | def compute_output_spec(self, x): function sinc (line 6978) | def sinc(x): class Sinh (line 7001) | class Sinh(Operation): method call (line 7002) | def call(self, x): method compute_output_spec (line 7005) | def compute_output_spec(self, x): function sinh (line 7016) | def sinh(x): class Size (line 7030) | class Size(Operation): method call (line 7031) | def call(self, x): method compute_output_spec (line 7034) | def compute_output_spec(self, x): function size (line 7039) | def size(x): class Sort (line 7053) | class Sort(Operation): method __init__ (line 7054) | def __init__(self, axis=-1, *, name=None): method call (line 7058) | def call(self, x): method compute_output_spec (line 7061) | def compute_output_spec(self, x): function sort (line 7066) | def sort(x, axis=-1): function _compute_split_output_spec (line 7082) | def _compute_split_output_spec(x, indices_or_sections, axis): class Split (line 7125) | class Split(Operation): method __init__ (line 7126) | def __init__(self, indices_or_sections, axis=0, *, name=None): method call (line 7133) | def call(self, x): method compute_output_spec (line 7136) | def compute_output_spec(self, x): function split (line 7143) | def split(x, indices_or_sections, axis=0): class Stack (line 7166) | class Stack(Operation): method __init__ (line 7167) | def __init__(self, axis=0, *, name=None): method call (line 7171) | def call(self, x): method compute_output_spec (line 7174) | def compute_output_spec(self, x): function stack (line 7199) | def stack(x, axis=0): class Std (line 7217) | class Std(Operation): method __init__ (line 7218) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 7226) | def call(self, x): method compute_output_spec (line 7229) | def compute_output_spec(self, x): function std (line 7240) | def std(x, axis=None, keepdims=False): class Swapaxes (line 7259) | class Swapaxes(Operation): method __init__ (line 7260) | def __init__(self, axis1, axis2, *, name=None): method call (line 7266) | def call(self, x): method compute_output_spec (line 7269) | def compute_output_spec(self, x): function swapaxes (line 7278) | def swapaxes(x, axis1, axis2): class Take (line 7294) | class Take(Operation): method __init__ (line 7295) | def __init__(self, axis=None, *, name=None): method call (line 7299) | def call(self, x, indices): method compute_output_spec (line 7302) | def compute_output_spec(self, x, indices): function take (line 7320) | def take(x, indices, axis=None): class TakeAlongAxis (line 7337) | class TakeAlongAxis(Operation): method __init__ (line 7338) | def __init__(self, axis=None, *, name=None): method call (line 7342) | def call(self, x, indices): method compute_output_spec (line 7345) | def compute_output_spec(self, x, indices): function take_along_axis (line 7358) | def take_along_axis(x, indices, axis=None): class Tan (line 7375) | class Tan(Operation): method call (line 7376) | def call(self, x): method compute_output_spec (line 7379) | def compute_output_spec(self, x): function tan (line 7390) | def tan(x): class Tanh (line 7404) | class Tanh(Operation): method call (line 7405) | def call(self, x): method compute_output_spec (line 7408) | def compute_output_spec(self, x): function tanh (line 7419) | def tanh(x): class Tensordot (line 7433) | class Tensordot(Operation): method __init__ (line 7434) | def __init__(self, axes=2, *, name=None): method call (line 7438) | def call(self, x1, x2): method compute_output_spec (line 7441) | def compute_output_spec(self, x1, x2): function tensordot (line 7479) | def tensordot(x1, x2, axes=2): class Tile (line 7500) | class Tile(Operation): method __init__ (line 7501) | def __init__(self, repeats, *, name=None): method call (line 7505) | def call(self, x): method compute_output_spec (line 7508) | def compute_output_spec(self, x): function tile (line 7531) | def tile(x, repeats): class Trace (line 7556) | class Trace(Operation): method __init__ (line 7557) | def __init__(self, offset=0, axis1=0, axis2=1, *, name=None): method call (line 7563) | def call(self, x): method compute_output_spec (line 7568) | def compute_output_spec(self, x): function trace (line 7585) | def trace(x, offset=0, axis1=0, axis2=1): function tri (line 7618) | def tri(N, M=None, k=0, dtype=None): class Tril (line 7636) | class Tril(Operation): method __init__ (line 7637) | def __init__(self, k=0, *, name=None): method call (line 7641) | def call(self, x): method compute_output_spec (line 7644) | def compute_output_spec(self, x): function tril (line 7649) | def tril(x, k=0): class Triu (line 7668) | class Triu(Operation): method __init__ (line 7669) | def __init__(self, k=0, *, name=None): method call (line 7673) | def call(self, x): method compute_output_spec (line 7676) | def compute_output_spec(self, x): function triu (line 7681) | def triu(x, k=0): class Trunc (line 7700) | class Trunc(Operation): method call (line 7701) | def call(self, x): method compute_output_spec (line 7704) | def compute_output_spec(self, x): function trunc (line 7709) | def trunc(x): class Vdot (line 7732) | class Vdot(Operation): method call (line 7733) | def call(self, x1, x2): method compute_output_spec (line 7736) | def compute_output_spec(self, x1, x2): function vdot (line 7745) | def vdot(x1, x2): class Inner (line 7766) | class Inner(Operation): method call (line 7767) | def call(self, x1, x2): method compute_output_spec (line 7770) | def compute_output_spec(self, x1, x2): function inner (line 7779) | def inner(x1, x2): function vectorize (line 7806) | def vectorize(pyfunc, *, excluded=None, signature=None): class Vstack (line 7847) | class Vstack(Operation): method call (line 7848) | def call(self, xs): method compute_output_spec (line 7851) | def compute_output_spec(self, xs): function vstack (line 7875) | def vstack(xs): class Vsplit (line 7889) | class Vsplit(Operation): method __init__ (line 7890) | def __init__(self, indices_or_sections, *, name=None): method call (line 7896) | def call(self, x): method compute_output_spec (line 7899) | def compute_output_spec(self, x): function vsplit (line 7909) | def vsplit(x, indices_or_sections): class Where (line 7941) | class Where(Operation): method call (line 7942) | def call(self, condition, x1=None, x2=None): method compute_output_spec (line 7945) | def compute_output_spec(self, condition, x1, x2): function where (line 7959) | def where(condition, x1=None, x2=None): class Subtract (line 7981) | class Subtract(Operation): method call (line 7982) | def call(self, x1, x2): method compute_output_spec (line 7985) | def compute_output_spec(self, x1, x2): function subtract (line 8000) | def subtract(x1, x2): class Multiply (line 8015) | class Multiply(Operation): method call (line 8016) | def call(self, x1, x2): method compute_output_spec (line 8019) | def compute_output_spec(self, x1, x2): function multiply (line 8034) | def multiply(x1, x2): class Divide (line 8049) | class Divide(Operation): method call (line 8050) | def call(self, x1, x2): method compute_output_spec (line 8053) | def compute_output_spec(self, x1, x2): function divide (line 8071) | def divide(x1, x2): class DivideNoNan (line 8088) | class DivideNoNan(Operation): method call (line 8089) | def call(self, x1, x2): method compute_output_spec (line 8092) | def compute_output_spec(self, x1, x2): function divide_no_nan (line 8110) | def divide_no_nan(x1, x2): class TrueDivide (line 8125) | class TrueDivide(Operation): method call (line 8126) | def call(self, x1, x2): method compute_output_spec (line 8129) | def compute_output_spec(self, x1, x2): function true_divide (line 8152) | def true_divide(x1, x2): class Power (line 8159) | class Power(Operation): method call (line 8160) | def call(self, x1, x2): method compute_output_spec (line 8163) | def compute_output_spec(self, x1, x2): function power (line 8174) | def power(x1, x2): class Negative (line 8189) | class Negative(Operation): method call (line 8190) | def call(self, x): method compute_output_spec (line 8193) | def compute_output_spec(self, x): function negative (line 8199) | def negative(x): class Nextafter (line 8213) | class Nextafter(Operation): method call (line 8214) | def call(self, x1, x2): method compute_output_spec (line 8217) | def compute_output_spec(self, x1, x2): function nextafter (line 8229) | def nextafter(x1, x2): class Square (line 8256) | class Square(Operation): method call (line 8257) | def call(self, x): method compute_output_spec (line 8260) | def compute_output_spec(self, x): function square (line 8269) | def square(x): class Sqrt (line 8283) | class Sqrt(Operation): method call (line 8284) | def call(self, x): method compute_output_spec (line 8288) | def compute_output_spec(self, x): function sqrt (line 8299) | def sqrt(x): class Squeeze (line 8314) | class Squeeze(Operation): method __init__ (line 8315) | def __init__(self, axis=None, *, name=None): method call (line 8319) | def call(self, x): method compute_output_spec (line 8322) | def compute_output_spec(self, x): function squeeze (line 8343) | def squeeze(x, axis=None): class Transpose (line 8359) | class Transpose(Operation): method __init__ (line 8360) | def __init__(self, axes=None, *, name=None): method call (line 8364) | def call(self, x): method compute_output_spec (line 8367) | def compute_output_spec(self, x): function transpose (line 8376) | def transpose(x, axes=None): class Trapezoid (line 8392) | class Trapezoid(Operation): method __init__ (line 8393) | def __init__(self, x=None, dx=1.0, axis=-1, *, name=None): method call (line 8399) | def call(self, y): method compute_output_spec (line 8402) | def compute_output_spec(self, y): function trapezoid (line 8411) | def trapezoid(y, x=None, dx=1.0, axis=-1): class Mean (line 8434) | class Mean(Operation): method __init__ (line 8435) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 8442) | def call(self, x): method compute_output_spec (line 8445) | def compute_output_spec(self, x): function mean (line 8461) | def mean(x, axis=None, keepdims=False): class Vander (line 8479) | class Vander(Operation): method __init__ (line 8480) | def __init__(self, N=None, increasing=False, *, name=None): method call (line 8485) | def call(self, x): method compute_output_spec (line 8488) | def compute_output_spec(self, x): function vander (line 8499) | def vander(x, N=None, increasing=False): class Var (line 8550) | class Var(Operation): method __init__ (line 8551) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 8558) | def call(self, x): method compute_output_spec (line 8561) | def compute_output_spec(self, x): function var (line 8570) | def var(x, axis=None, keepdims=False): class Sum (line 8588) | class Sum(Operation): method __init__ (line 8589) | def __init__(self, axis=None, keepdims=False, *, name=None): method call (line 8596) | def call(self, x): method compute_output_spec (line 8599) | def compute_output_spec(self, x): function sum (line 8618) | def sum(x, axis=None, keepdims=False): function zeros (line 8637) | def zeros(shape, dtype=None): function ones (line 8651) | def ones(shape, dtype=None): function eye (line 8665) | def eye(N, M=None, k=0, dtype=None): class FloorDivide (line 8695) | class FloorDivide(Operation): method call (line 8696) | def call(self, x1, x2): method compute_output_spec (line 8699) | def compute_output_spec(self, x1, x2): function floor_divide (line 8711) | def floor_divide(x1, x2): class LogicalXor (line 8726) | class LogicalXor(Operation): method call (line 8727) | def call(self, x1, x2): method compute_output_spec (line 8730) | def compute_output_spec(self, x1, x2): function logical_xor (line 8738) | def logical_xor(x1, x2): class Corrcoef (line 8753) | class Corrcoef(Operation): method call (line 8754) | def call(self, x): method compute_output_spec (line 8757) | def compute_output_spec(self, x): function corrcoef (line 8767) | def corrcoef(x): class Correlate (line 8782) | class Correlate(Operation): method __init__ (line 8783) | def __init__(self, mode="valid", *, name=None): method call (line 8787) | def call(self, x1, x2): method compute_output_spec (line 8790) | def compute_output_spec(self, x1, x2): function correlate (line 8828) | def correlate(x1, x2, mode="valid"): class Select (line 8858) | class Select(Operation): method call (line 8859) | def call(self, condlist, choicelist, default=0): method compute_output_spec (line 8862) | def compute_output_spec(self, condlist, choicelist, default=0): function select (line 8868) | def select(condlist, choicelist, default=0): class Slogdet (line 8922) | class Slogdet(Operation): method call (line 8923) | def call(self, x): method compute_output_spec (line 8926) | def compute_output_spec(self, x): function slogdet (line 8933) | def slogdet(x): class Argpartition (line 8951) | class Argpartition(Operation): method __init__ (line 8952) | def __init__(self, kth, axis=-1, *, name=None): method call (line 8959) | def call(self, x): method compute_output_spec (line 8962) | def compute_output_spec(self, x): function argpartition (line 8967) | def argpartition(x, kth, axis=-1): class Histogram (line 8993) | class Histogram(Operation): method __init__ (line 8994) | def __init__(self, bins=10, range=None, *, name=None): method call (line 9014) | def call(self, x): method compute_output_spec (line 9020) | def compute_output_spec(self, x): function histogram (line 9028) | def histogram(x, bins=10, range=None): class ArraySplit (line 9086) | class ArraySplit(Operation): method __init__ (line 9087) | def __init__(self, indices_or_sections, axis=0, *, name=None): method call (line 9093) | def call(self, x): method compute_output_spec (line 9100) | def compute_output_spec(self, x): function array_split (line 9134) | def array_split(x, indices_or_sections, axis=0): FILE: keras/src/ops/numpy_test.py class NumPyTestRot90 (line 22) | class NumPyTestRot90(testing.TestCase): method test_basic_rotation (line 23) | def test_basic_rotation(self): method test_k_parameter_variations (line 37) | def test_k_parameter_variations(self, k, expected): method test_3d_operations (line 46) | def test_3d_operations(self, axes): method test_image_processing (line 56) | def test_image_processing(self, array): method test_edge_conditions (line 67) | def test_edge_conditions(self, array): method test_error_conditions (line 77) | def test_error_conditions(self, array, axes): class NumpyTwoInputOpsDynamicShapeTest (line 86) | class NumpyTwoInputOpsDynamicShapeTest(testing.TestCase): method test_add (line 87) | def test_add(self): method test_heaviside (line 92) | def test_heaviside(self): method test_hypot (line 97) | def test_hypot(self): method test_subtract (line 102) | def test_subtract(self): method test_multiply (line 107) | def test_multiply(self): method test_matmul (line 112) | def test_matmul(self): method test_power (line 117) | def test_power(self): method test_divide (line 122) | def test_divide(self): method test_divide_no_nan (line 127) | def test_divide_no_nan(self): method test_true_divide (line 132) | def test_true_divide(self): method test_append (line 137) | def test_append(self): method test_arctan2 (line 142) | def test_arctan2(self): method test_bitwise_and (line 147) | def test_bitwise_and(self): method test_bitwise_or (line 152) | def test_bitwise_or(self): method test_bitwise_xor (line 157) | def test_bitwise_xor(self): method test_bitwise_left_shift (line 162) | def test_bitwise_left_shift(self): method test_bitwise_right_shift (line 169) | def test_bitwise_right_shift(self): method test_cross (line 176) | def test_cross(self): method test_einsum (line 183) | def test_einsum(self): method test_full_like (line 215) | def test_full_like(self): method test_gcd (line 222) | def test_gcd(self): method test_geomspace (line 227) | def test_geomspace(self): method test_greater (line 240) | def test_greater(self): method test_greater_equal (line 245) | def test_greater_equal(self): method test_allclose (line 250) | def test_allclose(self): method test_isclose (line 255) | def test_isclose(self): method test_isin (line 260) | def test_isin(self): method test_kron (line 265) | def test_kron(self): method test_lcm (line 270) | def test_lcm(self): method test_ldexp (line 275) | def test_ldexp(self): method test_less (line 280) | def test_less(self): method test_less_equal (line 285) | def test_less_equal(self): method test_linspace (line 290) | def test_linspace(self): method test_logical_and (line 303) | def test_logical_and(self): method test_logical_or (line 308) | def test_logical_or(self): method test_logspace (line 313) | def test_logspace(self): method test_maximum (line 326) | def test_maximum(self): method test_minimum (line 331) | def test_minimum(self): method test_mod (line 336) | def test_mod(self): method test_fmod (line 341) | def test_fmod(self): method test_nextafter (line 346) | def test_nextafter(self): method test_not_equal (line 351) | def test_not_equal(self): method test_outer (line 356) | def test_outer(self): method test_quantile (line 361) | def test_quantile(self): method test_searchsorted (line 377) | def test_searchsorted(self): method test_take (line 385) | def test_take(self): method test_take_along_axis (line 408) | def test_take_along_axis(self): method test_tensordot (line 422) | def test_tensordot(self): method test_vdot (line 428) | def test_vdot(self): method test_inner (line 437) | def test_inner(self): method test_where (line 442) | def test_where(self): method test_floor_divide (line 449) | def test_floor_divide(self): method test_xor (line 454) | def test_xor(self): method test_shape_equal_basic_equality (line 459) | def test_shape_equal_basic_equality(self): method test_shape_equal_allow_none (line 466) | def test_shape_equal_allow_none(self): method test_shape_equal_different_shape_lengths (line 472) | def test_shape_equal_different_shape_lengths(self): method test_shape_equal_ignore_axes (line 477) | def test_shape_equal_ignore_axes(self): method test_shape_equal_only_none (line 485) | def test_shape_equal_only_none(self): method test_shape_equal_axis_as_list (line 490) | def test_shape_equal_axis_as_list(self): method test_shape_non_equal_with_negative_axis (line 495) | def test_shape_non_equal_with_negative_axis(self): method test_shape_equal_with_negative_axis (line 500) | def test_shape_equal_with_negative_axis(self): method test_shape_equal_zeros (line 505) | def test_shape_equal_zeros(self): method test_broadcast_shapes_conversion_to_list (line 512) | def test_broadcast_shapes_conversion_to_list(self): method test_broadcast_shapes_shape1_longer_than_shape2 (line 518) | def test_broadcast_shapes_shape1_longer_than_shape2(self): method test_broadcast_shapes_shape2_longer_than_shape1 (line 524) | def test_broadcast_shapes_shape2_longer_than_shape1(self): method test_broadcast_shapes_broadcasting_shape1_is_1 (line 530) | def test_broadcast_shapes_broadcasting_shape1_is_1(self): method test_broadcast_shapes_broadcasting_shape1_is_none (line 536) | def test_broadcast_shapes_broadcasting_shape1_is_none(self): method test_broadcast_shapes_broadcasting_shape2_conditions (line 547) | def test_broadcast_shapes_broadcasting_shape2_conditions(self): class NumpyTwoInputOpsStaticShapeTest (line 559) | class NumpyTwoInputOpsStaticShapeTest(testing.TestCase): method test_add (line 560) | def test_add(self): method test_heaviside (line 570) | def test_heaviside(self): method test_hypot (line 583) | def test_hypot(self): method test_subtract (line 588) | def test_subtract(self): method test_multiply (line 601) | def test_multiply(self): method test_matmul (line 614) | def test_matmul(self): method test_matmul_sparse (line 624) | def test_matmul_sparse(self): method test_power (line 641) | def test_power(self): method test_divide (line 654) | def test_divide(self): method test_divide_no_nan (line 667) | def test_divide_no_nan(self): method test_true_divide (line 680) | def test_true_divide(self): method test_append (line 693) | def test_append(self): method test_arctan2 (line 707) | def test_arctan2(self): method test_bitwise_and (line 720) | def test_bitwise_and(self): method test_bitwise_or (line 725) | def test_bitwise_or(self): method test_bitwise_xor (line 730) | def test_bitwise_xor(self): method test_bitwise_left_shift (line 735) | def test_bitwise_left_shift(self): method test_bitwise_right_shift (line 742) | def test_bitwise_right_shift(self): method test_cross (line 749) | def test_cross(self): method test_einsum (line 767) | def test_einsum(self): method test_full_like (line 798) | def test_full_like(self): method test_gcd (line 802) | def test_gcd(self): method test_geomspace (line 815) | def test_geomspace(self): method test_greater (line 825) | def test_greater(self): method test_greater_equal (line 838) | def test_greater_equal(self): method test_allclose (line 851) | def test_allclose(self): method test_isclose (line 859) | def test_isclose(self): method test_isin (line 872) | def test_isin(self): method test_kron (line 880) | def test_kron(self): method test_lcm (line 885) | def test_lcm(self): method test_ldexp (line 890) | def test_ldexp(self): method test_less (line 899) | def test_less(self): method test_less_equal (line 912) | def test_less_equal(self): method test_linspace (line 925) | def test_linspace(self): method test_logical_and (line 935) | def test_logical_and(self): method test_logical_or (line 948) | def test_logical_or(self): method test_logspace (line 961) | def test_logspace(self): method test_maximum (line 971) | def test_maximum(self): method test_minimum (line 984) | def test_minimum(self): method test_mod (line 997) | def test_mod(self): method test_fmod (line 1010) | def test_fmod(self): method test_nextafter (line 1023) | def test_nextafter(self): method test_not_equal (line 1032) | def test_not_equal(self): method test_outer (line 1045) | def test_outer(self): method test_quantile (line 1057) | def test_quantile(self): method test_searchsorted (line 1073) | def test_searchsorted(self): method test_take (line 1079) | def test_take(self): method test_take_along_axis (line 1090) | def test_take_along_axis(self): method test_tensordot (line 1101) | def test_tensordot(self): method test_vdot (line 1110) | def test_vdot(self): method test_inner (line 1115) | def test_inner(self): method test_where (line 1120) | def test_where(self): method test_floor_divide (line 1127) | def test_floor_divide(self): method test_xor (line 1137) | def test_xor(self): method test_digitize (line 1147) | def test_digitize(self): method test_correlate_mode_valid (line 1158) | def test_correlate_mode_valid(self): method test_correlate_mode_same (line 1169) | def test_correlate_mode_same(self): method test_correlate_mode_full (line 1180) | def test_correlate_mode_full(self): class NumpyOneInputOpsDynamicShapeTest (line 1192) | class NumpyOneInputOpsDynamicShapeTest(testing.TestCase): method test_mean (line 1193) | def test_mean(self): method test_all (line 1201) | def test_all(self): method test_any (line 1209) | def test_any(self): method test_trapezoid (line 1217) | def test_trapezoid(self): method test_vander (line 1224) | def test_vander(self): method test_var (line 1228) | def test_var(self): method test_sum (line 1236) | def test_sum(self): method test_amax (line 1244) | def test_amax(self): method test_amin (line 1252) | def test_amin(self): method test_square (line 1260) | def test_square(self): method test_negative (line 1264) | def test_negative(self): method test_abs (line 1268) | def test_abs(self): method test_absolute (line 1272) | def test_absolute(self): method test_squeeze (line 1276) | def test_squeeze(self): method test_transpose (line 1292) | def test_transpose(self): method test_arccos (line 1299) | def test_arccos(self): method test_arccosh (line 1303) | def test_arccosh(self): method test_arcsin (line 1307) | def test_arcsin(self): method test_arcsinh (line 1311) | def test_arcsinh(self): method test_arctan (line 1315) | def test_arctan(self): method test_arctanh (line 1319) | def test_arctanh(self): method test_argmax (line 1323) | def test_argmax(self): method test_argmax_negative_zero (line 1336) | def test_argmax_negative_zero(self): method test_argmin_negative_zero (line 1346) | def test_argmin_negative_zero(self): method test_argmin (line 1359) | def test_argmin(self): method test_argsort (line 1368) | def test_argsort(self): method test_array (line 1375) | def test_array(self): method test_average (line 1379) | def test_average(self): method test_bartlett (line 1396) | def test_bartlett(self): method test_blackman (line 1400) | def test_blackman(self): method test_hamming (line 1404) | def test_hamming(self): method test_hanning (line 1408) | def test_hanning(self): method test_kaiser (line 1412) | def test_kaiser(self): method test_bitwise_invert (line 1417) | def test_bitwise_invert(self): method test_broadcast_to (line 1423) | def test_broadcast_to(self): method test_cbrt (line 1431) | def test_cbrt(self): method test_ceil (line 1435) | def test_ceil(self): method test_clip (line 1439) | def test_clip(self): method test_concatenate (line 1443) | def test_concatenate(self): method test_concatenate_sparse (line 1462) | def test_concatenate_sparse(self): method test_conjugate (line 1481) | def test_conjugate(self): method test_conj (line 1485) | def test_conj(self): method test_copy (line 1489) | def test_copy(self): method test_corrcoef (line 1493) | def test_corrcoef(self): method test_cos (line 1497) | def test_cos(self): method test_cosh (line 1501) | def test_cosh(self): method test_count_nonzero (line 1505) | def test_count_nonzero(self): method test_cumprod (line 1512) | def test_cumprod(self): method test_cumsum (line 1519) | def test_cumsum(self): method test_deg2rad (line 1526) | def test_deg2rad(self): method test_diag (line 1530) | def test_diag(self): method test_diagflat (line 1539) | def test_diagflat(self): method test_diagonal (line 1552) | def test_diagonal(self): method test_diff (line 1556) | def test_diff(self): method test_dot (line 1566) | def test_dot(self): method test_empty_like (line 1578) | def test_empty_like(self): method test_exp (line 1583) | def test_exp(self): method test_exp2 (line 1587) | def test_exp2(self): method test_expand_dims (line 1591) | def test_expand_dims(self): method test_expm1 (line 1603) | def test_expm1(self): method test_flip (line 1607) | def test_flip(self): method test_floor (line 1611) | def test_floor(self): method test_get_item (line 1615) | def test_get_item(self): method test_hstack (line 1637) | def test_hstack(self): method test_imag (line 1646) | def test_imag(self): method test_isfinite (line 1650) | def test_isfinite(self): method test_isinf (line 1654) | def test_isinf(self): method test_isnan (line 1658) | def test_isnan(self): method test_isneginf (line 1662) | def test_isneginf(self): method test_isposinf (line 1666) | def test_isposinf(self): method test_isreal (line 1670) | def test_isreal(self): method test_log (line 1674) | def test_log(self): method test_log10 (line 1678) | def test_log10(self): method test_log1p (line 1682) | def test_log1p(self): method test_log2 (line 1686) | def test_log2(self): method test_logaddexp (line 1690) | def test_logaddexp(self): method test_logaddexp2 (line 1694) | def test_logaddexp2(self): method test_logical_not (line 1698) | def test_logical_not(self): method test_max (line 1702) | def test_max(self): method test_median (line 1706) | def test_median(self): method test_meshgrid (line 1716) | def test_meshgrid(self): method test_moveaxis (line 1725) | def test_moveaxis(self): method test_nanargmax (line 1737) | def test_nanargmax(self): method test_nanargmin (line 1748) | def test_nanargmin(self): method test_nancumsum (line 1759) | def test_nancumsum(self): method test_nancumprod (line 1771) | def test_nancumprod(self): method test_nanmax (line 1783) | def test_nanmax(self): method test_nanmean (line 1806) | def test_nanmean(self): method test_nanmin (line 1829) | def test_nanmin(self): method test_nanprod (line 1852) | def test_nanprod(self): method test_nanstd (line 1875) | def test_nanstd(self): method test_nansum (line 1898) | def test_nansum(self): method test_nanvar (line 1921) | def test_nanvar(self): method test_ndim (line 1944) | def test_ndim(self): method test_nonzero (line 1948) | def test_nonzero(self): method test_ones_like (line 1956) | def test_ones_like(self): method test_zeros_like (line 1961) | def test_zeros_like(self): method test_pad (line 1966) | def test_pad(self): method test_prod (line 1979) | def test_prod(self): method test_ptp (line 1985) | def test_ptp(self): method test_ravel (line 1991) | def test_ravel(self): method test_unravel_index (line 1995) | def test_unravel_index(self): method test_real (line 2015) | def test_real(self): method test_reciprocal (line 2019) | def test_reciprocal(self): method test_repeat (line 2023) | def test_repeat(self): method test_reshape (line 2030) | def test_reshape(self): method test_roll (line 2035) | def test_roll(self): method test_round (line 2041) | def test_round(self): method test_sign (line 2045) | def test_sign(self): method test_signbit (line 2049) | def test_signbit(self): method test_sin (line 2053) | def test_sin(self): method test_sinc (line 2057) | def test_sinc(self): method test_sinh (line 2061) | def test_sinh(self): method test_size (line 2065) | def test_size(self): method test_sort (line 2069) | def test_sort(self): method test_split (line 2075) | def test_split(self): method test_sqrt (line 2084) | def test_sqrt(self): method test_stack (line 2088) | def test_stack(self): method test_std (line 2094) | def test_std(self): method test_swapaxes (line 2102) | def test_swapaxes(self): method test_tan (line 2106) | def test_tan(self): method test_tanh (line 2110) | def test_tanh(self): method test_tile (line 2114) | def test_tile(self): method test_trace (line 2125) | def test_trace(self): method test_tril (line 2130) | def test_tril(self): method test_triu (line 2136) | def test_triu(self): method test_trunc (line 2142) | def test_trunc(self): method test_vstack (line 2146) | def test_vstack(self): method test_dstack (line 2155) | def test_dstack(self): method test_hsplit (line 2168) | def test_hsplit(self): method test_vsplit (line 2185) | def test_vsplit(self): method test_argpartition (line 2193) | def test_argpartition(self): method test_angle (line 2201) | def test_angle(self): method test_view (line 2205) | def test_view(self): method test_array_split (line 2216) | def test_array_split(self): class NumpyOneInputOpsStaticShapeTest (line 2224) | class NumpyOneInputOpsStaticShapeTest(testing.TestCase): method test_mean (line 2225) | def test_mean(self): method test_all (line 2229) | def test_all(self): method test_any (line 2233) | def test_any(self): method test_trapezoid (line 2237) | def test_trapezoid(self): method test_vander (line 2241) | def test_vander(self): method test_var (line 2245) | def test_var(self): method test_sum (line 2249) | def test_sum(self): method test_amax (line 2253) | def test_amax(self): method test_amin (line 2257) | def test_amin(self): method test_square (line 2261) | def test_square(self): method test_negative (line 2265) | def test_negative(self): method test_abs (line 2269) | def test_abs(self): method test_absolute (line 2273) | def test_absolute(self): method test_squeeze (line 2277) | def test_squeeze(self): method test_transpose (line 2296) | def test_transpose(self): method test_arccos (line 2300) | def test_arccos(self): method test_arccosh (line 2304) | def test_arccosh(self): method test_arcsin (line 2308) | def test_arcsin(self): method test_arcsinh (line 2312) | def test_arcsinh(self): method test_arctan (line 2316) | def test_arctan(self): method test_arctanh (line 2320) | def test_arctanh(self): method test_argmax (line 2324) | def test_argmax(self): method test_argmin (line 2329) | def test_argmin(self): method test_argsort (line 2334) | def test_argsort(self): method test_array (line 2339) | def test_array(self): method test_average (line 2343) | def test_average(self): method test_bitwise_invert (line 2347) | def test_bitwise_invert(self): method test_broadcast_to (line 2353) | def test_broadcast_to(self): method test_cbrt (line 2361) | def test_cbrt(self): method test_ceil (line 2365) | def test_ceil(self): method test_clip (line 2369) | def test_clip(self): method test_concatenate (line 2373) | def test_concatenate(self): method test_conjugate (line 2382) | def test_conjugate(self): method test_conj (line 2386) | def test_conj(self): method test_copy (line 2390) | def test_copy(self): method test_cos (line 2394) | def test_cos(self): method test_cosh (line 2398) | def test_cosh(self): method test_count_nonzero (line 2402) | def test_count_nonzero(self): method test_cumprod (line 2406) | def test_cumprod(self): method test_cumsum (line 2410) | def test_cumsum(self): method test_deg2rad (line 2414) | def test_deg2rad(self): method test_diag (line 2418) | def test_diag(self): method test_diagflat (line 2433) | def test_diagflat(self): method test_diagonal (line 2450) | def test_diagonal(self): method test_diff (line 2462) | def test_diff(self): method test_dot (line 2473) | def test_dot(self): method test_empty_like (line 2490) | def test_empty_like(self): method test_exp (line 2495) | def test_exp(self): method test_exp2 (line 2499) | def test_exp2(self): method test_expand_dims (line 2503) | def test_expand_dims(self): method test_expm1 (line 2514) | def test_expm1(self): method test_flip (line 2518) | def test_flip(self): method test_floor (line 2522) | def test_floor(self): method test_get_item (line 2526) | def test_get_item(self): method test_hstack (line 2540) | def test_hstack(self): method test_imag (line 2545) | def test_imag(self): method test_isfinite (line 2549) | def test_isfinite(self): method test_isinf (line 2553) | def test_isinf(self): method test_isnan (line 2557) | def test_isnan(self): method test_isneginf (line 2561) | def test_isneginf(self): method test_isposinf (line 2565) | def test_isposinf(self): method test_isreal (line 2569) | def test_isreal(self): method test_log (line 2573) | def test_log(self): method test_log10 (line 2577) | def test_log10(self): method test_log1p (line 2581) | def test_log1p(self): method test_log2 (line 2585) | def test_log2(self): method test_logaddexp (line 2589) | def test_logaddexp(self): method test_logaddexp2 (line 2593) | def test_logaddexp2(self): method test_logical_not (line 2597) | def test_logical_not(self): method test_max (line 2601) | def test_max(self): method test_median (line 2605) | def test_median(self): method test_meshgrid (line 2613) | def test_meshgrid(self): method test_moveaxis (line 2626) | def test_moveaxis(self): method test_nanargmax (line 2634) | def test_nanargmax(self): method test_nanargmin (line 2640) | def test_nanargmin(self): method test_nancumsum (line 2646) | def test_nancumsum(self): method test_nancumprod (line 2654) | def test_nancumprod(self): method test_nanmax (line 2662) | def test_nanmax(self): method test_nanmean (line 2669) | def test_nanmean(self): method test_nanmin (line 2676) | def test_nanmin(self): method test_nanprod_ (line 2683) | def test_nanprod_(self): method test_nanstd_ (line 2691) | def test_nanstd_(self): method test_nansum_ (line 2698) | def test_nansum_(self): method test_nanvar_ (line 2705) | def test_nanvar_(self): method test_ndim (line 2712) | def test_ndim(self): method test_ones_like (line 2716) | def test_ones_like(self): method test_zeros_like (line 2721) | def test_zeros_like(self): method test_pad (line 2726) | def test_pad(self): method test_prod (line 2736) | def test_prod(self): method test_ptp (line 2742) | def test_ptp(self): method test_ravel (line 2748) | def test_ravel(self): method test_unravel_index (line 2752) | def test_unravel_index(self): method test_real (line 2765) | def test_real(self): method test_reciprocal (line 2769) | def test_reciprocal(self): method test_repeat (line 2773) | def test_repeat(self): method test_reshape (line 2785) | def test_reshape(self): method test_roll (line 2792) | def test_roll(self): method test_round (line 2798) | def test_round(self): method test_sign (line 2802) | def test_sign(self): method test_signbit (line 2806) | def test_signbit(self): method test_sin (line 2810) | def test_sin(self): method test_sinc (line 2814) | def test_sinc(self): method test_sinh (line 2818) | def test_sinh(self): method test_size (line 2822) | def test_size(self): method test_sort (line 2826) | def test_sort(self): method test_split (line 2832) | def test_split(self): method test_hsplit (line 2845) | def test_hsplit(self): method test_vsplit (line 2872) | def test_vsplit(self): method test_sqrt (line 2886) | def test_sqrt(self): method test_stack (line 2890) | def test_stack(self): method test_std (line 2901) | def test_std(self): method test_swapaxes (line 2905) | def test_swapaxes(self): method test_tan (line 2909) | def test_tan(self): method test_tanh (line 2913) | def test_tanh(self): method test_tile (line 2917) | def test_tile(self): method test_trace (line 2924) | def test_trace(self): method test_tril (line 2929) | def test_tril(self): method test_triu (line 2935) | def test_triu(self): method test_trunc (line 2941) | def test_trunc(self): method test_vstack (line 2945) | def test_vstack(self): method test_dstack (line 2950) | def test_dstack(self): method test_argpartition (line 2963) | def test_argpartition(self): method test_angle (line 2971) | def test_angle(self): method test_view (line 2975) | def test_view(self): method test_array_split (line 2986) | def test_array_split(self): class NumpyTwoInputOpsCorrectnessTest (line 2995) | class NumpyTwoInputOpsCorrectnessTest(testing.TestCase): method test_add (line 2996) | def test_add(self): method test_heaviside (line 3006) | def test_heaviside(self): method test_hypot (line 3017) | def test_hypot(self): method test_subtract (line 3028) | def test_subtract(self): method test_multiply (line 3038) | def test_multiply(self): method test_matmul (line 3048) | def test_matmul(self): method test_matmul_sparse (line 3092) | def test_matmul_sparse(self, dtype, x_shape, y_shape, x_sparse, y_spar... method test_power (line 3133) | def test_power(self): method test_divide (line 3143) | def test_divide(self): method test_divide_no_nan (line 3153) | def test_divide_no_nan(self): method test_true_divide (line 3164) | def test_true_divide(self): method test_append (line 3174) | def test_append(self): method test_arctan2 (line 3186) | def test_arctan2(self): method test_bitwise_and (line 3210) | def test_bitwise_and(self): method test_bitwise_or (line 3216) | def test_bitwise_or(self): method test_bitwise_xor (line 3222) | def test_bitwise_xor(self): method test_bitwise_left_shift (line 3228) | def test_bitwise_left_shift(self): method test_bitwise_right_shift (line 3236) | def test_bitwise_right_shift(self): method test_cross (line 3244) | def test_cross(self): method test_einsum (line 3274) | def test_einsum(self): method test_einsum_custom_ops_for_tensorflow (line 3309) | def test_einsum_custom_ops_for_tensorflow(self): method test_full_like (line 3450) | def test_full_like(self): method test_gcd (line 3472) | def test_gcd(self): method test_geomspace (line 3483) | def test_geomspace(self): method test_greater (line 3523) | def test_greater(self): method test_greater_equal (line 3534) | def test_greater_equal(self): method test_allclose (line 3563) | def test_allclose(self): method test_isclose (line 3578) | def test_isclose(self): method test_isin (line 3589) | def test_isin(self): method test_kron (line 3649) | def test_kron(self): method test_lcm (line 3655) | def test_lcm(self): method test_ldexp (line 3671) | def test_ldexp(self): method test_less (line 3677) | def test_less(self): method test_less_equal (line 3688) | def test_less_equal(self): method test_linspace (line 3699) | def test_linspace(self): method test_logical_and (line 3762) | def test_logical_and(self): method test_logical_or (line 3773) | def test_logical_or(self): method test_logspace (line 3784) | def test_logspace(self): method test_maximum (line 3827) | def test_maximum(self): method test_minimum (line 3838) | def test_minimum(self): method test_mod (line 3849) | def test_mod(self): method test_fmod (line 3860) | def test_fmod(self): method test_nextafter (line 3871) | def test_nextafter(self): method test_not_equal (line 3877) | def test_not_equal(self): method test_outer (line 3888) | def test_outer(self): method test_quantile (line 3899) | def test_quantile(self): method test_quantile_in_tf_function (line 3944) | def test_quantile_in_tf_function(self): method test_take (line 3958) | def test_take(self): method test_take_sparse (line 4019) | def test_take_sparse(self, dtype, axis): method test_take_ragged (line 4060) | def test_take_ragged(self, dtype, axis): method test_take_along_axis (line 4081) | def test_take_along_axis(self): method test_tensordot (line 4128) | def test_tensordot(self): method test_vdot (line 4151) | def test_vdot(self): method test_inner (line 4157) | def test_inner(self): method test_where (line 4163) | def test_where(self): method test_digitize (line 4176) | def test_digitize(self): class NumpyOneInputOpsCorrectnessTest (line 4211) | class NumpyOneInputOpsCorrectnessTest(testing.TestCase): method test_mean (line 4212) | def test_mean(self): method test_array_split (line 4234) | def test_array_split(self): method test_all (line 4258) | def test_all(self): method test_any (line 4276) | def test_any(self): method test_trapezoid (line 4294) | def test_trapezoid(self): method test_vander (line 4307) | def test_vander(self): method test_var (line 4329) | def test_var(self): method test_sum (line 4347) | def test_sum(self): method test_amax (line 4365) | def test_amax(self): method test_amin (line 4383) | def test_amin(self): method test_square (line 4401) | def test_square(self): method test_negative (line 4407) | def test_negative(self): method test_abs (line 4413) | def test_abs(self): method test_absolute (line 4419) | def test_absolute(self): method test_squeeze (line 4425) | def test_squeeze(self): method test_transpose (line 4445) | def test_transpose(self): method test_arccos (line 4459) | def test_arccos(self): method test_arccosh (line 4465) | def test_arccosh(self): method test_arcsin (line 4471) | def test_arcsin(self): method test_arcsinh (line 4477) | def test_arcsinh(self): method test_arctan (line 4483) | def test_arctan(self): method test_arctanh (line 4489) | def test_arctanh(self): method test_argmax (line 4495) | def test_argmax(self): method test_argmin (line 4515) | def test_argmin(self): method test_argsort (line 4529) | def test_argsort(self): method test_array (line 4543) | def test_array(self): method test_average (line 4561) | def test_average(self): method test_bartlett (line 4589) | def test_bartlett(self): method test_blackman (line 4595) | def test_blackman(self): method test_hamming (line 4601) | def test_hamming(self): method test_hanning (line 4607) | def test_hanning(self): method test_kaiser (line 4613) | def test_kaiser(self): method test_bincount (line 4627) | def test_bincount(self, sparse_input, sparse_arg): method test_bitwise_invert (line 4686) | def test_bitwise_invert(self): method test_broadcast_to (line 4693) | def test_broadcast_to(self): method test_cbrt (line 4705) | def test_cbrt(self): method test_ceil (line 4716) | def test_ceil(self): method test_clip (line 4721) | def test_clip(self): method test_concatenate (line 4729) | def test_concatenate(self): method test_view (line 4759) | def test_view(self): method test_concatenate_sparse (line 4805) | def test_concatenate_sparse(self, axis): method test_conjugate (line 4850) | def test_conjugate(self): method test_conj (line 4855) | def test_conj(self): method test_copy (line 4860) | def test_copy(self): method test_corrcoef (line 4865) | def test_corrcoef(self): method test_cos (line 4870) | def test_cos(self): method test_cosh (line 4875) | def test_cosh(self): method test_count_nonzero (line 4880) | def test_count_nonzero(self): method test_cumprod (line 4908) | def test_cumprod(self, axis, dtype): method test_cumsum (line 4923) | def test_cumsum(self, axis, dtype): method test_deg2rad (line 4934) | def test_deg2rad(self): method test_diag (line 4939) | def test_diag(self): method test_diagflat (line 4958) | def test_diagflat(self): method test_diagonal (line 4982) | def test_diagonal(self): method test_diff (line 5010) | def test_diff(self): method test_dot (line 5026) | def test_dot(self): method test_exp (line 5038) | def test_exp(self): method test_exp2 (line 5043) | def test_exp2(self): method test_expand_dims (line 5048) | def test_expand_dims(self): method test_expm1 (line 5079) | def test_expm1(self): method test_flip (line 5084) | def test_flip(self): method test_floor (line 5094) | def test_floor(self): method test_hstack (line 5099) | def test_hstack(self): method test_imag (line 5110) | def test_imag(self): method test_isfinite (line 5115) | def test_isfinite(self): method test_isinf (line 5120) | def test_isinf(self): method test_isnan (line 5125) | def test_isnan(self): method test_isneginf (line 5130) | def test_isneginf(self): method test_isposinf (line 5137) | def test_isposinf(self): method test_isreal (line 5144) | def test_isreal(self): method test_log (line 5153) | def test_log(self): method test_log10 (line 5158) | def test_log10(self): method test_log1p (line 5163) | def test_log1p(self): method test_log2 (line 5168) | def test_log2(self): method test_logaddexp (line 5173) | def test_logaddexp(self): method test_logaddexp2 (line 5179) | def test_logaddexp2(self): method test_logical_not (line 5185) | def test_logical_not(self): method test_max (line 5190) | def test_max(self): method test_min (line 5212) | def test_min(self): method test_median (line 5240) | def test_median(self): method test_meshgrid (line 5260) | def test_meshgrid(self): method test_moveaxis (line 5295) | def test_moveaxis(self): method test_ndim (line 5318) | def test_ndim(self): method test_ndim_tf_ragged (line 5327) | def test_ndim_tf_ragged(self): method test_nonzero (line 5343) | def test_nonzero(self): method test_ones_like (line 5348) | def test_ones_like(self): method test_pad (line 5368) | def test_pad(self, dtype, mode, constant_values): method test_prod (line 5428) | def test_prod(self): method test_ptp (line 5446) | def test_ptp(self): method test_ravel (line 5471) | def test_ravel(self): method test_unravel_index (line 5476) | def test_unravel_index(self): method test_real (line 5489) | def test_real(self): method test_reciprocal (line 5494) | def test_reciprocal(self): method test_repeat (line 5499) | def test_repeat(self): method test_reshape (line 5518) | def test_reshape(self): method test_roll (line 5524) | def test_roll(self): method test_round (line 5533) | def test_round(self): method test_searchsorted (line 5552) | def test_searchsorted(self): method test_sign (line 5559) | def test_sign(self): method test_signbit (line 5564) | def test_signbit(self): method test_sin (line 5569) | def test_sin(self): method test_sinc (line 5574) | def test_sinc(self): method test_sinh (line 5579) | def test_sinh(self): method test_size (line 5584) | def test_size(self): method test_sort (line 5589) | def test_sort(self): method test_split (line 5596) | def test_split(self): method test_split_with_jit_in_tf (line 5633) | def test_split_with_jit_in_tf(self): method test_hsplit (line 5650) | def test_hsplit(self): method test_vsplit (line 5712) | def test_vsplit(self): method test_sqrt (line 5744) | def test_sqrt(self): method test_sqrt_int32 (line 5754) | def test_sqrt_int32(self): method test_stack (line 5764) | def test_stack(self): method test_std (line 5772) | def test_std(self): method test_swapaxes (line 5788) | def test_swapaxes(self): method test_tan (line 5799) | def test_tan(self): method test_tanh (line 5804) | def test_tanh(self): method test_tile (line 5809) | def test_tile(self): method test_trace (line 5823) | def test_trace(self): method test_tril (line 5835) | def test_tril(self): method test_tril_in_layer (line 5846) | def test_tril_in_layer(self): method test_tril_with_jit_in_tf (line 5873) | def test_tril_with_jit_in_tf(self): method test_triu (line 5887) | def test_triu(self): method test_triu_in_layer (line 5898) | def test_triu_in_layer(self): method test_triu_with_jit_in_tf (line 5925) | def test_triu_with_jit_in_tf(self): method test_trunc (line 5939) | def test_trunc(self): method test_vstack (line 5948) | def test_vstack(self): method test_dstack (line 5954) | def test_dstack(self): method test_floor_divide (line 5968) | def test_floor_divide(self): method test_xor (line 5978) | def test_xor(self): method test_correlate (line 5989) | def test_correlate(self): method test_correlate_different_size (line 6008) | def test_correlate_different_size(self): method test_select (line 6027) | def test_select(self): method test_slogdet (line 6047) | def test_slogdet(self): method test_nanargmax (line 6063) | def test_nanargmax(self): method test_nanargmin (line 6101) | def test_nanargmin(self): method test_nancumsum (line 6139) | def test_nancumsum(self): method test_nancumprod (line 6169) | def test_nancumprod(self): method test_nanmax (line 6200) | def test_nanmax(self): method test_nanmean (line 6238) | def test_nanmean(self): method test_nanmin (line 6276) | def test_nanmin(self): method test_nanprod (line 6314) | def test_nanprod(self): method test_nanstd (line 6352) | def test_nanstd(self): method test_nansum (line 6391) | def test_nansum(self): method test_nanvar (line 6429) | def test_nanvar(self): method test_nan_to_num (line 6468) | def test_nan_to_num(self): method test_vectorize (line 6488) | def test_vectorize(self): method test_argpartition (line 6510) | def test_argpartition(self): method test_angle (line 6523) | def test_angle(self): class NumpyArrayCreateOpsCorrectnessTest (line 6530) | class NumpyArrayCreateOpsCorrectnessTest(testing.TestCase): method test_ones (line 6531) | def test_ones(self): method test_zeros (line 6534) | def test_zeros(self): method test_eye (line 6537) | def test_eye(self): method test_eye_raises_error_with_floats (line 6557) | def test_eye_raises_error_with_floats(self): method test_arange (line 6570) | def test_arange(self): method test_full (line 6584) | def test_full(self): method test_identity (line 6599) | def test_identity(self): method test_tri (line 6602) | def test_tri(self): function create_sparse_tensor (line 6617) | def create_sparse_tensor(x, indices_from=None, start=0, delta=2): function create_indexed_slices (line 6637) | def create_indexed_slices(x, indices_from=None, start=0, delta=2): function get_sparseness_combinations (line 6658) | def get_sparseness_combinations(dense_to_sparse_fn): function sparseness (line 6681) | def sparseness(x): function union_sparseness (line 6699) | def union_sparseness(x1, x2): function intersection_sparseness (line 6709) | def intersection_sparseness(x1, x2): function division_sparseness (line 6723) | def division_sparseness(x1, x2): function snake_to_pascal_case (line 6731) | def snake_to_pascal_case(name): class SparseTest (line 6739) | class SparseTest(testing.TestCase): method assertSameSparseness (line 6875) | def assertSameSparseness(self, x, y): method assertSparseness (line 6878) | def assertSparseness(self, x, expected_sparseness): method test_elementwise_unary_symbolic_static_shape (line 6882) | def test_elementwise_unary_symbolic_static_shape( method test_elementwise_unary_symbolic_dynamic_shape (line 6892) | def test_elementwise_unary_symbolic_dynamic_shape( method test_other_unary_symbolic_static_shape (line 6902) | def test_other_unary_symbolic_static_shape( method test_other_unary_symbolic_dynamic_shape (line 6919) | def test_other_unary_symbolic_dynamic_shape( method test_densifying_unary_sparse_correctness (line 6937) | def test_densifying_unary_sparse_correctness( method test_densifying_unary_indexed_slices_correctness (line 6948) | def test_densifying_unary_indexed_slices_correctness( method test_elementwise_unary_sparse_correctness (line 6959) | def test_elementwise_unary_sparse_correctness( method test_elementwise_unary_indexed_slices_correctness (line 6975) | def test_elementwise_unary_indexed_slices_correctness( method test_other_unary_sparse_correctness (line 6991) | def test_other_unary_sparse_correctness( method test_binary_symbolic_static_shape (line 7029) | def test_binary_symbolic_static_shape( method test_binary_symbolic_dynamic_shape (line 7044) | def test_binary_symbolic_dynamic_shape( method test_binary_correctness_sparse_tensor (line 7061) | def test_binary_correctness_sparse_tensor( method test_binary_correctness_indexed_slices (line 7082) | def test_binary_correctness_indexed_slices( method test_divide_with_zeros_nans (line 7102) | def test_divide_with_zeros_nans(self, sparse_type, dtype): class NumpyDtypeTest (line 7121) | class NumpyDtypeTest(testing.TestCase): method test_add (line 7157) | def test_add(self, dtypes): method test_array_split (line 7177) | def test_array_split(self, dtype): method test_add_python_types (line 7190) | def test_add_python_types(self, dtype): method test_bartlett (line 7209) | def test_bartlett(self, dtype): method test_blackman (line 7222) | def test_blackman(self, dtype): method test_hamming (line 7235) | def test_hamming(self, dtype): method test_hanning (line 7248) | def test_hanning(self, dtype): method test_kaiser (line 7261) | def test_kaiser(self, dtype): method test_bincount (line 7275) | def test_bincount(self, dtype): method test_subtract (line 7339) | def test_subtract(self, dtypes): method test_subtract_python_types (line 7360) | def test_subtract_python_types(self, dtype): method test_matmul (line 7384) | def test_matmul(self, dtypes): method test_multiply (line 7414) | def test_multiply(self, dtypes): method test_multiply_python_types (line 7432) | def test_multiply_python_types(self, dtype): method test_mean (line 7451) | def test_mean(self, dtype): method test_max (line 7464) | def test_max(self, dtype): method test_ones (line 7487) | def test_ones(self, dtype): method test_zeros (line 7498) | def test_zeros(self, dtype): method test_absolute (line 7509) | def test_absolute(self, dtype): method test_all (line 7525) | def test_all(self, dtype): method test_amax (line 7538) | def test_amax(self, dtype): method test_amin (line 7551) | def test_amin(self, dtype): method test_any (line 7564) | def test_any(self, dtype): method test_append (line 7579) | def test_append(self, dtypes): method test_argmax (line 7597) | def test_argmax(self, dtype): method test_argmin (line 7615) | def test_argmin(self, dtype): method test_argpartition (line 7633) | def test_argpartition(self, dtype): method test_argsort (line 7652) | def test_argsort(self, dtype): method test_arange (line 7685) | def test_arange(self, start, stop, step, dtype): method test_arccos (line 7704) | def test_arccos(self, dtype): method test_arccosh (line 7720) | def test_arccosh(self, dtype): method test_arcsin (line 7738) | def test_arcsin(self, dtype): method test_arcsinh (line 7754) | def test_arcsinh(self, dtype): method test_arctan (line 7772) | def test_arctan(self, dtype): method test_arctan2 (line 7790) | def test_arctan2(self, dtypes): method test_arctanh (line 7812) | def test_arctanh(self, dtype): method test_array (line 7846) | def test_array(self, x, expected_dtype): method test_average (line 7853) | def test_average(self, dtypes): method test_bitwise_and (line 7879) | def test_bitwise_and(self, dtypes): method test_bitwise_invert (line 7895) | def test_bitwise_invert(self, dtype): method test_bitwise_or (line 7910) | def test_bitwise_or(self, dtypes): method test_bitwise_xor (line 7926) | def test_bitwise_xor(self, dtypes): method test_bitwise_left_shift (line 7944) | def test_bitwise_left_shift(self, dtypes): method test_bitwise_right_shift (line 7964) | def test_bitwise_right_shift(self, dtypes): method test_broadcast_to (line 7984) | def test_broadcast_to(self, dtype): method test_cbrt (line 8002) | def test_cbrt(self, dtype): method test_ceil (line 8016) | def test_ceil(self, dtype): method test_clip (line 8041) | def test_clip(self, dtype): method test_concatenate (line 8061) | def test_concatenate(self, dtypes): method test_cos (line 8081) | def test_cos(self, dtype): method test_cosh (line 8097) | def test_cosh(self, dtype): method test_copy (line 8113) | def test_copy(self, dtype): method test_corrcoef (line 8127) | def test_corrcoef(self, dtype): method test_correlate (line 8145) | def test_correlate(self, dtypes): method test_count_nonzero (line 8164) | def test_count_nonzero(self, dtype): method test_cross (line 8179) | def test_cross(self, dtypes): method test_cumprod (line 8197) | def test_cumprod(self, dtype): method test_cumsum (line 8213) | def test_cumsum(self, dtype): method test_deg2rad (line 8227) | def test_deg2rad(self, dtype): method test_diag (line 8244) | def test_diag(self, dtype): method test_diagflat (line 8258) | def test_diagflat(self, dtype): method test_diagonal (line 8287) | def test_diagonal(self, dtype): method test_diff (line 8303) | def test_diff(self, dtype): method test_digitize (line 8317) | def test_digitize(self, dtype): method test_divide (line 8337) | def test_divide(self, dtypes): method test_divide_python_types (line 8351) | def test_divide_python_types(self, dtype): method test_dot (line 8372) | def test_dot(self, dtypes): method test_dstack (line 8390) | def test_dstack(self, dtypes): method test_einsum (line 8416) | def test_einsum(self, dtypes): method test_einsum_custom_ops_for_tensorflow (line 8467) | def test_einsum_custom_ops_for_tensorflow(self, dtypes): method test_empty (line 8530) | def test_empty(self, dtype): method test_empty_like (line 8541) | def test_empty_like(self, dtype): method test_equal (line 8562) | def test_equal(self, dtypes): method test_exp (line 8581) | def test_exp(self, dtype): method test_exp2 (line 8596) | def test_exp2(self, dtype): method test_expand_dims (line 8611) | def test_expand_dims(self, dtype): method test_expm1 (line 8627) | def test_expm1(self, dtype): method test_eye (line 8643) | def test_eye(self, dtype): method test_flip (line 8665) | def test_flip(self, dtype): method test_floor (line 8681) | def test_floor(self, dtype): method test_floor_divide (line 8700) | def test_floor_divide(self, dtypes): method test_floor_divide_python_types (line 8721) | def test_floor_divide_python_types(self, dtype): method test_full (line 8742) | def test_full(self, dtype): method test_full_like (line 8759) | def test_full_like(self, dtype): method test_gcd (line 8777) | def test_gcd(self, dtypes): method test_greater (line 8798) | def test_greater(self, dtypes): method test_greater_equal (line 8819) | def test_greater_equal(self, dtypes): method test_heaviside (line 8842) | def test_heaviside(self, dtypes): method test_hstack (line 8863) | def test_hstack(self, dtypes): method test_hypot (line 8884) | def test_hypot(self, dtypes): method test_identity (line 8903) | def test_identity(self, dtype): method test_isclose (line 8918) | def test_isclose(self, dtypes): method test_isfinite (line 8937) | def test_isfinite(self, dtype): method test_isin (line 8955) | def test_isin(self, dtypes): method test_isinf (line 8974) | def test_isinf(self, dtype): method test_isnan (line 8988) | def test_isnan(self, dtype): method test_isneginf (line 9002) | def test_isneginf(self, dtype): method test_isposinf (line 9018) | def test_isposinf(self, dtype): method test_isreal (line 9034) | def test_isreal(self, dtype): method test_kron (line 9050) | def test_kron(self, dtypes): method test_lcm (line 9071) | def test_lcm(self, dtypes): method test_ldexp (line 9092) | def test_ldexp(self, dtypes): method test_less (line 9113) | def test_less(self, dtypes): method test_less_equal (line 9134) | def test_less_equal(self, dtypes): method test_linspace (line 9164) | def test_linspace(self, start_and_stop, num, dtype): method test_log (line 9186) | def test_log(self, dtype): method test_log10 (line 9202) | def test_log10(self, dtype): method test_log1p (line 9218) | def test_log1p(self, dtype): method test_log2 (line 9234) | def test_log2(self, dtype): method test_logaddexp (line 9252) | def test_logaddexp(self, dtypes): method test_logaddexp2 (line 9279) | def test_logaddexp2(self, dtypes): method test_logspace (line 9309) | def test_logspace(self, start_and_stop, num, dtype): method test_geomspace (line 9344) | def test_geomspace(self, start_and_stop, num, dtype): method test_logical_and (line 9368) | def test_logical_and(self, dtypes): method test_logical_not (line 9389) | def test_logical_not(self, dtype): method test_logical_or (line 9407) | def test_logical_or(self, dtypes): method test_logical_xor (line 9428) | def test_logical_xor(self, dtypes): method test_maximum (line 9451) | def test_maximum(self, dtypes): method test_maximum_python_types (line 9470) | def test_maximum_python_types(self, dtype): method test_median (line 9489) | def test_median(self, dtype): method test_meshgrid (line 9512) | def test_meshgrid(self, dtype): method test_min (line 9533) | def test_min(self, dtype): method test_minimum (line 9558) | def test_minimum(self, dtypes): method test_minimum_python_types (line 9577) | def test_minimum_python_types(self, dtype): method test_mod (line 9598) | def test_mod(self, dtypes): method test_fmod (line 9619) | def test_fmod(self, dtypes): method test_moveaxis (line 9638) | def test_moveaxis(self, dtype): method test_nanargmax (line 9653) | def test_nanargmax(self, dtype): method test_nanargmin (line 9672) | def test_nanargmin(self, dtype): method test_nancumsum (line 9691) | def test_nancumsum(self, dtype): method test_nancumprod (line 9710) | def test_nancumprod(self, dtype): method test_nanmax (line 9729) | def test_nanmax(self, dtype): method test_nanmean (line 9746) | def test_nanmean(self, dtype): method test_nanmin (line 9765) | def test_nanmin(self, dtype): method test_nanprod (line 9782) | def test_nanprod(self, dtype): method test_nanstd (line 9802) | def test_nanstd(self, dtype): method test_nansum (line 9824) | def test_nansum(self, dtype): method test_nanvar (line 9841) | def test_nanvar(self, dtype): method test_nan_to_num (line 9860) | def test_nan_to_num(self, dtype): method test_nextafter (line 9878) | def test_nextafter(self, dtypes): method test_nonzero (line 9897) | def test_nonzero(self, dtype): method test_not_equal (line 9915) | def test_not_equal(self, dtypes): method test_ones_like (line 9934) | def test_ones_like(self, dtype): method test_outer (line 9952) | def test_outer(self, dtypes): method test_pad (line 9971) | def test_pad(self, dtype): method test_power (line 9997) | def test_power(self, dtypes): method test_power_python_types (line 10017) | def test_power_python_types(self, dtype): method test_prod (line 10036) | def test_prod(self, dtype): method test_ptp (line 10055) | def test_ptp(self, dtype): method test_quantile (line 10075) | def test_quantile(self, dtype): method test_searchsorted (line 10094) | def test_searchsorted(self, dtype): method test_ravel (line 10118) | def test_ravel(self, dtype): method test_unravel_index (line 10135) | def test_unravel_index(self, dtype): method test_repeat (line 10162) | def test_repeat(self, dtype): method test_reshape (line 10179) | def test_reshape(self, dtype): method test_roll (line 10196) | def test_roll(self, dtype): method test_round (line 10213) | def test_round(self, dtype): method test_sign (line 10232) | def test_sign(self, dtype): method test_signbit (line 10251) | def test_signbit(self, dtype): method test_sin (line 10268) | def test_sin(self, dtype): method test_sinc (line 10284) | def test_sinc(self, dtype): method test_sinh (line 10300) | def test_sinh(self, dtype): method test_sort (line 10316) | def test_sort(self, dtype): method test_split (line 10333) | def test_split(self, dtype): method test_hsplit (line 10350) | def test_hsplit(self, dtype): method test_vsplit (line 10383) | def test_vsplit(self, dtype): method test_sqrt (line 10400) | def test_sqrt(self, dtype): method test_square (line 10416) | def test_square(self, dtype): method test_squeeze (line 10433) | def test_squeeze(self, dtype): method test_stack (line 10452) | def test_stack(self, dtypes): method test_std (line 10470) | def test_std(self, dtype): method test_sum (line 10489) | def test_sum(self, dtype): method test_swapaxes (line 10507) | def test_swapaxes(self, dtype): method test_take (line 10524) | def test_take(self, dtype): method test_take_along_axis (line 10543) | def test_take_along_axis(self, dtype, indices_dtype): method test_tan (line 10566) | def test_tan(self, dtype): method test_tanh (line 10582) | def test_tanh(self, dtype): method test_tensordot (line 10600) | def test_tensordot(self, dtypes): method test_tile (line 10620) | def test_tile(self, dtype): method test_trace (line 10636) | def test_trace(self, dtype): method test_transpose (line 10654) | def test_transpose(self, dtype): method test_tri (line 10670) | def test_tri(self, dtype): method test_tril (line 10681) | def test_tril(self, dtype): method test_triu (line 10697) | def test_triu(self, dtype): method test_true_divide (line 10715) | def test_true_divide(self, dtypes): method test_trunc (line 10731) | def test_trunc(self, dtype): method test_trapezoid (line 10743) | def test_trapezoid(self, dtype): method test_vander (line 10759) | def test_vander(self, dtype): method test_var (line 10777) | def test_var(self, dtype): method test_vdot (line 10795) | def test_vdot(self, dtypes): method test_inner (line 10813) | def test_inner(self, dtypes): method test_vstack (line 10833) | def test_vstack(self, dtypes): method test_where (line 10853) | def test_where(self, dtypes): method test_where_python_types (line 10876) | def test_where_python_types(self, dtype): method test_zeros_like (line 10905) | def test_zeros_like(self, dtype): method test_angle (line 10921) | def test_angle(self, dtype): method test_view (line 10944) | def test_view(self, dtypes): class HistogramTest (line 10972) | class HistogramTest(testing.TestCase): method test_histogram_default_args (line 10973) | def test_histogram_default_args(self): method test_histogram_custom_bins (line 10987) | def test_histogram_custom_bins(self): method test_histogram_custom_range (line 11002) | def test_histogram_custom_range(self): method test_histogram_symbolic_input (line 11019) | def test_histogram_symbolic_input(self): method test_histogram_non_integer_bins_raises_error (line 11028) | def test_histogram_non_integer_bins_raises_error(self): method test_histogram_range_validation (line 11037) | def test_histogram_range_validation(self): method test_histogram_large_values (line 11052) | def test_histogram_large_values(self): method test_histogram_float_input (line 11063) | def test_histogram_float_input(self): method test_histogram_high_dimensional_input (line 11074) | def test_histogram_high_dimensional_input(self): method test_histogram_values_on_edges (line 11083) | def test_histogram_values_on_edges(self): method test_histogram_predict (line 11106) | def test_histogram_predict(self, jit_compile): class TileTest (line 11123) | class TileTest(testing.TestCase): method test_tile_shape_inference_in_layer (line 11124) | def test_tile_shape_inference_in_layer(self): FILE: keras/src/ops/operation.py class Operation (line 18) | class Operation(KerasSaveable): method __init__ (line 19) | def __init__(self, name=None): method __call__ (line 33) | def __call__(self, *args, **kwargs): method symbolic_call (line 79) | def symbolic_call(self, *args, **kwargs): method call (line 93) | def call(self, *args, **kwargs): method quantized_call (line 96) | def quantized_call(self, *args, **kwargs): method compute_output_spec (line 99) | def compute_output_spec(self, *args, **kwargs): method __new__ (line 114) | def __new__(cls, *args, **kwargs): method get_config (line 206) | def get_config(self): method from_config (line 283) | def from_config(cls, config): method __repr__ (line 324) | def __repr__(self): method input (line 328) | def input(self): method output (line 340) | def output(self): method _get_node_attribute_at_index (line 351) | def _get_node_attribute_at_index(self, node_index, attr, attr_name): method _obj_type (line 384) | def _obj_type(self): method _post_build (line 388) | def _post_build(self): method _setattr_hook (line 392) | def _setattr_hook(self, name, value): method _post_track_variable (line 396) | def _post_track_variable(self, variable): method _post_untrack_variable (line 400) | def _post_untrack_variable(self, variable): FILE: keras/src/ops/operation_test.py class OpWithMultipleInputs (line 11) | class OpWithMultipleInputs(operation.Operation): method call (line 12) | def call(self, x, y, z=None): method compute_output_spec (line 17) | def compute_output_spec(self, x, y, z=None): class OpWithMultipleOutputs (line 21) | class OpWithMultipleOutputs(operation.Operation): method call (line 22) | def call(self, x): method compute_output_spec (line 25) | def compute_output_spec(self, x): class OpWithCustomConstructor (line 32) | class OpWithCustomConstructor(operation.Operation): method __init__ (line 33) | def __init__(self, alpha, *, beta=1.0, name=None): method call (line 38) | def call(self, x): method compute_output_spec (line 41) | def compute_output_spec(self, x): class OpWithCustomConstructorNoName (line 45) | class OpWithCustomConstructorNoName(operation.Operation): method __init__ (line 46) | def __init__(self, alpha, beta=1.0): method call (line 51) | def call(self, x): method compute_output_spec (line 54) | def compute_output_spec(self, x): class OpWithKwargsInConstructor (line 58) | class OpWithKwargsInConstructor(operation.Operation): method __init__ (line 59) | def __init__(self, alpha, beta=1.0, **kwargs): method call (line 64) | def call(self, x): method compute_output_spec (line 67) | def compute_output_spec(self, x): class OpWithArgsInConstructor (line 71) | class OpWithArgsInConstructor(operation.Operation): method __init__ (line 72) | def __init__(self, alpha, *args, name=None): method call (line 76) | def call(self, x): method compute_output_spec (line 79) | def compute_output_spec(self, x): class OpWithCustomConstructorGetConfig (line 83) | class OpWithCustomConstructorGetConfig(operation.Operation): method __init__ (line 84) | def __init__(self, alpha, *, name=None): method call (line 88) | def call(self, x): method compute_output_spec (line 91) | def compute_output_spec(self, x): method get_config (line 94) | def get_config(self): class OpWithKwargsInConstructorGetConfig (line 98) | class OpWithKwargsInConstructorGetConfig(operation.Operation): method __init__ (line 99) | def __init__(self, alpha, **kwargs): method call (line 103) | def call(self, x): method compute_output_spec (line 106) | def compute_output_spec(self, x): method get_config (line 109) | def get_config(self): class OperationTest (line 113) | class OperationTest(testing.TestCase): method test_symbolic_call (line 114) | def test_symbolic_call(self): method test_eager_call (line 167) | def test_eager_call(self): method test_serialization_with_default_init_and_get_config (line 198) | def test_serialization_with_default_init_and_get_config(self): method test_serialization_custom_constructor_with_name_auto_config (line 215) | def test_serialization_custom_constructor_with_name_auto_config(self): method test_serialization_custom_constructor_with_no_name_auto_config (line 232) | def test_serialization_custom_constructor_with_no_name_auto_config(self): method test_serialization_custom_constructor_with_kwargs_auto_config (line 240) | def test_serialization_custom_constructor_with_kwargs_auto_config(self): method test_failing_serialization_non_serializable_auto_config (line 257) | def test_failing_serialization_non_serializable_auto_config( method test_failing_serialization_custom_constructor_with_args_auto_config (line 268) | def test_failing_serialization_custom_constructor_with_args_auto_config( method test_serialization_custom_constructor_custom_get_config (line 277) | def test_serialization_custom_constructor_custom_get_config(self): method test_serialization_custom_constructor_with_kwargs_custom_get_config (line 294) | def test_serialization_custom_constructor_with_kwargs_custom_get_config( method test_input_conversion (line 316) | def test_input_conversion(self): method test_valid_naming (line 327) | def test_valid_naming(self): FILE: keras/src/ops/operation_utils.py function broadcast_shapes (line 11) | def broadcast_shapes(shape1, shape2): function compute_expand_dims_output_shape (line 55) | def compute_expand_dims_output_shape(input_shape, axis): function compute_pooling_output_shape (line 78) | def compute_pooling_output_shape( function compute_conv_output_shape (line 167) | def compute_conv_output_shape( function compute_matmul_output_shape (line 250) | def compute_matmul_output_shape(shape1, shape2): function compute_reshape_output_shape (line 285) | def compute_reshape_output_shape(input_shape, newshape, newshape_arg_name): function compute_transpose_output_shape (line 333) | def compute_transpose_output_shape(input_shape, axes): function compute_take_along_axis_output_shape (line 355) | def compute_take_along_axis_output_shape(input_shape, indices_shape, axis): function reduce_shape (line 374) | def reduce_shape(shape, axis=None, keepdims=False): function get_source_inputs (line 397) | def get_source_inputs(tensor): FILE: keras/src/ops/operation_utils_test.py class OperationUtilsTest (line 8) | class OperationUtilsTest(testing.TestCase): method test_get_source_inputs (line 9) | def test_get_source_inputs(self): method test_get_source_inputs_return_input_tensor (line 17) | def test_get_source_inputs_return_input_tensor(self): method test_compute_expand_dims_output_shape (line 21) | def test_compute_expand_dims_output_shape(self): method test_compute_pooling_output_shape (line 38) | def test_compute_pooling_output_shape(self): method test_compute_pooling_output_shape_with_none (line 48) | def test_compute_pooling_output_shape_with_none(self): method test_compute_pooling_output_shape_valid_padding (line 58) | def test_compute_pooling_output_shape_valid_padding(self): method test_compute_pooling_output_shape_channels_last (line 67) | def test_compute_pooling_output_shape_channels_last(self): method test_compute_pooling_output_shape_same_padding_stride1 (line 80) | def test_compute_pooling_output_shape_same_padding_stride1(self): method test_compute_conv_output_shape (line 93) | def test_compute_conv_output_shape(self): method test_compute_conv_output_shape_with_none (line 104) | def test_compute_conv_output_shape_with_none(self): method test_compute_conv_output_shape_valid_padding (line 115) | def test_compute_conv_output_shape_valid_padding(self): method test_compute_conv_output_shape_channels_last (line 125) | def test_compute_conv_output_shape_channels_last(self): method test_compute_conv_output_shape_same_padding_stride1 (line 140) | def test_compute_conv_output_shape_same_padding_stride1(self): method test_compute_reshape_output_shape (line 155) | def test_compute_reshape_output_shape(self): method test_reduce_shape_no_axes_no_keepdims (line 163) | def test_reduce_shape_no_axes_no_keepdims(self): method test_reduce_shape_no_axes_with_keepdims (line 169) | def test_reduce_shape_no_axes_with_keepdims(self): method test_reduce_shape_single_axis_no_keepdims (line 175) | def test_reduce_shape_single_axis_no_keepdims(self): method test_reduce_shape_single_axis_with_keepdims (line 182) | def test_reduce_shape_single_axis_with_keepdims(self): method test_reduce_shape_multiple_axes_no_keepdims (line 191) | def test_reduce_shape_multiple_axes_no_keepdims(self): method test_reduce_shape_out_of_order_axes_no_keepdims (line 198) | def test_reduce_shape_out_of_order_axes_no_keepdims(self): method test_reduce_shape_negative_axes_no_keepdims (line 205) | def test_reduce_shape_negative_axes_no_keepdims(self): FILE: keras/src/ops/ops_test.py function op_functions_and_classes (line 32) | def op_functions_and_classes(ops_module): class OperationTest (line 64) | class OperationTest(testing.TestCase): method test_class_function_consistency (line 66) | def test_class_function_consistency(self, module_name): method test_backend_consistency (line 239) | def test_backend_consistency(self, module_name): FILE: keras/src/ops/symbolic_arguments.py class SymbolicArguments (line 5) | class SymbolicArguments: method __init__ (line 6) | def __init__(self, *args, **kwargs): method convert (line 26) | def convert(self, conversion_fn): method fill_in (line 31) | def fill_in(self, tensor_dict): FILE: keras/src/ops/symbolic_arguments_test.py class SymbolicArgumentsTest (line 7) | class SymbolicArgumentsTest(testing.TestCase): method test_args (line 9) | def test_args(self): method test_args_single_arg (line 26) | def test_args_single_arg(self): method test_kwargs (line 38) | def test_kwargs(self): method test_conversion_fn (line 56) | def test_conversion_fn(self): method test_fill_in_single_arg (line 79) | def test_fill_in_single_arg(self): method test_fill_in_multiple_arg (line 92) | def test_fill_in_multiple_arg(self): method test_fill_in (line 105) | def test_fill_in(self): FILE: keras/src/optimizers/__init__.py function serialize (line 40) | def serialize(optimizer): function deserialize (line 53) | def deserialize(config, custom_objects=None): function get (line 77) | def get(identifier): class LegacyOptimizerWarning (line 117) | class LegacyOptimizerWarning: method __init__ (line 118) | def __init__(self, *args, **kwargs): FILE: keras/src/optimizers/adadelta.py class Adadelta (line 7) | class Adadelta(optimizer.Optimizer): method __init__ (line 40) | def __init__( method build (line 74) | def build(self, var_list): method update_step (line 84) | def update_step(self, grad, variable, learning_rate): method get_config (line 121) | def get_config(self): FILE: keras/src/optimizers/adadelta_test.py class AdadeltaTest (line 9) | class AdadeltaTest(testing.TestCase): method test_config (line 10) | def test_config(self): method test_single_step (line 18) | def test_single_step(self): method test_weight_decay (line 27) | def test_weight_decay(self): method test_correctness_with_golden (line 49) | def test_correctness_with_golden(self): method test_clip_norm (line 65) | def test_clip_norm(self): method test_clip_value (line 71) | def test_clip_value(self): FILE: keras/src/optimizers/adafactor.py class Adafactor (line 8) | class Adafactor(optimizer.Optimizer): method __init__ (line 44) | def __init__( method build (line 84) | def build(self, var_list): method _rms (line 140) | def _rms(self, x): method update_step (line 143) | def update_step(self, gradient, variable, learning_rate): method get_config (line 216) | def get_config(self): FILE: keras/src/optimizers/adafactor_test.py class AdafactorTest (line 11) | class AdafactorTest(testing.TestCase): method test_config (line 12) | def test_config(self): method test_single_step_1d (line 23) | def test_single_step_1d(self): method test_single_step_2d (line 32) | def test_single_step_2d(self): method test_weight_decay (line 41) | def test_weight_decay(self): method test_correctness_with_golden (line 63) | def test_correctness_with_golden(self): method test_clip_norm (line 92) | def test_clip_norm(self): method test_clip_value (line 98) | def test_clip_value(self): FILE: keras/src/optimizers/adagrad.py class Adagrad (line 8) | class Adagrad(optimizer.Optimizer): method __init__ (line 35) | def __init__( method build (line 69) | def build(self, var_list): method update_step (line 78) | def update_step(self, gradient, variable, learning_rate): method get_config (line 94) | def get_config(self): FILE: keras/src/optimizers/adagrad_test.py class AdagradTest (line 12) | class AdagradTest(testing.TestCase): method test_config (line 13) | def test_config(self): method test_single_step (line 21) | def test_single_step(self): method test_weight_decay (line 30) | def test_weight_decay(self): method test_correctness_with_golden (line 52) | def test_correctness_with_golden(self): method test_clip_norm (line 76) | def test_clip_norm(self): method test_clip_value (line 82) | def test_clip_value(self): FILE: keras/src/optimizers/adam.py class Adam (line 7) | class Adam(optimizer.Optimizer): method __init__ (line 43) | def __init__( method build (line 81) | def build(self, var_list): method update_step (line 102) | def update_step(self, gradient, variable, learning_rate): method get_config (line 139) | def get_config(self): FILE: keras/src/optimizers/adam_test.py class AdamTest (line 11) | class AdamTest(testing.TestCase): method test_config (line 12) | def test_config(self): method test_single_step (line 22) | def test_single_step(self): method test_weight_decay (line 29) | def test_weight_decay(self): method test_correctness_with_golden (line 51) | def test_correctness_with_golden(self): method test_clip_norm (line 67) | def test_clip_norm(self): method test_clip_value (line 73) | def test_clip_value(self): method test_ema (line 80) | def test_ema(self): method test_clipnorm_indexed_slices (line 92) | def test_clipnorm_indexed_slices(self): FILE: keras/src/optimizers/adamax.py class Adamax (line 7) | class Adamax(optimizer.Optimizer): method __init__ (line 53) | def __init__( method build (line 89) | def build(self, var_list): method update_step (line 105) | def update_step(self, gradient, variable, learning_rate): method get_config (line 131) | def get_config(self): FILE: keras/src/optimizers/adamax_test.py class AdamaxTest (line 12) | class AdamaxTest(testing.TestCase): method test_config (line 13) | def test_config(self): method test_single_step (line 22) | def test_single_step(self): method test_weight_decay (line 29) | def test_weight_decay(self): method test_correctness_with_golden (line 51) | def test_correctness_with_golden(self): method test_clip_norm (line 75) | def test_clip_norm(self): method test_clip_value (line 81) | def test_clip_value(self): FILE: keras/src/optimizers/adamw.py class AdamW (line 7) | class AdamW(adam.Adam): method __init__ (line 53) | def __init__( FILE: keras/src/optimizers/adamw_test.py class AdamWTest (line 12) | class AdamWTest(testing.TestCase): method test_config (line 13) | def test_config(self): method test_single_step (line 24) | def test_single_step(self): method test_weight_decay (line 33) | def test_weight_decay(self): method test_weight_decay_is_none (line 55) | def test_weight_decay_is_none(self): method test_correctness_with_golden (line 63) | def test_correctness_with_golden(self): method test_clip_norm (line 85) | def test_clip_norm(self): method test_clip_value (line 91) | def test_clip_value(self): FILE: keras/src/optimizers/base_optimizer.py class BaseOptimizer (line 14) | class BaseOptimizer(KerasSaveable): method __init__ (line 68) | def __init__( method iterations (line 196) | def iterations(self): method _track_variable (line 204) | def _track_variable(self, variable): method _overwrite_variable_with_gradient (line 207) | def _overwrite_variable_with_gradient(self, variable): method build (line 211) | def build(self, variables): method _var_key (line 230) | def _var_key(self, variable): method variables (line 235) | def variables(self): method _get_variable_index (line 238) | def _get_variable_index(self, variable): method add_variable (line 241) | def add_variable( method add_variable_from_reference (line 286) | def add_variable_from_reference( method add_optimizer_variables (line 327) | def add_optimizer_variables( method _check_variables_are_known (line 405) | def _check_variables_are_known(self, variables): method assign (line 415) | def assign(self, variable, value): method assign_add (line 429) | def assign_add(self, variable, value): method assign_sub (line 443) | def assign_sub(self, variable, value): method update_step (line 457) | def update_step(self, gradient, variable, learning_rate): method apply_gradients (line 460) | def apply_gradients(self, grads_and_vars): method apply (line 466) | def apply(self, grads, trainable_variables=None): method _backend_apply_gradients (line 535) | def _backend_apply_gradients(self, grads, trainable_variables): method _backend_update_step (line 614) | def _backend_update_step(self, grads, trainable_variables, learning_ra... method _backend_reset_gradient_accumulators (line 623) | def _backend_reset_gradient_accumulators(self): method _backend_increment_gradient_accumulators (line 628) | def _backend_increment_gradient_accumulators(self, grads, acc_grads): method stateless_apply (line 633) | def stateless_apply(self, optimizer_variables, grads, trainable_variab... method scale_loss (line 691) | def scale_loss(self, loss): method learning_rate (line 703) | def learning_rate(self): method learning_rate (line 707) | def learning_rate(self, learning_rate): method set_weights (line 736) | def set_weights(self, weights): method save_own_variables (line 754) | def save_own_variables(self, store): method load_own_variables (line 759) | def load_own_variables(self, store): method _get_current_learning_rate (line 777) | def _get_current_learning_rate(self): method _overwrite_variables_directly_with_gradients (line 788) | def _overwrite_variables_directly_with_gradients(self, grads, vars): method _filter_empty_gradients (line 843) | def _filter_empty_gradients(self, grads, vars): method _clip_gradients (line 870) | def _clip_gradients(self, grads): method exclude_from_weight_decay (line 883) | def exclude_from_weight_decay(self, var_list=None, var_names=None): method _use_weight_decay (line 923) | def _use_weight_decay(self, variable): method _apply_weight_decay (line 952) | def _apply_weight_decay(self, variables): method _check_super_called (line 961) | def _check_super_called(self): method _update_model_variables_moving_average (line 970) | def _update_model_variables_moving_average(self, trainable_variables): method _overwrite_model_variables_with_average_value (line 988) | def _overwrite_model_variables_with_average_value( method finalize_variable_values (line 1008) | def finalize_variable_values(self, var_list): method _obj_type (line 1023) | def _obj_type(self): method get_config (line 1026) | def get_config(self): method from_config (line 1074) | def from_config(cls, config, custom_objects=None): method __setattr__ (line 1097) | def __setattr__(self, name, value): method _clip_by_norm (line 1108) | def _clip_by_norm(self, values, axes=None): method _untrack_variable (line 1121) | def _untrack_variable(self, variable): function global_norm (line 1181) | def global_norm(value_list): function clip_by_global_norm (line 1190) | def clip_by_global_norm(value_list, clip_norm): FILE: keras/src/optimizers/ftrl.py class Ftrl (line 8) | class Ftrl(optimizer.Optimizer): method __init__ (line 78) | def __init__( method build (line 153) | def build(self, var_list): method update_step (line 171) | def update_step(self, gradient, variable, learning_rate): method get_config (line 221) | def get_config(self): FILE: keras/src/optimizers/ftrl_test.py class FtrlTest (line 12) | class FtrlTest(testing.TestCase): method test_config (line 13) | def test_config(self): method test_single_step (line 25) | def test_single_step(self): method test_correctness_with_golden (line 34) | def test_correctness_with_golden(self): method test_clip_norm (line 64) | def test_clip_norm(self): method test_clip_value (line 70) | def test_clip_value(self): method test_invalid_initial_accumulator_value (line 76) | def test_invalid_initial_accumulator_value(self): method test_invalid_learning_rate_power (line 84) | def test_invalid_learning_rate_power(self): method test_invalid_l1_regularization_strength (line 92) | def test_invalid_l1_regularization_strength(self): method test_invalid_l2_regularization_strength (line 100) | def test_invalid_l2_regularization_strength(self): method test_invalid_l2_shrinkage_regularization_strength (line 108) | def test_invalid_l2_shrinkage_regularization_strength(self): FILE: keras/src/optimizers/lamb.py class Lamb (line 7) | class Lamb(optimizer.Optimizer): method __init__ (line 38) | def __init__( method build (line 74) | def build(self, var_list): method update_step (line 89) | def update_step(self, gradient, variable, learning_rate): method get_config (line 134) | def get_config(self): FILE: keras/src/optimizers/lamb_test.py class LambTest (line 9) | class LambTest(testing.TestCase): method test_config (line 10) | def test_config(self): method test_single_step (line 19) | def test_single_step(self): method test_weight_decay (line 28) | def test_weight_decay(self): method test_correctness_with_golden (line 50) | def test_correctness_with_golden(self): method test_clip_norm (line 66) | def test_clip_norm(self): method test_clip_value (line 72) | def test_clip_value(self): FILE: keras/src/optimizers/lion.py class Lion (line 7) | class Lion(optimizer.Optimizer): method __init__ (line 44) | def __init__( method build (line 83) | def build(self, var_list): method update_step (line 96) | def update_step(self, gradient, variable, learning_rate): method get_config (line 123) | def get_config(self): FILE: keras/src/optimizers/lion_test.py class LionTest (line 11) | class LionTest(testing.TestCase): method test_invalid_beta_1 (line 12) | def test_invalid_beta_1(self): method test_config (line 32) | def test_config(self): method test_single_step (line 40) | def test_single_step(self): method test_weight_decay (line 47) | def test_weight_decay(self): method test_correctness_with_golden (line 69) | def test_correctness_with_golden(self): method test_clip_norm (line 86) | def test_clip_norm(self): method test_clip_value (line 92) | def test_clip_value(self): method test_ema (line 99) | def test_ema(self): FILE: keras/src/optimizers/loss_scale_optimizer.py class LossScaleOptimizer (line 16) | class LossScaleOptimizer(optimizer.Optimizer): method __init__ (line 46) | def __init__( method build (line 104) | def build(self, var_list): method variables (line 123) | def variables(self): method stateless_apply (line 126) | def stateless_apply(self, optimizer_variables, grads, trainable_variab... method _stateless_handle_finite_grads (line 144) | def _stateless_handle_finite_grads( method _stateless_handle_non_finite_grads (line 189) | def _stateless_handle_non_finite_grads( method apply (line 201) | def apply(self, grads, trainable_variables=None): method _stateful_handle_finite_grads (line 213) | def _stateful_handle_finite_grads(self, grads, trainable_variables): method _stateful_handle_non_finite_grads (line 241) | def _stateful_handle_non_finite_grads(self): method _common_apply (line 246) | def _common_apply(self, grads, trainable_variables=None): method _tf_apply (line 256) | def _tf_apply(self, grads, trainable_variables=None): method check_finite (line 298) | def check_finite(self, grads): method learning_rate (line 304) | def learning_rate(self): method learning_rate (line 308) | def learning_rate(self, learning_rate): method iterations (line 312) | def iterations(self): method scale_loss (line 315) | def scale_loss(self, loss): method finalize_variable_values (line 319) | def finalize_variable_values(self, var_list): method get_config (line 322) | def get_config(self): method from_config (line 335) | def from_config(cls, config, custom_objects=None): FILE: keras/src/optimizers/loss_scale_optimizer_test.py class LossScaleOptimizerTest (line 11) | class LossScaleOptimizerTest(testing.TestCase): method _skip_test_for_stateless (line 12) | def _skip_test_for_stateless(self, stateless): method test_config (line 22) | def test_config(self): method test_apply_with_no_vars (line 32) | def test_apply_with_no_vars(self): method test_finite_step (line 46) | def test_finite_step(self, stateless): method test_finite_step_with_inner_loss_scale (line 67) | def test_finite_step_with_inner_loss_scale(self, stateless): method test_infinite_step (line 89) | def test_infinite_step(self, stateless): method test_finite_step_with_overwrite (line 108) | def test_finite_step_with_overwrite(self, stateless): method test_downscaling (line 129) | def test_downscaling(self, stateless): method test_upscaling (line 150) | def test_upscaling(self, stateless): method test_iterations_update (line 175) | def test_iterations_update(self, stateless): method test_serialization (line 198) | def test_serialization(self): method test_init_dynamic_arg (line 214) | def test_init_dynamic_arg(self): method test_init_unsupported_arg (line 224) | def test_init_unsupported_arg(self): method test_init_base_optimizer_unsupported_args (line 240) | def test_init_base_optimizer_unsupported_args(self, arg_name, arg_value): method test_deserialization_backwards_compatibility (line 245) | def test_deserialization_backwards_compatibility(self): FILE: keras/src/optimizers/muon.py class Muon (line 9) | class Muon(optimizer.Optimizer): method __init__ (line 83) | def __init__( method _should_use_adamw (line 141) | def _should_use_adamw(self, variable): method build (line 153) | def build(self, var_list): method update_step (line 184) | def update_step(self, gradient, variable, learning_rate): method _muon_update_step (line 198) | def _muon_update_step(self, gradient, variable, lr, m): method _adamw_update_step (line 208) | def _adamw_update_step(self, gradient, variable, learning_rate, m, v): method transpose_last_axis (line 238) | def transpose_last_axis(self, X): method lr_adjust (line 246) | def lr_adjust(self, x): method zeropower_via_newtonschulz5 (line 260) | def zeropower_via_newtonschulz5(self, x, steps: int): method _apply_weight_decay (line 293) | def _apply_weight_decay(self, variables): method get_config (line 307) | def get_config(self): FILE: keras/src/optimizers/muon_test.py class MuonTest (line 14) | class MuonTest(testing.TestCase): method test_config (line 15) | def test_config(self): method test_Newton_Schulz (line 22) | def test_Newton_Schulz(self): method test_adamw_single_step (line 36) | def test_adamw_single_step(self): method test_should_use_adamw (line 44) | def test_should_use_adamw(self): method test_muon_single_step (line 58) | def test_muon_single_step(self): method test_clip_norm (line 74) | def test_clip_norm(self): method test_clip_value (line 80) | def test_clip_value(self): method test_muon_weight_decay (line 86) | def test_muon_weight_decay(self): method test_adamw_weight_decay (line 94) | def test_adamw_weight_decay(self): method test_lr_adjust_none (line 103) | def test_lr_adjust_none(self): method test_lr_adjust_2d (line 109) | def test_lr_adjust_2d(self): method test_model_fit (line 116) | def test_model_fit(self): FILE: keras/src/optimizers/nadam.py class Nadam (line 8) | class Nadam(optimizer.Optimizer): method __init__ (line 39) | def __init__( method build (line 75) | def build(self, var_list): method _backend_update_step (line 95) | def _backend_update_step(self, grads, trainable_variables, learning_ra... method update_step (line 108) | def update_step(self, gradient, variable, learning_rate): method get_config (line 148) | def get_config(self): FILE: keras/src/optimizers/nadam_test.py class NadamTest (line 12) | class NadamTest(testing.TestCase): method test_config (line 13) | def test_config(self): method test_build_with_empty_var_list (line 22) | def test_build_with_empty_var_list(self): method test_single_step (line 27) | def test_single_step(self): method test_weight_decay (line 36) | def test_weight_decay(self): method test_correctness_with_golden (line 58) | def test_correctness_with_golden(self): method test_clip_norm (line 85) | def test_clip_norm(self): method test_clip_value (line 91) | def test_clip_value(self): FILE: keras/src/optimizers/optimizer.py class BackendOptimizer (line 17) | class BackendOptimizer(base_optimizer.BaseOptimizer): class Optimizer (line 22) | class Optimizer(BackendOptimizer, base_optimizer.BaseOptimizer): FILE: keras/src/optimizers/optimizer_sparse_test.py class ScatterUpdateOptimizer (line 12) | class ScatterUpdateOptimizer(optimizers.Optimizer): method __init__ (line 13) | def __init__(self): method build (line 16) | def build(self, variables): method update_step (line 25) | def update_step(self, grad, variable, learning_rate): class OptimizerSparseTest (line 133) | class OptimizerSparseTest(testing.TestCase): method test_sparse_gradients (line 135) | def test_sparse_gradients( method test_sparse_correctness (line 250) | def test_sparse_correctness( FILE: keras/src/optimizers/optimizer_test.py class OptimizerTest (line 16) | class OptimizerTest(testing.TestCase): method test_iterations_counter (line 17) | def test_iterations_counter(self): method test_empty_gradients (line 27) | def test_empty_gradients(self): method test_clip_args (line 46) | def test_clip_args(self): method test_clip_norm (line 74) | def test_clip_norm(self): method test_clip_value (line 80) | def test_clip_value(self): method test_global_clip_norm (line 86) | def test_global_clip_norm(self): method test_ema (line 95) | def test_ema(self): method test_ema_with_model_fit (line 125) | def test_ema_with_model_fit(self): method test_constraints_are_applied (line 147) | def test_constraints_are_applied(self): method test_get_method (line 155) | def test_get_method(self): method test_static_loss_scaling (line 167) | def test_static_loss_scaling(self): method test_set_weights (line 175) | def test_set_weights(self): method test_gradient_accumulation (line 191) | def test_gradient_accumulation(self): method test_tf_checkpointing (line 236) | def test_tf_checkpointing(self): method test_callable_learning_rate (line 261) | def test_callable_learning_rate(self): method test_overwrite_with_gradient (line 270) | def test_overwrite_with_gradient(self): method test_overwrite_with_gradient_with_gradient_accumulation (line 284) | def test_overwrite_with_gradient_with_gradient_accumulation(self): method test_gradient_accumulation_with_weigth_decay (line 348) | def test_gradient_accumulation_with_weigth_decay(self, optimizer): method test_setting_lr_to_callable_untracks_lr_var (line 376) | def test_setting_lr_to_callable_untracks_lr_var(self): method test_pickleable_optimizers (line 399) | def test_pickleable_optimizers(self, optimizer): method test_mixed_with_tf_variables (line 409) | def test_mixed_with_tf_variables(self): FILE: keras/src/optimizers/rmsprop.py class RMSprop (line 7) | class RMSprop(optimizer.Optimizer): method __init__ (line 53) | def __init__( method build (line 91) | def build(self, var_list): method update_step (line 109) | def update_step(self, gradient, variable, learning_rate): method get_config (line 156) | def get_config(self): FILE: keras/src/optimizers/rmsprop_test.py class RMSpropTest (line 9) | class RMSpropTest(testing.TestCase): method test_config (line 10) | def test_config(self): method test_single_step (line 20) | def test_single_step(self): method test_weight_decay (line 29) | def test_weight_decay(self): method test_correctness_with_golden (line 51) | def test_correctness_with_golden(self): method test_clip_norm (line 67) | def test_clip_norm(self): method test_clip_value (line 73) | def test_clip_value(self): FILE: keras/src/optimizers/schedule_free_adamw.py class ScheduleFreeAdamW (line 7) | class ScheduleFreeAdamW(optimizer.Optimizer): method __init__ (line 56) | def __init__( method build (line 94) | def build(self, var_list): method update_step (line 116) | def update_step(self, gradient, variable, learning_rate): method get_config (line 183) | def get_config(self): FILE: keras/src/optimizers/schedule_free_adamw_test.py class ScheduleFreeAdamWTest (line 11) | class ScheduleFreeAdamWTest(testing.TestCase): method test_config (line 12) | def test_config(self): method test_single_step (line 22) | def test_single_step(self): method test_weight_decay (line 30) | def test_weight_decay(self): method test_warmup (line 46) | def test_warmup(self): method test_multiple_steps (line 71) | def test_multiple_steps(self): method test_with_model (line 85) | def test_with_model(self): method test_clip_norm (line 101) | def test_clip_norm(self): method test_clip_value (line 107) | def test_clip_value(self): FILE: keras/src/optimizers/schedules/learning_rate_schedule.py class LearningRateSchedule (line 11) | class LearningRateSchedule: method __call__ (line 54) | def __call__(self, step): method get_config (line 60) | def get_config(self): method from_config (line 67) | def from_config(cls, config): class ExponentialDecay (line 80) | class ExponentialDecay(LearningRateSchedule): method __init__ (line 141) | def __init__( method __call__ (line 162) | def __call__(self, step): method get_config (line 177) | def get_config(self): class PiecewiseConstantDecay (line 188) | class PiecewiseConstantDecay(LearningRateSchedule): method __init__ (line 241) | def __init__(self, boundaries, values, name="PiecewiseConstant"): method __call__ (line 256) | def __call__(self, step): method get_config (line 296) | def get_config(self): class PolynomialDecay (line 305) | class PolynomialDecay(LearningRateSchedule): method __init__ (line 387) | def __init__( method __call__ (line 411) | def __call__(self, step): method get_config (line 449) | def get_config(self): class InverseTimeDecay (line 461) | class InverseTimeDecay(LearningRateSchedule): method __init__ (line 523) | def __init__( method __call__ (line 545) | def __call__(self, step): method get_config (line 562) | def get_config(self): class CosineDecay (line 573) | class CosineDecay(LearningRateSchedule): method __init__ (line 671) | def __init__( method _decay_function (line 695) | def _decay_function(self, step, decay_steps, decay_from_lr, dtype): method _warmup_function (line 705) | def _warmup_function( method __call__ (line 713) | def __call__(self, step): method get_config (line 756) | def get_config(self): class CosineDecayRestarts (line 768) | class CosineDecayRestarts(LearningRateSchedule): method __init__ (line 821) | def __init__( method __call__ (line 845) | def __call__(self, step): method get_config (line 910) | def get_config(self): function serialize (line 922) | def serialize(learning_rate_schedule): function deserialize (line 944) | def deserialize(config, custom_objects=None): FILE: keras/src/optimizers/schedules/learning_rate_schedule_test.py class TestFitLRSchedulesFlow (line 16) | class TestFitLRSchedulesFlow(testing.TestCase): method test_fit_lr_correctness (line 18) | def test_fit_lr_correctness(self): class ExponentialDecayTest (line 48) | class ExponentialDecayTest(testing.TestCase): method test_config (line 49) | def test_config(self): method test_continuous (line 60) | def test_continuous(self): method test_staircase (line 66) | def test_staircase(self): method test_variables (line 83) | def test_variables(self): class PiecewiseConstantDecayTest (line 98) | class PiecewiseConstantDecayTest(testing.TestCase): method test_config (line 99) | def test_config(self): method test_piecewise_values (line 106) | def test_piecewise_values(self): method test_boundary_values (line 124) | def test_boundary_values(self): class LinearDecayTest (line 141) | class LinearDecayTest(testing.TestCase): method test_config (line 142) | def test_config(self): method test_halfway (line 154) | def test_halfway(self): method test_end (line 162) | def test_end(self): method test_halfway_with_end (line 170) | def test_halfway_with_end(self): method test_beyond_end (line 178) | def test_beyond_end(self): method test_beyond_end_with_cycle (line 186) | def test_beyond_end_with_cycle(self): class SqrtDecayTest (line 195) | class SqrtDecayTest(testing.TestCase): method test_halfway (line 196) | def test_halfway(self): method test_end (line 205) | def test_end(self): method test_halfway_with_end (line 214) | def test_halfway_with_end(self): method test_beyond_end (line 223) | def test_beyond_end(self): method test_beyond_end_with_cycle (line 232) | def test_beyond_end_with_cycle(self): method test_begin_with_cycle (line 243) | def test_begin_with_cycle(self): class InverseTimeDecayTest (line 252) | class InverseTimeDecayTest(testing.TestCase): method test_config (line 253) | def test_config(self): method test_decay (line 264) | def test_decay(self): method test_staircase (line 276) | def test_staircase(self): class CosineDecayTest (line 291) | class CosineDecayTest(testing.TestCase): method test_config (line 292) | def test_config(self): method np_cosine_decay (line 304) | def np_cosine_decay(self, step, decay_steps, alpha=0.0): method test_decay (line 310) | def test_decay(self): method linear_warmup (line 318) | def linear_warmup(self, step, warmup_steps, initial_lr, target_lr): method test_warmup (line 323) | def test_warmup(self): method test_alpha (line 339) | def test_alpha(self): method test_float64 (line 350) | def test_float64(self): method test_warmup_decay (line 358) | def test_warmup_decay(self): class CosineDecayRestartsTest (line 381) | class CosineDecayRestartsTest(testing.TestCase): method test_config (line 382) | def test_config(self): method np_cosine_decay_restarts (line 394) | def np_cosine_decay_restarts( method test_decay (line 407) | def test_decay(self): method test_float64 (line 417) | def test_float64(self): method test_alpha (line 427) | def test_alpha(self): method test_mmul (line 440) | def test_mmul(self): method test_tmul (line 453) | def test_tmul(self): FILE: keras/src/optimizers/sgd.py class SGD (line 7) | class SGD(optimizer.Optimizer): method __init__ (line 43) | def __init__( method build (line 79) | def build(self, variables): method update_step (line 95) | def update_step(self, gradient, variable, learning_rate): method get_config (line 125) | def get_config(self): FILE: keras/src/optimizers/sgd_test.py class SGDTest (line 11) | class SGDTest(testing.TestCase): method test_config (line 12) | def test_config(self): method test_single_step (line 21) | def test_single_step(self): method test_invalid_momentum (line 33) | def test_invalid_momentum(self): method test_weight_decay (line 44) | def test_weight_decay(self): method test_correctness_with_golden (line 66) | def test_correctness_with_golden(self): method test_clip_norm (line 90) | def test_clip_norm(self): method test_clip_value (line 96) | def test_clip_value(self): FILE: keras/src/quantizers/__init__.py function serialize (line 43) | def serialize(initializer): function deserialize (line 48) | def deserialize(config, custom_objects=None): function get (line 58) | def get(identifier, **kwargs): FILE: keras/src/quantizers/awq.py function awq_search_optimal_scales (line 21) | def awq_search_optimal_scales( function awq_quantize_matrix (line 144) | def awq_quantize_matrix( class AWQ (line 229) | class AWQ: method __init__ (line 246) | def __init__(self, layer, config=None): method update_activation_magnitudes (line 291) | def update_activation_magnitudes(self, input_batch): method quantize_layer (line 320) | def quantize_layer(self): method free (line 358) | def free(self): FILE: keras/src/quantizers/awq_config.py class AWQConfig (line 6) | class AWQConfig(QuantizationConfig): method __init__ (line 72) | def __init__( method mode (line 113) | def mode(self): method dtype_policy_string (line 116) | def dtype_policy_string(self): method get_config (line 124) | def get_config(self): method from_config (line 139) | def from_config(cls, config): FILE: keras/src/quantizers/awq_config_test.py class AWQConfigTest (line 8) | class AWQConfigTest(testing.TestCase): class MockTokenizer (line 11) | class MockTokenizer: method __init__ (line 14) | def __init__(self): method test_config_defaults (line 17) | def test_config_defaults(self): method test_config_custom_values (line 27) | def test_config_custom_values(self): method test_config_only_4bit (line 42) | def test_config_only_4bit(self): method test_config_invalid_num_samples (line 49) | def test_config_invalid_num_samples(self): method test_config_invalid_sequence_length (line 56) | def test_config_invalid_sequence_length(self): method test_config_invalid_group_size (line 65) | def test_config_invalid_group_size(self): method test_config_invalid_num_grid_points (line 72) | def test_config_invalid_num_grid_points(self): method test_config_per_channel_group_size (line 81) | def test_config_per_channel_group_size(self): method test_config_serialization (line 88) | def test_config_serialization(self): method test_dtype_policy_string (line 104) | def test_dtype_policy_string(self): method test_awq_config_serialization (line 116) | def test_awq_config_serialization(self): FILE: keras/src/quantizers/awq_core.py function stream_activations (line 23) | def stream_activations(layers_map, awq_objects): function apply_awq_layerwise (line 58) | def apply_awq_layerwise(dataloader, config, structure, filters=None): function awq_quantize (line 154) | def awq_quantize(config, quantization_layer_structure, filters=None): function get_group_size_for_layer (line 193) | def get_group_size_for_layer(layer, config): FILE: keras/src/quantizers/awq_test.py class MockTokenizer (line 21) | class MockTokenizer: method __init__ (line 24) | def __init__(self, vocab_size=100, seq_len=64): method tokenize (line 28) | def tokenize(self, text): method __call__ (line 38) | def __call__(self, text): class AWQAlgorithmTest (line 43) | class AWQAlgorithmTest(testing.TestCase): method test_scale_search_returns_valid_scales (line 46) | def test_scale_search_returns_valid_scales(self): method test_scale_search_with_zero_activations (line 61) | def test_scale_search_with_zero_activations(self): method test_quantize_matrix_shapes (line 77) | def test_quantize_matrix_shapes(self): method test_quantize_matrix_with_grouping (line 100) | def test_quantize_matrix_with_grouping(self): method test_quantize_matrix_grouped_shapes (line 128) | def test_quantize_matrix_grouped_shapes(self): method test_quantize_matrix_grouped_no_nan_inf (line 165) | def test_quantize_matrix_grouped_no_nan_inf(self): method test_scale_search_grouped_quantization (line 190) | def test_scale_search_grouped_quantization(self): method test_quantize_matrix_various_group_sizes (line 222) | def test_quantize_matrix_various_group_sizes(self, group_size): class AWQLayerTest (line 252) | class AWQLayerTest(testing.TestCase): method test_awq_on_dense_layer (line 255) | def test_awq_on_dense_layer(self): method test_awq_activation_accumulation (line 280) | def test_awq_activation_accumulation(self): method test_awq_layer_variables_created (line 309) | def test_awq_layer_variables_created(self): class AWQIntegrationTest (line 329) | class AWQIntegrationTest(testing.TestCase): method test_dense_layer_quantize_awq (line 332) | def test_dense_layer_quantize_awq(self): method test_einsum_dense_layer_quantize_awq (line 346) | def test_einsum_dense_layer_quantize_awq(self): method test_model_quantize_requires_structure (line 360) | def test_model_quantize_requires_structure(self): function _mean_kl (line 396) | def _mean_kl(p, q): function _top1_match_rate (line 406) | def _top1_match_rate(a_logits, b_logits): function _get_sequence_classifier (line 413) | def _get_sequence_classifier(): function _char_tokenizer (line 448) | def _char_tokenizer(vocab_size=VOCAB_SIZE, seq_len=SEQ_LEN): function _string_dataset (line 475) | def _string_dataset( class AWQAccuracyTest (line 486) | class AWQAccuracyTest(testing.TestCase): method test_awq_transformer_accuracy (line 493) | def test_awq_transformer_accuracy( method test_awq_accuracy_various_group_sizes (line 580) | def test_awq_accuracy_various_group_sizes( FILE: keras/src/quantizers/gptq.py function _stable_permutation (line 15) | def _stable_permutation(metric): function gptq_quantize_matrix (line 27) | def gptq_quantize_matrix( class GPTQ (line 272) | class GPTQ: method __init__ (line 273) | def __init__(self, layer, config=GPTQConfig(tokenizer=None, dataset=No... method update_hessian_with_batch (line 323) | def update_hessian_with_batch(self, input_batch): method quantize_and_correct_layer (line 392) | def quantize_and_correct_layer( method free (line 487) | def free(self): FILE: keras/src/quantizers/gptq_config.py class GPTQConfig (line 6) | class GPTQConfig(QuantizationConfig): method __init__ (line 143) | def __init__( method get_config (line 188) | def get_config(self): method from_config (line 206) | def from_config(cls, config): method mode (line 210) | def mode(self): method dtype_policy_string (line 213) | def dtype_policy_string(self): FILE: keras/src/quantizers/gptq_config_test.py class TestGPTQConfig (line 5) | class TestGPTQConfig(testing.TestCase): method test_invalid_weight_bits (line 6) | def test_invalid_weight_bits(self): method test_invalid_num_samples (line 12) | def test_invalid_num_samples(self): method test_invalid_sequence_length (line 22) | def test_invalid_sequence_length(self): method test_invalid_hessian_damping (line 32) | def test_invalid_hessian_damping(self): method test_invalid_group_size (line 42) | def test_invalid_group_size(self): method test_dtype_policy_string (line 48) | def test_dtype_policy_string(self): method test_gptq_config_serialization (line 54) | def test_gptq_config_serialization(self): FILE: keras/src/quantizers/gptq_core.py function stream_hessians (line 19) | def stream_hessians(layers_map, gptq_objects): function get_dataloader (line 87) | def get_dataloader( function find_layers_in_block (line 196) | def find_layers_in_block(block): function apply_gptq_layerwise (line 213) | def apply_gptq_layerwise(dataloader, config, structure, filters=None): function gptq_quantize (line 322) | def gptq_quantize(config, quantization_layer_structure, filters=None): function get_group_size_for_layer (line 368) | def get_group_size_for_layer(layer, config): function get_weight_bits_for_layer (line 409) | def get_weight_bits_for_layer(layer, config): FILE: keras/src/quantizers/gptq_core_test.py class MockTokenizer (line 16) | class MockTokenizer: method tokenize (line 19) | def tokenize(self, text): method __call__ (line 22) | def __call__(self, text): class EmptyBlock (line 26) | class EmptyBlock(layers.Layer): method __init__ (line 29) | def __init__(self, **kwargs): method call (line 33) | def call(self, inputs): class TransformerBlock (line 37) | class TransformerBlock(layers.Layer): method __init__ (line 40) | def __init__(self, **kwargs): method call (line 44) | def call(self, inputs): function _get_model_with_backbone (line 48) | def _get_model_with_backbone( function build_all_tokens_strings (line 94) | def build_all_tokens_strings(dataset, tokenizer, eos_id=None): function sliding_windows (line 104) | def sliding_windows(x, L): class TestGPTQCore (line 109) | class TestGPTQCore(testing.TestCase): method test_shape_and_dtype_strings (line 113) | def test_shape_and_dtype_strings(self, strategy): method test_shape_and_dtype_pretokenized (line 128) | def test_shape_and_dtype_pretokenized(self, strategy): method test_strided_is_deterministic_for_same_args (line 145) | def test_strided_is_deterministic_for_same_args(self): method test_random_reproducibility_by_seed (line 156) | def test_random_reproducibility_by_seed(self): method test_linspace_windows_match_expected (line 171) | def test_linspace_windows_match_expected(self): method test_strided_override_respected (line 189) | def test_strided_override_respected(self): method test_eos_insertion_is_present_in_some_window_with_linspace (line 217) | def test_eos_insertion_is_present_in_some_window_with_linspace(self): method test_get_dataloader_error_scenarios (line 242) | def test_get_dataloader_error_scenarios(self): method test_apply_gptq_on_multi_block_model (line 263) | def test_apply_gptq_on_multi_block_model(self): method test_apply_gptq_with_unsupported_architectures (line 311) | def test_apply_gptq_with_unsupported_architectures( FILE: keras/src/quantizers/gptq_test.py function _get_test_layer (line 60) | def _get_test_layer(layer_type, kernel_shape): class GPTQTest (line 76) | class GPTQTest(testing.TestCase): method test_initialization_with_dense_layer (line 77) | def test_initialization_with_dense_layer(self): method test_initialization_with_einsumdense_3d (line 85) | def test_initialization_with_einsumdense_3d(self): method test_update_hessian (line 92) | def test_update_hessian(self): method test_gptq_on_single_layer (line 112) | def test_gptq_on_single_layer(self): method test_unsupported_layer_error (line 141) | def test_unsupported_layer_error(self): method test_update_hessian_invalid_input (line 146) | def test_update_hessian_invalid_input(self): method test_streaming_equals_big_batch (line 158) | def test_streaming_equals_big_batch(self): method test_hessian_matches_closed_form (line 180) | def test_hessian_matches_closed_form(self): method test_higher_rank_inputs_are_reshaped (line 193) | def test_higher_rank_inputs_are_reshaped(self): method test_raises_on_feature_mismatch (line 211) | def test_raises_on_feature_mismatch(self): method test_num_samples_accumulates_correctly (line 227) | def test_num_samples_accumulates_correctly(self): method test_numeric_stability_large_values (line 241) | def test_numeric_stability_large_values(self): method test_einsumdense_2d_kernel_hessian_shape (line 254) | def test_einsumdense_2d_kernel_hessian_shape(self): method test_einsumdense_3d_kernel_streaming_equals_big_batch (line 267) | def test_einsumdense_3d_kernel_streaming_equals_big_batch(self): method test_identity_inv_hessian_matches_direct_quantization (line 291) | def test_identity_inv_hessian_matches_direct_quantization(self): method test_activation_order_produces_equivalent_weights (line 335) | def test_activation_order_produces_equivalent_weights(self): function _compute_scale_zero (line 386) | def _compute_scale_zero(x, **_): function _get_sequence_classifier (line 397) | def _get_sequence_classifier(): function _get_simple_model (line 436) | def _get_simple_model(): function _mean_kl (line 440) | def _mean_kl(p, q): function _top1_match_rate (line 452) | def _top1_match_rate(a_logits, b_logits): function _pad_or_trim_1d (line 486) | def _pad_or_trim_1d(ids, length): function _char_tokenizer (line 498) | def _char_tokenizer(vocab_size=VOCAB_SIZE, seq_len=SEQ_LEN): function _string_dataset (line 516) | def _string_dataset( function _token_dataset (line 527) | def _token_dataset( class TestModelQuantization (line 543) | class TestModelQuantization(testing.TestCase): method test_quantize_gptq_combinations (line 556) | def test_quantize_gptq_combinations(self, dataset, config): method test_quantize_scenarios (line 655) | def test_quantize_scenarios( method test_gptq_filtering (line 662) | def test_gptq_filtering(self): method test_gptq_multi_filtering (line 701) | def test_gptq_multi_filtering(self): FILE: keras/src/quantizers/quantization_config.py class QuantizationConfig (line 7) | class QuantizationConfig: method __init__ (line 18) | def __init__(self, weight_quantizer=None, activation_quantizer=None): method mode (line 23) | def mode(self): method get_config (line 29) | def get_config(self): method from_config (line 40) | def from_config(cls, config): method weight_quantizer_or_default (line 53) | def weight_quantizer_or_default(config, default): method activation_quantizer_or_default (line 59) | def activation_quantizer_or_default(config, default): class Int8QuantizationConfig (line 66) | class Int8QuantizationConfig(QuantizationConfig): method __init__ (line 75) | def __init__(self, weight_quantizer=None, activation_quantizer="defaul... method mode (line 90) | def mode(self): class Int4QuantizationConfig (line 95) | class Int4QuantizationConfig(QuantizationConfig): method __init__ (line 109) | def __init__( method mode (line 158) | def mode(self): method get_config (line 161) | def get_config(self): method from_config (line 167) | def from_config(cls, config): class Float8QuantizationConfig (line 185) | class Float8QuantizationConfig(QuantizationConfig): method __init__ (line 193) | def __init__(self): method mode (line 197) | def mode(self): method get_config (line 200) | def get_config(self): method from_config (line 204) | def from_config(cls, config): function validate_and_resolve_config (line 208) | def validate_and_resolve_config(mode, config): function _validate_mode (line 294) | def _validate_mode(mode): function get_block_size_for_layer (line 303) | def get_block_size_for_layer(layer, config): FILE: keras/src/quantizers/quantization_config_test.py class QuantizationConfigTest (line 14) | class QuantizationConfigTest(testing.TestCase): method test_base_quantization_config (line 15) | def test_base_quantization_config(self): method test_int8_quantization_config_valid (line 20) | def test_int8_quantization_config_valid(self): method test_int8_quantization_config_invalid (line 30) | def test_int8_quantization_config_invalid(self): method test_int4_quantization_config_valid (line 35) | def test_int4_quantization_config_valid(self): method test_int4_quantization_config_invalid (line 46) | def test_int4_quantization_config_invalid(self): method test_int4_quantization_config_subchannel_rejects_custom_quantizer (line 52) | def test_int4_quantization_config_subchannel_rejects_custom_quantizer(... method test_quantization_config_serialization (line 103) | def test_quantization_config_serialization(self): method test_validate_and_resolve_config (line 118) | def test_validate_and_resolve_config(self): method test_int8_quantization_config_output_dtype_mismatch (line 164) | def test_int8_quantization_config_output_dtype_mismatch(self): method test_int4_quantization_config_output_dtype_mismatch (line 172) | def test_int4_quantization_config_output_dtype_mismatch(self): method test_model_save_and_load (line 178) | def test_model_save_and_load(self): method test_awq_requires_config (line 217) | def test_awq_requires_config(self): method test_awq_requires_correct_config_type (line 222) | def test_awq_requires_correct_config_type(self): FILE: keras/src/quantizers/quantizers.py class Quantizer (line 20) | class Quantizer: method __init__ (line 21) | def __init__(self, output_dtype="int8"): method __call__ (line 24) | def __call__(self, x): method from_config (line 29) | def from_config(cls, config): method get_config (line 48) | def get_config(self): function abs_max_quantize (line 70) | def abs_max_quantize( function abs_max_quantize_grouped_with_zero_point (line 124) | def abs_max_quantize_grouped_with_zero_point( function _abs_max_quantize_grouped_with_zero_point_numpy (line 182) | def _abs_max_quantize_grouped_with_zero_point_numpy( function _abs_max_quantize_grouped_with_zero_point_tensor (line 237) | def _abs_max_quantize_grouped_with_zero_point_tensor( class AbsMaxQuantizer (line 308) | class AbsMaxQuantizer(Quantizer): method __init__ (line 309) | def __init__( method __call__ (line 333) | def __call__(self, x, axis=None, to_numpy=False): method get_config (line 365) | def get_config(self): function adjust_and_nudge (line 376) | def adjust_and_nudge(min_range, max_range, num_bits, narrow_range): class FakeQuantWithMinMaxVars (line 409) | class FakeQuantWithMinMaxVars(Operation): method __init__ (line 410) | def __init__(self, num_bits=8, narrow_range=False, axis=None): method call (line 416) | def call(self, inputs, min_vals, max_vals): method compute_output_spec (line 426) | def compute_output_spec(self, inputs, min_vals, max_vals): function fake_quant_with_min_max_vars (line 431) | def fake_quant_with_min_max_vars( function compute_float8_scale (line 585) | def compute_float8_scale(amax, scale, dtype_max, margin=0): function compute_float8_amax_history (line 598) | def compute_float8_amax_history(x, amax_history): function quantize_and_dequantize (line 609) | def quantize_and_dequantize(inputs, scale, quantized_dtype, compute_dtype): function pack_int4 (line 624) | def pack_int4(arr, axis=0, dtype="int8"): function unpack_int4 (line 754) | def unpack_int4(packed, orig_len, axis=0, dtype="int8"): class GPTQQuantizer (line 903) | class GPTQQuantizer(Quantizer): method __init__ (line 921) | def __init__( method find_params (line 938) | def find_params(self, input_tensor): method get_config (line 950) | def get_config(self): method from_config (line 963) | def from_config(cls, config): function compute_quantization_parameters (line 975) | def compute_quantization_parameters( function quantize_with_zero_point (line 1111) | def quantize_with_zero_point(input_tensor, scale, zero, maxq): function dequantize_with_zero_point (line 1140) | def dequantize_with_zero_point(input_tensor, scale, zero): function quantize_with_sz_map (line 1157) | def quantize_with_sz_map( function dequantize_with_sz_map (line 1196) | def dequantize_with_sz_map(weights_matrix, scale, zero, g_idx, group_axi... FILE: keras/src/quantizers/quantizers_test.py class QuantizersTest (line 20) | class QuantizersTest(testing.TestCase): method test_get_method (line 21) | def test_get_method(self): method test_abs_max_quantizer (line 31) | def test_abs_max_quantizer(self): method test_abs_max_quantizer_to_numpy (line 66) | def test_abs_max_quantizer_to_numpy(self): method test_compute_float8_scale (line 77) | def test_compute_float8_scale(self): method test_compute_float8_amax_history (line 88) | def test_compute_float8_amax_history(self): method test_quantize_and_dequantize (line 102) | def test_quantize_and_dequantize(self): method test_pack_unpack_int4 (line 145) | def test_pack_unpack_int4(self, shape, axis, dtype, minval, maxval): method test_fake_quant_with_min_max_vars_symbolic (line 183) | def test_fake_quant_with_min_max_vars_symbolic(self, axis): method test_fake_quant_with_min_max_vars (line 437) | def test_fake_quant_with_min_max_vars( method test_grouped_quantize_dequantize_roundtrip (line 615) | def test_grouped_quantize_dequantize_roundtrip(self, block_size): method test_grouped_quantize_with_padding (line 646) | def test_grouped_quantize_with_padding(self): method test_grouped_vs_perchannel_accuracy (line 669) | def test_grouped_vs_perchannel_accuracy(self): method test_grouped_quantize_various_block_sizes (line 715) | def test_grouped_quantize_various_block_sizes(self): class Int4QuantizationConfigTest (line 739) | class Int4QuantizationConfigTest(testing.TestCase): method test_default_block_size (line 740) | def test_default_block_size(self): method test_custom_block_size (line 754) | def test_custom_block_size(self, block_size): method test_per_channel_mode_with_none (line 761) | def test_per_channel_mode_with_none(self): method test_per_channel_mode_with_negative_one (line 768) | def test_per_channel_mode_with_negative_one(self): method test_invalid_block_size_raises (line 775) | def test_invalid_block_size_raises(self): method test_get_config_includes_block_size (line 785) | def test_get_config_includes_block_size(self): method test_from_config_restores_block_size (line 793) | def test_from_config_restores_block_size(self): method test_serialization_roundtrip (line 802) | def test_serialization_roundtrip(self): method test_serialization_with_per_channel (line 812) | def test_serialization_with_per_channel(self): class GPTQQuantizerTest (line 822) | class GPTQQuantizerTest(testing.TestCase): method test_quantize_dequantize_roundtrip_error_bound_per_tensor (line 831) | def test_quantize_dequantize_roundtrip_error_bound_per_tensor( method test_quantize_clipping_behavior_extremes (line 858) | def test_quantize_clipping_behavior_extremes(self): method test_zero_scale_guard_no_nans_for_finite_inputs (line 873) | def test_zero_scale_guard_no_nans_for_finite_inputs(self): method test_idempotent_quantize_when_input_is_already_levels (line 891) | def test_idempotent_quantize_when_input_is_already_levels(self, bits): class ComputeScaleZeroTest (line 910) | class ComputeScaleZeroTest(testing.TestCase): method test_error_when_x_is_none (line 911) | def test_error_when_x_is_none(self): method test_error_when_x_is_empty (line 915) | def test_error_when_x_is_empty(self): method test_error_when_weight_rank_too_low (line 920) | def test_error_when_weight_rank_too_low(self): method test_per_tensor_shapes_and_basic_invariants (line 933) | def test_per_tensor_shapes_and_basic_invariants(self, bits, symmetric): method test_per_tensor_symmetric_on_constant_input_uses_safe_range (line 954) | def test_per_tensor_symmetric_on_constant_input_uses_safe_range(self): method test_weight_per_tensor_tiles_rows (line 966) | def test_weight_per_tensor_tiles_rows(self): method test_weight_per_channel_ungrouped_shapes (line 984) | def test_weight_per_channel_ungrouped_shapes(self): method test_weight_per_channel_grouped_shapes_and_count (line 1006) | def test_weight_per_channel_grouped_shapes_and_count(self): method test_dtype_and_finiteness (line 1033) | def test_dtype_and_finiteness(self, symmetric): method test_dequantize_with_sz_map_logic (line 1049) | def test_dequantize_with_sz_map_logic(self): method test_quantize_with_sz_map_logic (line 1099) | def test_quantize_with_sz_map_logic(self): class GroupedQuantizationParametersTest (line 1152) | class GroupedQuantizationParametersTest(testing.TestCase): method test_grouped_weight_shapes_divisible (line 1155) | def test_grouped_weight_shapes_divisible(self): method test_grouped_weight_shapes_non_divisible (line 1176) | def test_grouped_weight_shapes_non_divisible(self): method test_grouped_returns_3_values (line 1196) | def test_grouped_returns_3_values(self): method test_single_group_per_channel_semantics (line 1214) | def test_single_group_per_channel_semantics(self): method test_grouped_no_nan_inf (line 1236) | def test_grouped_no_nan_inf(self): method test_grouped_various_group_sizes (line 1250) | def test_grouped_various_group_sizes(self): FILE: keras/src/quantizers/utils.py function should_quantize_layer (line 4) | def should_quantize_layer(layer, filters): FILE: keras/src/quantizers/utils_test.py class UtilsTest (line 8) | class UtilsTest(testing.TestCase): method test_should_quantize_layer (line 18) | def test_should_quantize_layer(self, filters, layer_name, expected): FILE: keras/src/random/random.py function normal (line 6) | def normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function categorical (line 38) | def categorical(logits, num_samples, dtype="int32", seed=None): function uniform (line 88) | def uniform(shape, minval=0.0, maxval=1.0, dtype=None, seed=None): function randint (line 132) | def randint(shape, minval, maxval, dtype="int32", seed=None): function truncated_normal (line 176) | def truncated_normal(shape, mean=0.0, stddev=1.0, dtype=None, seed=None): function dropout (line 212) | def dropout(inputs, rate, noise_shape=None, seed=None): function shuffle (line 219) | def shuffle(x, axis=0, seed=None): function gamma (line 244) | def gamma(shape, alpha, dtype=None, seed=None): function binomial (line 272) | def binomial(shape, counts, probabilities, dtype=None, seed=None): function beta (line 313) | def beta(shape, alpha, beta, dtype=None, seed=None): FILE: keras/src/random/random_test.py class RandomCorrectnessTest (line 17) | class RandomCorrectnessTest(testing.TestCase): method test_normal (line 25) | def test_normal(self, seed, shape, mean, stddev): method test_uniform (line 39) | def test_uniform(self, seed, shape, minval, maxval): method test_categorical (line 54) | def test_categorical(self, seed, num_samples, batch_size): method test_randint (line 73) | def test_randint(self, seed, shape, min, max, dtype): method test_truncated_normal (line 96) | def test_truncated_normal(self, seed, shape, mean, stddev): method test_dropout (line 107) | def test_dropout(self): method test_dropout_noise_shape (line 117) | def test_dropout_noise_shape(self): method test_global_seed_generator (line 124) | def test_global_seed_generator(self): method test_shuffle (line 171) | def test_shuffle(self): method test_gamma (line 193) | def test_gamma(self, seed, shape, alpha, dtype): method test_binomial (line 222) | def test_binomial(self, seed, shape, counts, probabilities, dtype): method test_beta (line 276) | def test_beta(self, seed, shape, alpha, beta, dtype): class RandomBehaviorTest (line 328) | class RandomBehaviorTest(testing.TestCase): method test_beta_tf_data_compatibility (line 329) | def test_beta_tf_data_compatibility(self): method test_categorical_errors (line 362) | def test_categorical_errors(self): method test_randint_dtype_validation (line 368) | def test_randint_dtype_validation(self): method test_uniform_dtype_validation (line 374) | def test_uniform_dtype_validation(self): method test_dropout_jax_jit_stateless (line 385) | def test_dropout_jax_jit_stateless(self): method test_jax_rngkey_seed (line 404) | def test_jax_rngkey_seed(self): method test_jax_unseed_disallowed_during_tracing (line 419) | def test_jax_unseed_disallowed_during_tracing(self): method test_tf_cast_seed (line 435) | def test_tf_cast_seed(self): class RandomDTypeTest (line 445) | class RandomDTypeTest(testing.TestCase): method test_normal (line 454) | def test_normal(self, dtype): method test_categorical (line 459) | def test_categorical(self, dtype): method test_uniform (line 465) | def test_uniform(self, dtype): method test_randint (line 470) | def test_randint(self, dtype): method test_truncated_normal (line 475) | def test_truncated_normal(self, dtype): method test_dropout (line 480) | def test_dropout(self, dtype): method test_gamma (line 486) | def test_gamma(self, dtype): method test_binomial (line 491) | def test_binomial(self, dtype): method test_beta (line 496) | def test_beta(self, dtype): FILE: keras/src/random/seed_generator.py class SeedGenerator (line 15) | class SeedGenerator: method __init__ (line 62) | def __init__(self, seed=None, name=None, **kwargs): method next (line 98) | def next(self, ordered=True): method get_config (line 113) | def get_config(self): method from_config (line 117) | def from_config(cls, config): function global_seed_generator (line 121) | def global_seed_generator(): function make_default_seed (line 145) | def make_default_seed(): function draw_seed (line 149) | def draw_seed(seed): FILE: keras/src/random/seed_generator_test.py class SeedGeneratorTest (line 11) | class SeedGeneratorTest(testing.TestCase): method test_seed_generator_initialization (line 12) | def test_seed_generator_initialization(self): method test_seed_generator_next (line 25) | def test_seed_generator_next(self): method test_global_seed_generator (line 31) | def test_global_seed_generator(self): method test_make_default_seed (line 36) | def test_make_default_seed(self): method test_seed_generator_dtype (line 41) | def test_seed_generator_dtype(self): method test_draw_seed_from_seed_generator (line 50) | def test_draw_seed_from_seed_generator(self): method test_draw_seed_from_integer (line 55) | def test_draw_seed_from_integer(self): method test_draw_seed_from_large_integer (line 62) | def test_draw_seed_from_large_integer(self): method test_draw_seed_from_none (line 76) | def test_draw_seed_from_none(self): method test_draw_seed_invalid (line 80) | def test_draw_seed_invalid(self): method test_seed_generator_unexpected_kwargs (line 86) | def test_seed_generator_unexpected_kwargs(self): method test_jax_tracing_with_global_seed_generator (line 95) | def test_jax_tracing_with_global_seed_generator(self): method test_seed_generator_serialization (line 108) | def test_seed_generator_serialization(self): FILE: keras/src/regularizers/__init__.py function serialize (line 27) | def serialize(regularizer): function deserialize (line 32) | def deserialize(config, custom_objects=None): function get (line 42) | def get(identifier): FILE: keras/src/regularizers/regularizers.py class Regularizer (line 9) | class Regularizer: method __call__ (line 123) | def __call__(self, x): method from_config (line 128) | def from_config(cls, config): method get_config (line 147) | def get_config(self): class L1L2 (line 169) | class L1L2(Regularizer): method __init__ (line 189) | def __init__(self, l1=0.0, l2=0.0): method __call__ (line 201) | def __call__(self, x): method get_config (line 209) | def get_config(self): class L1 (line 214) | class L1(Regularizer): method __init__ (line 230) | def __init__(self, l1=0.01): method __call__ (line 235) | def __call__(self, x): method get_config (line 238) | def get_config(self): class L2 (line 243) | class L2(Regularizer): method __init__ (line 259) | def __init__(self, l2=0.01): method __call__ (line 264) | def __call__(self, x): method get_config (line 267) | def get_config(self): class OrthogonalRegularizer (line 277) | class OrthogonalRegularizer(Regularizer): method __init__ (line 302) | def __init__(self, factor=0.01, mode="rows"): method __call__ (line 312) | def __call__(self, inputs): method get_config (line 337) | def get_config(self): function validate_float_arg (line 341) | def validate_float_arg(value, name): FILE: keras/src/regularizers/regularizers_test.py class RegularizersTest (line 9) | class RegularizersTest(testing.TestCase): method test_config (line 10) | def test_config(self): method test_l1 (line 23) | def test_l1(self): method test_l2 (line 29) | def test_l2(self): method test_l1_l2 (line 35) | def test_l1_l2(self): method test_orthogonal_regularizer (line 43) | def test_orthogonal_regularizer(self): method test_get_method (line 62) | def test_get_method(self): method test_l1l2_get_config (line 81) | def test_l1l2_get_config(self): method test_orthogonal_regularizer_mode_validation (line 96) | def test_orthogonal_regularizer_mode_validation(self): method test_orthogonal_regularizer_input_rank_validation (line 106) | def test_orthogonal_regularizer_input_rank_validation(self): method test_orthogonal_regularizer_get_config (line 118) | def test_orthogonal_regularizer_get_config(self): class ValidateFloatArgTest (line 136) | class ValidateFloatArgTest(testing.TestCase): method test_validate_float_with_valid_args (line 137) | def test_validate_float_with_valid_args(self): method test_validate_float_with_invalid_types (line 141) | def test_validate_float_with_invalid_types(self): method test_validate_float_with_nan (line 147) | def test_validate_float_with_nan(self): method test_validate_float_with_inf (line 153) | def test_validate_float_with_inf(self): method test_validate_float_with_negative_number (line 163) | def test_validate_float_with_negative_number(self): FILE: keras/src/saving/file_editor.py function is_ipython_notebook (line 24) | def is_ipython_notebook(): class KerasFileEditor (line 38) | class KerasFileEditor: method __init__ (line 67) | def __init__( method summary (line 111) | def summary(self): method compare (line 115) | def compare(self, reference_model): method _edit_object (line 251) | def _edit_object(self, edit_fn, source_name, target_name=None): method rename_object (line 305) | def rename_object(self, object_name, new_name): method delete_object (line 321) | def delete_object(self, object_name): method add_object (line 335) | def add_object(self, object_path, weights): method delete_weight (line 368) | def delete_weight(self, object_name, weight_name): method add_weights (line 391) | def add_weights(self, object_name, weights): method save (line 415) | def save(self, filepath): method resave_weights (line 452) | def resave_weights(self, filepath): method _extract_weights_from_store (line 455) | def _extract_weights_from_store(self, data, metadata=None, inner_path=... method _generate_filepath_info (line 568) | def _generate_filepath_info(self, rich_style=False): method _generate_config_info (line 576) | def _generate_config_info(self, rich_style=False): method _generate_metadata_info (line 579) | def _generate_metadata_info(self, rich_style=False): method _print_weights_structure (line 587) | def _print_weights_structure( method _weights_summary_cli (line 632) | def _weights_summary_cli(self): method _weights_summary_interactive (line 636) | def _weights_summary_interactive(self): function get_weight_spec_of_saveable (line 675) | def get_weight_spec_of_saveable(saveable, spec, visited_saveables=None): function get_weight_spec_of_container (line 716) | def get_weight_spec_of_container(container, spec, visited_saveables): function initialize_id_counter (line 741) | def initialize_id_counter(): function increment_id_counter (line 746) | def increment_id_counter(): function get_id_counter (line 751) | def get_id_counter(): function display_weight (line 755) | def display_weight(weight, axis=-1, threshold=16): FILE: keras/src/saving/file_editor_test.py function get_source_model (line 11) | def get_source_model(): function get_target_model (line 19) | def get_target_model(): class SavingTest (line 28) | class SavingTest(testing.TestCase): method test_basics (line 29) | def test_basics(self): method test_scalar_weight (line 94) | def test_scalar_weight(self): FILE: keras/src/saving/keras_saveable.py class KerasSaveable (line 4) | class KerasSaveable: method _obj_type (line 10) | def _obj_type(self): method _unpickle_model (line 17) | def _unpickle_model(cls, bytesio): method __reduce__ (line 25) | def __reduce__(self): FILE: keras/src/saving/object_registration.py class CustomObjectScope (line 18) | class CustomObjectScope: method __init__ (line 45) | def __init__(self, custom_objects): method __enter__ (line 49) | def __enter__(self): method __exit__ (line 58) | def __exit__(self, *args, **kwargs): function get_custom_objects (line 74) | def get_custom_objects(): function register_keras_serializable (line 100) | def register_keras_serializable(package="Custom", name=None): function get_registered_name (line 165) | def get_registered_name(obj): function get_registered_object (line 191) | def get_registered_object(name, custom_objects=None, module_objects=None): FILE: keras/src/saving/object_registration_test.py class TestObjectRegistration (line 7) | class TestObjectRegistration(testing.TestCase): method test_custom_object_scope (line 8) | def test_custom_object_scope(self): method test_serialize_custom_class_with_default_name (line 35) | def test_serialize_custom_class_with_default_name(self): method test_serialize_custom_class_with_custom_name (line 60) | def test_serialize_custom_class_with_custom_name(self): method test_serialize_custom_function (line 92) | def test_serialize_custom_function(self): method test_serialize_custom_class_without_get_config_fails (line 110) | def test_serialize_custom_class_without_get_config_fails(self): FILE: keras/src/saving/orbax_util.py function is_orbax_checkpoint (line 11) | def is_orbax_checkpoint(filepath): function find_latest_orbax_checkpoint (line 50) | def find_latest_orbax_checkpoint(checkpoint_dir): function build_orbax_abstract_pytree (line 59) | def build_orbax_abstract_pytree(checkpoint_path, ref_state=None): FILE: keras/src/saving/saving_api.py function save_model (line 19) | def save_model(model, filepath, overwrite=True, zipped=None, **kwargs): function load_model (line 125) | def load_model(filepath, custom_objects=None, compile=True, safe_mode=Tr... function save_weights (line 234) | def save_weights( function load_weights (line 262) | def load_weights(model, filepath, skip_mismatch=False, **kwargs): function _load_model_from_orbax_checkpoint (line 363) | def _load_model_from_orbax_checkpoint( FILE: keras/src/saving/saving_api_test.py class SaveModelTests (line 17) | class SaveModelTests(test_case.TestCase): method get_model (line 18) | def get_model(self): method test_basic_saving (line 26) | def test_basic_saving(self): method test_invalid_save_format (line 36) | def test_invalid_save_format(self): method test_unsupported_arguments (line 44) | def test_unsupported_arguments(self): method test_save_h5_format (line 53) | def test_save_h5_format(self): method test_save_unsupported_extension (line 72) | def test_save_unsupported_extension(self): method test_objects_to_skip (line 80) | def test_objects_to_skip(self): class LoadModelTests (line 119) | class LoadModelTests(test_case.TestCase): method get_model (line 120) | def get_model(self, dtype=None): method test_basic_load (line 136) | def test_basic_load(self, dtype): method test_load_unsupported_format (line 147) | def test_load_unsupported_format(self): method test_load_keras_not_zip (line 152) | def test_load_keras_not_zip(self): method test_load_h5_format (line 157) | def test_load_h5_format(self): method test_load_model_with_custom_objects (line 167) | def test_load_model_with_custom_objects(self): method test_save_unzipped (line 183) | def test_save_unzipped(self): class LoadWeightsTests (line 207) | class LoadWeightsTests(test_case.TestCase): method get_model (line 208) | def get_model(self, dtype=None): method test_load_weights (line 223) | def test_load_weights(self, save_format, source_dtype, dest_dtype): method test_load_weights_invalid_kwargs (line 257) | def test_load_weights_invalid_kwargs(self): method test_load_weights_invalid_extension (line 293) | def test_load_weights_invalid_extension(self): method test_load_sharded_weights (line 299) | def test_load_sharded_weights(self): FILE: keras/src/saving/saving_lib.py function save_model (line 72) | def save_model(model, filepath, weights_format="h5", zipped=True): function _serialize_model_as_json (line 145) | def _serialize_model_as_json(model): function _save_model_to_dir (line 158) | def _save_model_to_dir(model, dirpath, weights_format): function _save_model_to_fileobj (line 192) | def _save_model_to_fileobj(model, fileobj, weights_format): function _upload_model_to_hf (line 269) | def _upload_model_to_hf(model, hf_path, weights_format): function load_model (line 328) | def load_model(filepath, custom_objects=None, compile=True, safe_mode=Tr... function _load_model_from_dir (line 370) | def _load_model_from_dir(dirpath, custom_objects, compile, safe_mode): function _model_from_config (line 422) | def _model_from_config(config_json, custom_objects, compile, safe_mode): function _load_model_from_fileobj (line 437) | def _load_model_from_fileobj(fileobj, custom_objects, compile, safe_mode): function save_weights_only (line 511) | def save_weights_only( function load_weights_only (line 569) | def load_weights_only( function _raise_loading_failure (line 631) | def _raise_loading_failure(error_msgs, warn_only=False): function _write_to_zip_recursively (line 648) | def _write_to_zip_recursively(zipfile_to_save, system_path, zip_path): function _name_key (line 664) | def _name_key(name): function _walk_saveable (line 671) | def _walk_saveable(saveable): function _save_state (line 701) | def _save_state( function _load_state (line 766) | def _load_state( function _save_container_state (line 869) | def _save_container_state( function _load_container_state (line 898) | def _load_container_state( class DiskIOStore (line 934) | class DiskIOStore: method __init__ (line 944) | def __init__(self, root_path, archive=None, mode=None): method make (line 968) | def make(self, path): method get (line 976) | def get(self, path): method close (line 984) | def close(self): class H5IOStore (line 993) | class H5IOStore: method __init__ (line 1006) | def __init__(self, path_or_io, archive=None, mode="r"): method __bool__ (line 1039) | def __bool__(self): method _verify_group (line 1044) | def _verify_group(self, group): method _verify_dataset (line 1051) | def _verify_dataset(self, dataset): method _get_h5_file (line 1063) | def _get_h5_file(self, path_or_io, mode=None): method make (line 1078) | def make(self, path, metadata=None): method get (line 1107) | def get(self, path): method close (line 1138) | def close(self): method _create_h5_group (line 1147) | def _create_h5_group(self, path, metadata=None): method __len__ (line 1160) | def __len__(self): method keys (line 1163) | def keys(self): method __getitem__ (line 1166) | def __getitem__(self, key): method __setitem__ (line 1178) | def __setitem__(self, key, value): method __delitem__ (line 1191) | def __delitem__(self, key): method __contains__ (line 1196) | def __contains__(self, item): class ShardedH5IOStore (line 1200) | class ShardedH5IOStore(H5IOStore): method __init__ (line 1215) | def __init__(self, path_or_io, max_shard_size=5, archive=None, mode="r"): method make (line 1272) | def make(self, path, metadata=None): method get (line 1293) | def get(self, path): method close (line 1326) | def close(self): method _create_new_shard_file (line 1348) | def _create_new_shard_file(self): method _switch_h5_file (line 1360) | def _switch_h5_file(self, filename, mode): method _restore_h5_file (line 1376) | def _restore_h5_file(self): method _get_h5_group (line 1387) | def _get_h5_group(self, path): method __len__ (line 1403) | def __len__(self): method keys (line 1413) | def keys(self): method __getitem__ (line 1425) | def __getitem__(self, key): method __setitem__ (line 1442) | def __setitem__(self, key, value): method __delitem__ (line 1483) | def __delitem__(self, key): method __contains__ (line 1501) | def __contains__(self, item): class NpzIOStore (line 1516) | class NpzIOStore: method __init__ (line 1517) | def __init__(self, root_path, archive=None, mode="r"): method make (line 1538) | def make(self, path, metadata=None): method get (line 1545) | def get(self, path): method close (line 1554) | def close(self): function get_temp_dir (line 1566) | def get_temp_dir(): function get_attr_skipset (line 1573) | def get_attr_skipset(obj_type): function is_memory_sufficient (line 1647) | def is_memory_sufficient(model): function _split_path_components (line 1664) | def _split_path_components(path): function _write_nested_dict_to_dir (line 1689) | def _write_nested_dict_to_dir(tree, base_dir): function _save_assets_to_dict (line 1706) | def _save_assets_to_dict(model): function _load_assets_from_dict (line 1757) | def _load_assets_from_dict(model, assets_dict): FILE: keras/src/saving/saving_lib_test.py class MyDense (line 23) | class MyDense(keras.layers.Layer): method __init__ (line 24) | def __init__(self, units, **kwargs): method build (line 29) | def build(self, input_shape): method call (line 54) | def call(self, inputs): method two (line 57) | def two(self): class LayerWithCustomSaving (line 66) | class LayerWithCustomSaving(MyDense): method build (line 67) | def build(self, input_shape): method save_assets (line 72) | def save_assets(self, inner_path): method save_own_variables (line 76) | def save_own_variables(self, store): method load_assets (line 79) | def load_assets(self, inner_path): method load_own_variables (line 84) | def load_own_variables(self, store): class CustomModelX (line 89) | class CustomModelX(keras.Model): method __init__ (line 90) | def __init__(self, *args, **kwargs): method call (line 95) | def call(self, inputs): method one (line 99) | def one(self): class ModelWithCustomSaving (line 104) | class ModelWithCustomSaving(keras.Model): method __init__ (line 105) | def __init__(self, *args, **kwargs): method call (line 109) | def call(self, inputs): class CompileOverridingModel (line 114) | class CompileOverridingModel(keras.Model): method __init__ (line 115) | def __init__(self, *args, **kwargs): method compile (line 119) | def compile(self, *args, **kwargs): method call (line 122) | def call(self, inputs): class CompileOverridingSequential (line 127) | class CompileOverridingSequential(keras.Sequential): method compile (line 128) | def compile(self, *args, **kwargs): class SubclassFunctional (line 133) | class SubclassFunctional(keras.Model): method __init__ (line 136) | def __init__(self, **kwargs): method layer_property (line 146) | def layer_property(self): method get_config (line 150) | def get_config(self): method from_config (line 154) | def from_config(cls, config): function my_mean_squared_error (line 159) | def my_mean_squared_error(y_true, y_pred): function _get_subclassed_model (line 164) | def _get_subclassed_model(compile=True): function _get_custom_sequential_model (line 175) | def _get_custom_sequential_model(compile=True): function _get_basic_sequential_model (line 188) | def _get_basic_sequential_model(compile=True): function _get_custom_functional_model (line 205) | def _get_custom_functional_model(compile=True): function _get_basic_functional_model (line 219) | def _get_basic_functional_model(compile=True): function _get_subclassed_functional_model (line 233) | def _get_subclassed_functional_model(compile=True): function _load_model_fn (line 245) | def _load_model_fn(filepath): class SavingTest (line 249) | class SavingTest(testing.TestCase): method setUp (line 250) | def setUp(self): method tearDown (line 256) | def tearDown(self): method _test_inference_after_instantiation (line 260) | def _test_inference_after_instantiation(self, model): method test_inference_after_instantiation (line 280) | def test_inference_after_instantiation(self, model_fn): method _test_compile_preserved (line 288) | def _test_compile_preserved(self, model): method test_compile_preserved (line 329) | def test_compile_preserved(self, model_fn): method test_saving_preserve_unbuilt_state (line 337) | def test_saving_preserve_unbuilt_state(self): method test_saved_module_paths_and_class_names (line 347) | def test_saved_module_paths_and_class_names(self): method test_saving_custom_assets_and_variables (line 374) | def test_saving_custom_assets_and_variables(self): method _test_compile_overridden_warnings (line 397) | def _test_compile_overridden_warnings(self, model_type): method test_compile_overridden_warnings_sequential (line 419) | def test_compile_overridden_warnings_sequential(self): method test_compile_overridden_warnings_subclassed (line 422) | def test_compile_overridden_warnings_subclassed(self): method test_metadata (line 425) | def test_metadata(self): method test_save_load_weights_only (line 456) | def test_save_load_weights_only(self): method test_save_weights_only_with_unbuilt_model (line 472) | def test_save_weights_only_with_unbuilt_model(self): method test_load_weights_only_with_unbuilt_model (line 482) | def test_load_weights_only_with_unbuilt_model(self): method test_load_weights_only_with_keras_file (line 499) | def test_load_weights_only_with_keras_file(self): method test_save_weights_subclassed_functional (line 514) | def test_save_weights_subclassed_functional(self): method test_compile_arg (line 535) | def test_compile_arg(self): method test_partial_load (line 564) | def test_partial_load(self): method test_save_to_fileobj (line 624) | def test_save_to_fileobj(self): method test_save_model_exception_raised (line 651) | def test_save_model_exception_raised(self, is_memory_sufficient): method test_load_model_exception_raised (line 686) | def test_load_model_exception_raised(self, is_memory_sufficient): method test_load_model_read_only_system (line 714) | def test_load_model_read_only_system(self): method test_load_model_concurrently (line 737) | def test_load_model_concurrently(self): method test_load_model_containing_reused_layer (line 753) | def test_load_model_containing_reused_layer(self): method test_weights_sharding (line 769) | def test_weights_sharding(self, model_name, max_shard_size): class SavingAPITest (line 810) | class SavingAPITest(testing.TestCase): method test_saving_api_errors (line 811) | def test_saving_api_errors(self): method test_model_api_endpoint (line 840) | def test_model_api_endpoint(self): method test_model_api_endpoint_h5 (line 849) | def test_model_api_endpoint_h5(self): method test_model_api_errors (line 858) | def test_model_api_errors(self): method test_safe_mode (line 874) | def test_safe_mode(self): method test_normalization_kpl (line 887) | def test_normalization_kpl(self): class GrowthFactor (line 925) | class GrowthFactor: method __init__ (line 926) | def __init__(self, factor): method __call__ (line 929) | def __call__(self, inputs): method get_config (line 932) | def get_config(self): class FactorLayer (line 937) | class FactorLayer(keras.layers.Layer): method __init__ (line 938) | def __init__(self, factor, **kwargs): method call (line 942) | def call(self, x): method get_config (line 945) | def get_config(self): class ComplexModel (line 953) | class ComplexModel(keras.layers.Layer): method __init__ (line 954) | def __init__(self, first_layer, second_layer=None, **kwargs): method get_config (line 962) | def get_config(self): method call (line 972) | def call(self, inputs): class SavingBattleTest (line 976) | class SavingBattleTest(testing.TestCase): method test_custom_object_without_from_config (line 977) | def test_custom_object_without_from_config(self): method test_complex_model_without_explicit_deserialization (line 993) | def test_complex_model_without_explicit_deserialization(self): method test_redefinition_of_trackable (line 1005) | def test_redefinition_of_trackable(self): method test_normalization_legacy_h5_format (line 1044) | def test_normalization_legacy_h5_format(self): method test_legacy_h5_format (line 1062) | def test_legacy_h5_format(self): method test_nested_functional_model_saving (line 1078) | def test_nested_functional_model_saving(self): method test_nested_shared_functional_model_saving (line 1098) | def test_nested_shared_functional_model_saving(self): method test_bidirectional_lstm_saving (line 1123) | def test_bidirectional_lstm_saving(self): method test_remove_weights_only_saving_and_loading (line 1135) | def test_remove_weights_only_saving_and_loading(self): class SavingH5IOStoreTest (line 1149) | class SavingH5IOStoreTest(testing.TestCase): method test_h5_io_store_basics (line 1150) | def test_h5_io_store_basics(self): method test_h5_io_store_lora (line 1183) | def test_h5_io_store_lora(self): method test_h5_io_store_exception_raised (line 1217) | def test_h5_io_store_exception_raised(self): method test_sharded_h5_io_store_basics (line 1271) | def test_sharded_h5_io_store_basics(self): method test_sharded_h5_io_store_exception_raised (line 1322) | def test_sharded_h5_io_store_exception_raised(self): FILE: keras/src/saving/serialization_lib.py class SerializableDict (line 47) | class SerializableDict: method __init__ (line 48) | def __init__(self, **config): method serialize (line 51) | def serialize(self): class SafeModeScope (line 55) | class SafeModeScope: method __init__ (line 58) | def __init__(self, safe_mode=True): method __enter__ (line 61) | def __enter__(self): method __exit__ (line 65) | def __exit__(self, *args, **kwargs): function enable_unsafe_deserialization (line 72) | def enable_unsafe_deserialization(): function in_safe_mode (line 77) | def in_safe_mode(): class ObjectSharingScope (line 81) | class ObjectSharingScope: method __enter__ (line 84) | def __enter__(self): method __exit__ (line 88) | def __exit__(self, *args, **kwargs): function get_shared_object (line 95) | def get_shared_object(obj_id): function record_object_after_serialization (line 104) | def record_object_after_serialization(obj, config): function record_object_after_deserialization (line 122) | def record_object_after_deserialization(obj, obj_id): function serialize_keras_object (line 138) | def serialize_keras_object(obj): function get_build_and_compile_config (line 297) | def get_build_and_compile_config(obj, config): function serialize_with_public_class (line 309) | def serialize_with_public_class(cls, inner_config=None): function serialize_with_public_fn (line 344) | def serialize_with_public_fn(fn, config, fn_module_name=None): function _get_class_or_fn_config (line 380) | def _get_class_or_fn_config(obj): function serialize_dict (line 404) | def serialize_dict(obj): function deserialize_keras_object (line 414) | def deserialize_keras_object( function _retrieve_class_or_fn (line 759) | def _retrieve_class_or_fn( FILE: keras/src/saving/serialization_lib_test.py function custom_fn (line 15) | def custom_fn(x): class CustomLayer (line 19) | class CustomLayer(keras.layers.Layer): method __init__ (line 20) | def __init__(self, factor): method call (line 24) | def call(self, x): method get_config (line 27) | def get_config(self): class NestedCustomLayer (line 31) | class NestedCustomLayer(keras.layers.Layer): method __init__ (line 32) | def __init__(self, factor, dense=None, activation=None): method call (line 42) | def call(self, x): method get_config (line 45) | def get_config(self): class WrapperLayer (line 53) | class WrapperLayer(keras.layers.Wrapper): method call (line 54) | def call(self, x): class SerializationLibTest (line 58) | class SerializationLibTest(testing.TestCase): method roundtrip (line 59) | def roundtrip(self, obj, custom_objects=None, safe_mode=True): method test_simple_objects (line 69) | def test_simple_objects(self): method test_builtin_layers (line 85) | def test_builtin_layers(self): method test_numpy_get_item_layer (line 98) | def test_numpy_get_item_layer(self): method test_serialize_ellipsis (line 111) | def test_serialize_ellipsis(self): method test_tensors_and_shapes (line 115) | def test_tensors_and_shapes(self): method test_custom_fn (line 125) | def test_custom_fn(self): method test_custom_layer (line 145) | def test_custom_layer(self): method test_lambda_fn (line 170) | def test_lambda_fn(self): method test_lambda_layer (line 178) | def test_lambda_layer(self): method test_safe_mode_scope (line 189) | def test_safe_mode_scope(self): method test_dict_inputs_outputs (line 202) | def test_dict_inputs_outputs(self): method test_shared_inner_layer (line 223) | def test_shared_inner_layer(self): method test_functional_subclass (line 240) | def test_functional_subclass(self): method test_shared_object (line 282) | def test_shared_object(self): method test_layer_sharing (line 332) | def test_layer_sharing(self): method test_keras36_custom_function_reloading (line 344) | def test_keras36_custom_function_reloading(self): method test_layer_instance_as_activation (line 367) | def test_layer_instance_as_activation(self): method test_layer_instance_with_config_as_activation (line 383) | def test_layer_instance_with_config_as_activation(self): method test_layer_string_as_activation (line 407) | def test_layer_string_as_activation(self): class MyDense (line 425) | class MyDense(keras.layers.Layer): method __init__ (line 426) | def __init__( method get_config (line 439) | def get_config(self): method build (line 447) | def build(self, input_shape): method call (line 457) | def call(self, inputs): class MyWrapper (line 462) | class MyWrapper(keras.layers.Layer): method __init__ (line 463) | def __init__(self, wrapped, **kwargs): method get_config (line 467) | def get_config(self): method from_config (line 471) | def from_config(cls, config): method call (line 477) | def call(self, inputs): FILE: keras/src/testing/test_case.py class TestCase (line 22) | class TestCase(parameterized.TestCase): method __init__ (line 25) | def __init__(self, *args, **kwargs): method setUp (line 28) | def setUp(self): method get_temp_dir (line 36) | def get_temp_dir(self): method assertAllClose (line 41) | def assertAllClose( method assertNotAllClose (line 61) | def assertNotAllClose(self, x1, x2, atol=1e-6, rtol=1e-6, msg=None): method assertAlmostEqual (line 71) | def assertAlmostEqual(self, x1, x2, decimal=3, tpu_decimal=None, msg=N... method assertAllEqual (line 81) | def assertAllEqual(self, x1, x2, msg=None): method assertLen (line 91) | def assertLen(self, iterable, expected_len, msg=None): method assertSparse (line 94) | def assertSparse(self, x, sparse=True): method assertRagged (line 117) | def assertRagged(self, x, ragged=True): method assertDType (line 133) | def assertDType(self, x, dtype, msg=None): method assertFileExists (line 147) | def assertFileExists(self, path): method run_class_serialization_test (line 151) | def run_class_serialization_test(self, instance, custom_objects=None): method run_layer_test (line 185) | def run_layer_test( function _jax_uses (line 627) | def _jax_uses(device_type): function _tensorflow_uses (line 633) | def _tensorflow_uses(device_type): function _torch_uses (line 639) | def _torch_uses(device_type): function uses_gpu (line 647) | def uses_gpu(): function uses_tpu (line 660) | def uses_tpu(): function jax_uses_gpu (line 671) | def jax_uses_gpu(): function jax_uses_tpu (line 675) | def jax_uses_tpu(): function tensorflow_uses_gpu (line 679) | def tensorflow_uses_gpu(): function tensorflow_uses_tpu (line 683) | def tensorflow_uses_tpu(): function torch_uses_gpu (line 687) | def torch_uses_gpu(): function create_keras_tensors (line 691) | def create_keras_tensors(input_shape, dtype, sparse, ragged): function create_eager_tensors (line 708) | def create_eager_tensors(input_shape, dtype, sparse, ragged): function is_shape_tuple (line 785) | def is_shape_tuple(x): function map_shape_dtype_structure (line 791) | def map_shape_dtype_structure(fn, shape, dtype): function get_seed_generators (line 814) | def get_seed_generators(layer): function to_json_with_tuples (line 826) | def to_json_with_tuples(value): function from_json_with_tuples (line 844) | def from_json_with_tuples(value): FILE: keras/src/testing/test_utils.py function get_test_data (line 4) | def get_test_data( function named_product (line 80) | def named_product(*args, **kwargs): FILE: keras/src/testing/test_utils_test.py class GetTestDataTest (line 8) | class GetTestDataTest(test_case.TestCase): method setUp (line 9) | def setUp(self): method test_labels_within_range (line 15) | def test_labels_within_range(self): method test_edge_cases_for_zero_samples (line 28) | def test_edge_cases_for_zero_samples(self): method test_get_test_data_returns_correct_number_of_samples (line 40) | def test_get_test_data_returns_correct_number_of_samples(self): method test_get_test_data_returns_correct_shape_of_data (line 53) | def test_get_test_data_returns_correct_shape_of_data(self): method test_get_test_data_returns_different_data_for_different_seeds (line 68) | def test_get_test_data_returns_different_data_for_different_seeds(self): method test_get_test_data_returns_consistent_data_for_same_seed (line 89) | def test_get_test_data_returns_consistent_data_for_same_seed(self): method test_input_shape_variations (line 110) | def test_input_shape_variations(self): method test_all_classes_represented (line 123) | def test_all_classes_represented(self): method test_data_type (line 134) | def test_data_type(self): method test_label_type (line 145) | def test_label_type(self): class ClassDistributionTests (line 157) | class ClassDistributionTests(test_case.TestCase): method setUp (line 158) | def setUp(self): method test_equal_class_distribution (line 164) | def test_equal_class_distribution(self): method test_uneven_samples_class_distribution (line 182) | def test_uneven_samples_class_distribution(self): method test_randomness_in_class_distribution (line 198) | def test_randomness_in_class_distribution(self): method test_large_number_of_classes (line 215) | def test_large_number_of_classes(self): method test_single_class (line 231) | def test_single_class(self): class NamedProductTest (line 244) | class NamedProductTest(parameterized.TestCase): method test_test_cases (line 245) | def test_test_cases(self): method test_test_cases_no_product (line 267) | def test_test_cases_no_product(self): method test_via_decorator (line 282) | def test_via_decorator(self, x, numeral_type): method test_via_decorator_no_product (line 289) | def test_via_decorator_no_product(self, numeral_type): FILE: keras/src/trainers/compile_utils.py class MetricsList (line 15) | class MetricsList(metrics_module.Metric): method __init__ (line 16) | def __init__(self, metrics, name="metrics_list", output_name=None): method update_state (line 21) | def update_state(self, y_true, y_pred, sample_weight=None): method reset_state (line 25) | def reset_state(self): method get_result (line 29) | def get_result(self): method get_config (line 32) | def get_config(self): method from_config (line 36) | def from_config(cls, config): function is_binary_or_sparse_categorical (line 40) | def is_binary_or_sparse_categorical(y_true, y_pred): function get_metric (line 53) | def get_metric(identifier, y_true, y_pred): function get_metrics_list (line 88) | def get_metrics_list(metrics, y_true, y_pred, output_name=None): function get_loss (line 102) | def get_loss(identifier, y_true, y_pred): class CompileMetrics (line 130) | class CompileMetrics(metrics_module.Metric): method __init__ (line 132) | def __init__( method metrics (line 160) | def metrics(self): method variables (line 172) | def variables(self): method build (line 183) | def build(self, y_true, y_pred): method _build_metrics_set (line 198) | def _build_metrics_set(self, metrics, y_true, y_pred, argument_name): method update_state (line 299) | def update_state(self, y_true, y_pred, sample_weight=None): method reset_state (line 320) | def reset_state(self): method result (line 330) | def result(self): method get_config (line 376) | def get_config(self): method from_config (line 380) | def from_config(cls, config): class CompileLoss (line 384) | class CompileLoss(losses_module.Loss): method __init__ (line 387) | def __init__( method metrics (line 425) | def metrics(self): method variables (line 429) | def variables(self): method _build_nested (line 435) | def _build_nested(self, y_true, y_pred, loss, output_names, current_pa... method build (line 539) | def build(self, y_true, y_pred): method _get_y_pred_output_names (line 647) | def _get_y_pred_output_names(self, y_pred): method __call__ (line 660) | def __call__(self, y_true, y_pred, sample_weight=None): method call (line 664) | def call(self, y_true, y_pred, sample_weight=None): method get_config (line 804) | def get_config(self): method from_config (line 808) | def from_config(cls, config): FILE: keras/src/trainers/compile_utils_test.py class TestCompileMetrics (line 16) | class TestCompileMetrics(testing.TestCase): method test_single_output_case (line 17) | def test_single_output_case(self): method test_list_output_case (line 53) | def test_list_output_case(self): method test_dict_output_case (line 119) | def test_dict_output_case(self): method test_name_conversions (line 205) | def test_name_conversions(self): method test_custom_metric_function (line 221) | def test_custom_metric_function(self): method test_dict_outputs_uses_output_names (line 237) | def test_dict_outputs_uses_output_names(self): method test_dict_outputs_output_names_ordering (line 286) | def test_dict_outputs_output_names_ordering(self): method test_dict_outputs_outputs_ordering (line 341) | def test_dict_outputs_outputs_ordering(self): method test_dict_outputs_ignore_mismatched_output_names (line 391) | def test_dict_outputs_ignore_mismatched_output_names(self): method test_deeply_nested_outputs_and_metrics (line 441) | def test_deeply_nested_outputs_and_metrics(self): class TestCompileLoss (line 517) | class TestCompileLoss(testing.TestCase): method test_single_output_case (line 518) | def test_single_output_case(self): method test_single_output_case_with_crossentropy_loss (line 533) | def test_single_output_case_with_crossentropy_loss(self): method test_list_output_case (line 548) | def test_list_output_case(self, broadcast): method test_dict_output_case (line 576) | def test_dict_output_case(self, broadcast): method test_list_loss_dict_data (line 613) | def test_list_loss_dict_data(self): method test_struct_loss (line 629) | def test_struct_loss(self): method test_struct_loss_valid_weights (line 656) | def test_struct_loss_valid_weights(self): method test_struct_loss_invalid_weights (line 683) | def test_struct_loss_invalid_weights(self): method test_struct_loss_indice_path (line 713) | def test_struct_loss_indice_path(self): method test_struct_loss_namedtuple (line 740) | def test_struct_loss_namedtuple(self): method test_struct_loss_invalid_path (line 768) | def test_struct_loss_invalid_path(self): method test_different_container_types (line 796) | def test_different_container_types(self): method test_structure_mismatch (line 811) | def test_structure_mismatch(self): method test_y_true_partial_y_pred_span (line 836) | def test_y_true_partial_y_pred_span(self, *loss_conf): FILE: keras/src/trainers/data_adapters/__init__.py function get_data_adapter (line 21) | def get_data_adapter( function raise_unsupported_arg (line 166) | def raise_unsupported_arg(arg_name, arg_description, input_type): function is_tf_dataset (line 174) | def is_tf_dataset(x): function is_torch_dataloader (line 186) | def is_torch_dataloader(x): function is_grain_dataset (line 196) | def is_grain_dataset(x): FILE: keras/src/trainers/data_adapters/array_data_adapter.py class ArrayDataAdapter (line 12) | class ArrayDataAdapter(DataAdapter): method __init__ (line 15) | def __init__( method get_numpy_iterator (line 95) | def get_numpy_iterator(self): method get_tf_dataset (line 107) | def get_tf_dataset(self): method get_jax_iterator (line 246) | def get_jax_iterator(self): method get_torch_dataloader (line 258) | def get_torch_dataloader(self): method _get_iterator (line 326) | def _get_iterator(self, slice_and_convert_fn, inputs): method num_batches (line 349) | def num_batches(self): method batch_size (line 353) | def batch_size(self): method has_partial_batch (line 357) | def has_partial_batch(self): method partial_batch_size (line 361) | def partial_batch_size(self): function can_convert_arrays (line 365) | def can_convert_arrays(arrays): FILE: keras/src/trainers/data_adapters/array_data_adapter_test.py class TestArrayDataAdapter (line 16) | class TestArrayDataAdapter(testing.TestCase): method make_array (line 17) | def make_array(self, array_type, shape, dtype): method test_basic_flow (line 58) | def test_basic_flow(self, array_type, array_dtype, shuffle): method test_multi_inputs_and_outputs (line 141) | def test_multi_inputs_and_outputs(self): method test_class_weights (line 219) | def test_class_weights(self, target_encoding): method test_errors (line 247) | def test_errors(self): FILE: keras/src/trainers/data_adapters/array_slicing.py class Sliceable (line 25) | class Sliceable: method __init__ (line 39) | def __init__(self, array): method __getitem__ (line 42) | def __getitem__(self, indices): method cast (line 54) | def cast(cls, x, dtype): method convert_to_numpy (line 66) | def convert_to_numpy(cls, x): method convert_to_tf_dataset_compatible (line 78) | def convert_to_tf_dataset_compatible(cls, x): method convert_to_jax_compatible (line 92) | def convert_to_jax_compatible(cls, x): method convert_to_torch_compatible (line 106) | def convert_to_torch_compatible(cls, x): class NumpySliceable (line 121) | class NumpySliceable(Sliceable): class TensorflowSliceable (line 125) | class TensorflowSliceable(Sliceable): method __getitem__ (line 126) | def __getitem__(self, indices): method cast (line 135) | def cast(cls, x, dtype): method convert_to_numpy (line 141) | def convert_to_numpy(cls, x): class TensorflowRaggedSliceable (line 147) | class TensorflowRaggedSliceable(TensorflowSliceable): method convert_to_jax_compatible (line 149) | def convert_to_jax_compatible(cls, x): method convert_to_torch_compatible (line 153) | def convert_to_torch_compatible(cls, x): class TensorflowSparseSliceable (line 157) | class TensorflowSparseSliceable(TensorflowSliceable): method __init__ (line 158) | def __init__(self, array): method shape (line 162) | def shape(self): method __getitem__ (line 165) | def __getitem__(self, indices): method convert_to_tf_dataset_compatible (line 169) | def convert_to_tf_dataset_compatible(cls, x): method convert_to_jax_compatible (line 173) | def convert_to_jax_compatible(cls, x): method convert_to_torch_compatible (line 177) | def convert_to_torch_compatible(cls, x): class JaxSparseSliceable (line 183) | class JaxSparseSliceable(Sliceable): method __getitem__ (line 184) | def __getitem__(self, indices): method convert_to_numpy (line 188) | def convert_to_numpy(cls, x): method convert_to_tf_dataset_compatible (line 194) | def convert_to_tf_dataset_compatible(cls, array): method convert_to_torch_compatible (line 200) | def convert_to_torch_compatible(cls, x): class TorchSliceable (line 204) | class TorchSliceable(Sliceable): method cast (line 206) | def cast(cls, x, dtype): method convert_to_numpy (line 212) | def convert_to_numpy(cls, x): class PandasSliceable (line 218) | class PandasSliceable(Sliceable): method __getitem__ (line 219) | def __getitem__(self, indices): method convert_to_numpy (line 223) | def convert_to_numpy(cls, x): method convert_to_tf_dataset_compatible (line 227) | def convert_to_tf_dataset_compatible(cls, x): method convert_to_jax_compatible (line 231) | def convert_to_jax_compatible(cls, x): method convert_to_torch_compatible (line 235) | def convert_to_torch_compatible(cls, x): class PandasDataFrameSliceable (line 239) | class PandasDataFrameSliceable(PandasSliceable): class PandasSeriesSliceable (line 243) | class PandasSeriesSliceable(PandasSliceable): method convert_to_numpy (line 245) | def convert_to_numpy(cls, x): class ScipySparseSliceable (line 249) | class ScipySparseSliceable(Sliceable): method __init__ (line 250) | def __init__(self, array): method convert_to_numpy (line 256) | def convert_to_numpy(cls, x): method convert_to_tf_dataset_compatible (line 260) | def convert_to_tf_dataset_compatible(cls, x): method convert_to_jax_compatible (line 266) | def convert_to_jax_compatible(cls, x): method convert_to_torch_compatible (line 270) | def convert_to_torch_compatible(cls, x): function to_tensorflow_sparse_wrapper (line 293) | def to_tensorflow_sparse_wrapper(sparse): function slice_tensorflow_sparse_wrapper (line 308) | def slice_tensorflow_sparse_wrapper(sparse_wrapper, indices): function can_slice_array (line 338) | def can_slice_array(x): function convert_to_sliceable (line 350) | def convert_to_sliceable(arrays, target_backend=None): function train_validation_split (line 461) | def train_validation_split(arrays, validation_split): FILE: keras/src/trainers/data_adapters/data_adapter.py class DataAdapter (line 1) | class DataAdapter: method get_numpy_iterator (line 9) | def get_numpy_iterator(self): method get_tf_dataset (line 18) | def get_tf_dataset(self): method get_jax_iterator (line 32) | def get_jax_iterator(self): method get_torch_dataloader (line 41) | def get_torch_dataloader(self): method num_batches (line 50) | def num_batches(self): method batch_size (line 66) | def batch_size(self): method has_partial_batch (line 79) | def has_partial_batch(self): method partial_batch_size (line 84) | def partial_batch_size(self): method on_epoch_begin (line 91) | def on_epoch_begin(self): method on_epoch_end (line 95) | def on_epoch_end(self): FILE: keras/src/trainers/data_adapters/data_adapter_utils.py function unpack_x_y_sample_weight (line 12) | def unpack_x_y_sample_weight(data): function pack_x_y_sample_weight (line 55) | def pack_x_y_sample_weight(x, y=None, sample_weight=None): function list_to_tuple (line 96) | def list_to_tuple(maybe_list): function check_data_cardinality (line 103) | def check_data_cardinality(data): function class_weight_to_sample_weights (line 120) | def class_weight_to_sample_weights(y, class_weight): function get_keras_tensor_spec (line 138) | def get_keras_tensor_spec(batches): function convert_to_tf_tensor_spec (line 196) | def convert_to_tf_tensor_spec(keras_tensor, batch_axis_to_none=True): function get_tensor_spec (line 229) | def get_tensor_spec(batches): function get_jax_iterator (line 246) | def get_jax_iterator(iterable): function get_numpy_iterator (line 266) | def get_numpy_iterator(iterable): function get_torch_dataloader (line 282) | def get_torch_dataloader(iterable): function is_tensorflow_tensor (line 302) | def is_tensorflow_tensor(value): function is_tensorflow_ragged (line 314) | def is_tensorflow_ragged(value): function is_tensorflow_sparse (line 323) | def is_tensorflow_sparse(value): function is_jax_array (line 332) | def is_jax_array(value): function is_jax_sparse (line 340) | def is_jax_sparse(value): function is_torch_tensor (line 348) | def is_torch_tensor(value): function is_scipy_sparse (line 358) | def is_scipy_sparse(x): function scipy_sparse_to_tf_sparse (line 364) | def scipy_sparse_to_tf_sparse(x): function scipy_sparse_to_jax_sparse (line 374) | def scipy_sparse_to_jax_sparse(x): function tf_sparse_to_jax_sparse (line 382) | def tf_sparse_to_jax_sparse(x): function jax_sparse_to_tf_sparse (line 392) | def jax_sparse_to_tf_sparse(x): FILE: keras/src/trainers/data_adapters/data_adapter_utils_test.py class TestClassWeightToSampleWeights (line 12) | class TestClassWeightToSampleWeights(testing.TestCase): method test_class_weight_to_sample_weights (line 51) | def test_class_weight_to_sample_weights(self, y, class_weight, expected): method test_class_weight_to_sample_weights_torch_specific (line 57) | def test_class_weight_to_sample_weights_torch_specific(self): method test_class_weight_to_sample_weights_jax_specific (line 74) | def test_class_weight_to_sample_weights_jax_specific(self): method test_class_weight_to_sample_weights_tf_specific (line 93) | def test_class_weight_to_sample_weights_tf_specific(self): FILE: keras/src/trainers/data_adapters/generator_data_adapter.py class GeneratorDataAdapter (line 8) | class GeneratorDataAdapter(DataAdapter): method __init__ (line 11) | def __init__(self, generator): method get_numpy_iterator (line 25) | def get_numpy_iterator(self): method get_jax_iterator (line 28) | def get_jax_iterator(self): method get_tf_dataset (line 31) | def get_tf_dataset(self): method get_torch_dataloader (line 71) | def get_torch_dataloader(self): method num_batches (line 75) | def num_batches(self): method batch_size (line 79) | def batch_size(self): function peek_and_restore (line 83) | def peek_and_restore(generator): FILE: keras/src/trainers/data_adapters/generator_data_adapter_test.py function example_generator (line 19) | def example_generator(x, y, sample_weight=None, batch_size=32): class GeneratorDataAdapterTest (line 34) | class GeneratorDataAdapterTest(testing.TestCase): method test_basic_flow (line 44) | def test_basic_flow(self, use_sample_weight, generator_type): method test_with_different_shapes (line 107) | def test_with_different_shapes(self): method test_with_unexpected_shapes (line 143) | def test_with_unexpected_shapes(self): method test_sparse_tensors (line 169) | def test_sparse_tensors(self, generator_type): method test_ragged_tensors (line 205) | def test_ragged_tensors(self): FILE: keras/src/trainers/data_adapters/grain_dataset_adapter.py class GrainDatasetAdapter (line 12) | class GrainDatasetAdapter(DataAdapter): method __init__ (line 17) | def __init__(self, dataset): method _get_dataset_info (line 41) | def _get_dataset_info(self, dataset): method get_numpy_iterator (line 59) | def get_numpy_iterator(self): method get_jax_iterator (line 108) | def get_jax_iterator(self): method get_tf_dataset (line 140) | def get_tf_dataset(self): method get_torch_dataloader (line 188) | def get_torch_dataloader(self): method num_batches (line 205) | def num_batches(self): method batch_size (line 209) | def batch_size(self): method has_partial_batch (line 213) | def has_partial_batch(self): method partial_batch_size (line 217) | def partial_batch_size(self): FILE: keras/src/trainers/data_adapters/grain_dataset_adapter_test.py class Range2DSource (line 13) | class Range2DSource(grain.sources.RandomAccessDataSource): method __init__ (line 14) | def __init__(self, start, stop): method __getitem__ (line 18) | def __getitem__(self, idx): method __len__ (line 21) | def __len__(self): class GrainDatasetAdapterTest (line 25) | class GrainDatasetAdapterTest(testing.TestCase): method _get_dataset (line 26) | def _get_dataset(self, dataset_type, worker_count=0, num_threads=0): method test_basic_flow (line 70) | def test_basic_flow(self, dataset_type): method test_nested_data (line 109) | def test_nested_data(self, data_type): method test_multiple_calling_on_iterators (line 174) | def test_multiple_calling_on_iterators(self): method test_num_batches (line 188) | def test_num_batches(self): method test_invalid_dataset_type (line 204) | def test_invalid_dataset_type(self): FILE: keras/src/trainers/data_adapters/py_dataset_adapter.py class PyDataset (line 18) | class PyDataset: method __init__ (line 93) | def __init__(self, workers=1, use_multiprocessing=False, max_queue_siz... method _warn_if_super_not_called (line 98) | def _warn_if_super_not_called(self): method workers (line 120) | def workers(self): method workers (line 125) | def workers(self, value): method use_multiprocessing (line 129) | def use_multiprocessing(self): method use_multiprocessing (line 134) | def use_multiprocessing(self, value): method max_queue_size (line 138) | def max_queue_size(self): method max_queue_size (line 143) | def max_queue_size(self, value): method __getitem__ (line 146) | def __getitem__(self, index): method __iter__ (line 158) | def __iter__(self): method num_batches (line 174) | def num_batches(self): method on_epoch_begin (line 189) | def on_epoch_begin(self): method on_epoch_end (line 193) | def on_epoch_end(self): class PyDatasetAdapter (line 198) | class PyDatasetAdapter(DataAdapter): method __init__ (line 201) | def __init__( method _standardize_batch (line 225) | def _standardize_batch(self, batch): method _infinite_generator (line 253) | def _infinite_generator(self): method _finite_generator (line 257) | def _finite_generator(self): method _infinite_enqueuer_generator (line 266) | def _infinite_enqueuer_generator(self): method _finite_enqueuer_generator (line 271) | def _finite_enqueuer_generator(self): method _get_iterator (line 280) | def _get_iterator(self): method get_numpy_iterator (line 292) | def get_numpy_iterator(self): method get_jax_iterator (line 295) | def get_jax_iterator(self): method get_tf_dataset (line 298) | def get_tf_dataset(self): method get_torch_dataloader (line 330) | def get_torch_dataloader(self): method on_epoch_begin (line 333) | def on_epoch_begin(self): method on_epoch_end (line 344) | def on_epoch_end(self): method num_batches (line 351) | def num_batches(self): method batch_size (line 355) | def batch_size(self): function get_pool_class (line 373) | def get_pool_class(use_multiprocessing): function get_worker_id_queue (line 380) | def get_worker_id_queue(): function get_index (line 388) | def get_index(uid, i): class PyDatasetEnqueuer (line 407) | class PyDatasetEnqueuer: method __init__ (line 428) | def __init__( method is_running (line 467) | def is_running(self): method start (line 476) | def start(self): method stop (line 491) | def stop(self, drain_queue_and_join=True): method _send_py_dataset (line 528) | def _send_py_dataset(self): method __del__ (line 533) | def __del__(self): method _run (line 536) | def _run(self): method _get_executor_init (line 540) | def _get_executor_init(self, workers): method get (line 551) | def get(self): class OrderedEnqueuer (line 566) | class OrderedEnqueuer(PyDatasetEnqueuer): method __init__ (line 575) | def __init__( method _get_executor_init (line 592) | def _get_executor_init(self, workers): method _run (line 613) | def _run(self): method get (line 642) | def get(self): function init_pool_generator (line 684) | def init_pool_generator(gens, random_seed=None, id_queue=None): FILE: keras/src/trainers/data_adapters/py_dataset_adapter_test.py class ExamplePyDataset (line 18) | class ExamplePyDataset(py_dataset_adapter.PyDataset): method __init__ (line 19) | def __init__( method num_batches (line 37) | def num_batches(self): method __getitem__ (line 42) | def __getitem__(self, idx): class DictPyDataset (line 60) | class DictPyDataset(py_dataset_adapter.PyDataset): method __init__ (line 61) | def __init__(self, inputs, batch_size=32, **kwargs): method num_batches (line 67) | def num_batches(self): method __getitem__ (line 70) | def __getitem__(self, idx): class ExceptionPyDataset (line 82) | class ExceptionPyDataset(py_dataset_adapter.PyDataset): method num_batches (line 84) | def num_batches(self): method __getitem__ (line 87) | def __getitem__(self, index): class PyDatasetAdapterTest (line 100) | class PyDatasetAdapterTest(testing.TestCase): method test_basic_flow (line 139) | def test_basic_flow( method test_class_weight (line 225) | def test_class_weight(self): method test_speedup (line 256) | def test_speedup(self): method test_dict_inputs (line 297) | def test_dict_inputs(self): method test_with_different_shapes (line 324) | def test_with_different_shapes(self): method test_exception_reported (line 390) | def test_exception_reported( method test_iterate_finite (line 428) | def test_iterate_finite(self): method test_iterate_infinite_with_none_num_batches (line 437) | def test_iterate_infinite_with_none_num_batches(self): method test_iterate_infinite_with_no_len (line 448) | def test_iterate_infinite_with_no_len(self): FILE: keras/src/trainers/data_adapters/tf_dataset_adapter.py class TFDatasetAdapter (line 6) | class TFDatasetAdapter(DataAdapter): method __init__ (line 9) | def __init__(self, dataset, class_weight=None, distribution=None): method get_numpy_iterator (line 37) | def get_numpy_iterator(self): method get_jax_iterator (line 45) | def get_jax_iterator(self): method get_tf_dataset (line 59) | def get_tf_dataset(self): method get_torch_dataloader (line 62) | def get_torch_dataloader(self): method num_batches (line 66) | def num_batches(self): method batch_size (line 80) | def batch_size(self): method has_partial_batch (line 85) | def has_partial_batch(self): method partial_batch_size (line 89) | def partial_batch_size(self): function make_class_weight_map_fn (line 93) | def make_class_weight_map_fn(class_weight): FILE: keras/src/trainers/data_adapters/tf_dataset_adapter_test.py class TestTFDatasetAdapter (line 16) | class TestTFDatasetAdapter(testing.TestCase): method test_basic_flow (line 17) | def test_basic_flow(self): method _test_class_weights (line 55) | def _test_class_weights(self, target_encoding="int"): method test_class_weights_int_targets (line 81) | def test_class_weights_int_targets(self): method test_class_weights_categorical_targets (line 84) | def test_class_weights_categorical_targets(self): method test_num_batches (line 87) | def test_num_batches(self): method test_invalid_dataset_type (line 109) | def test_invalid_dataset_type(self): method test_class_weight_and_sample_weight_together (line 116) | def test_class_weight_and_sample_weight_together(self): method test_different_y_shapes_with_class_weight (line 131) | def test_different_y_shapes_with_class_weight(self): method test_nested_y_with_class_weight (line 157) | def test_nested_y_with_class_weight(self): method test_class_weights_map_fn_with_sample_weight (line 178) | def test_class_weights_map_fn_with_sample_weight(self): method test_class_weights_map_fn_nested_y (line 194) | def test_class_weights_map_fn_nested_y(self): method test_distribute_dataset (line 210) | def test_distribute_dataset(self): method test_tf_sparse_tensors (line 264) | def test_tf_sparse_tensors(self): method test_distributed_datasets_from_function_adapter_properties (line 292) | def test_distributed_datasets_from_function_adapter_properties(self): method test_distributed_datasets_from_function_model_integration (line 336) | def test_distributed_datasets_from_function_model_integration(self): FILE: keras/src/trainers/data_adapters/torch_data_loader_adapter.py class TorchDataLoaderAdapter (line 10) | class TorchDataLoaderAdapter(DataAdapter): method __init__ (line 13) | def __init__(self, dataloader): method get_numpy_iterator (line 34) | def get_numpy_iterator(self): method get_jax_iterator (line 43) | def get_jax_iterator(self): method get_tf_dataset (line 47) | def get_tf_dataset(self): method get_torch_dataloader (line 65) | def get_torch_dataloader(self): method num_batches (line 69) | def num_batches(self): method batch_size (line 73) | def batch_size(self): method has_partial_batch (line 77) | def has_partial_batch(self): method partial_batch_size (line 84) | def partial_batch_size(self): FILE: keras/src/trainers/data_adapters/torch_data_loader_adapter_test.py class TestTorchDataLoaderAdapter (line 16) | class TestTorchDataLoaderAdapter(testing.TestCase): method test_basic_dataloader (line 17) | def test_basic_dataloader(self): method test_dataloader_iterable_dataset (line 59) | def test_dataloader_iterable_dataset(self, batch_size, implements_len): method test_with_different_shapes (line 135) | def test_with_different_shapes(self): FILE: keras/src/trainers/epoch_iterator.py class EpochIterator (line 49) | class EpochIterator: method __init__ (line 50) | def __init__( method _get_iterator (line 85) | def _get_iterator(self): method _interrupted_warning (line 88) | def _interrupted_warning(self): method reset (line 98) | def reset(self): method _enumerate_iterator (line 105) | def _enumerate_iterator(self): method __iter__ (line 136) | def __iter__(self): method __next__ (line 140) | def __next__(self): method enumerate_epoch (line 152) | def enumerate_epoch(self): method catch_stop_iteration (line 157) | def catch_stop_iteration(self): method num_batches (line 169) | def num_batches(self): FILE: keras/src/trainers/epoch_iterator_test.py class TestEpochIterator (line 12) | class TestEpochIterator(testing.TestCase): method test_basic_flow (line 16) | def test_basic_flow(self, call_type): method test_insufficient_data (line 42) | def test_insufficient_data(self): method test_unsupported_y_arg_tfdata (line 62) | def test_unsupported_y_arg_tfdata(self): method test_unsupported_sample_weights_arg_tfdata (line 68) | def test_unsupported_sample_weights_arg_tfdata(self): method test_torch_dataloader (line 79) | def test_torch_dataloader(self): method test_unsupported_y_arg_torch_dataloader (line 108) | def test_unsupported_y_arg_torch_dataloader(self): method test_unsupported_sample_weights_arg_torch_dataloader (line 139) | def test_unsupported_sample_weights_arg_torch_dataloader(self): method test_python_generator_input (line 167) | def test_python_generator_input(self): method test_unrecognized_data_type (line 179) | def test_unrecognized_data_type(self): method test_epoch_callbacks (line 190) | def test_epoch_callbacks(self, infinite): FILE: keras/src/trainers/trainer.py class Trainer (line 19) | class Trainer: method __init__ (line 20) | def __init__(self): method compile (line 40) | def compile( method jit_compile (line 225) | def jit_compile(self): method jit_compile (line 232) | def jit_compile(self, value): method _resolve_auto_jit_compile (line 242) | def _resolve_auto_jit_compile(self): method run_eagerly (line 264) | def run_eagerly(self): method run_eagerly (line 268) | def run_eagerly(self, value): method metrics (line 272) | def metrics(self): method metrics_names (line 293) | def metrics_names(self): method reset_metrics (line 296) | def reset_metrics(self): method _get_own_metrics (line 300) | def _get_own_metrics(self): method compute_loss (line 311) | def compute_loss( method _compute_loss (line 390) | def _compute_loss( method _aggregate_additional_loss (line 411) | def _aggregate_additional_loss(self, loss): method stateless_compute_loss (line 425) | def stateless_compute_loss( method compute_metrics (line 469) | def compute_metrics(self, x, y, y_pred, sample_weight=None): method get_metrics_result (line 515) | def get_metrics_result(self): method fit (line 534) | def fit( method evaluate (line 736) | def evaluate( method predict (line 831) | def predict( method train_on_batch (line 889) | def train_on_batch( method test_on_batch (line 927) | def test_on_batch( method predict_on_batch (line 956) | def predict_on_batch(self, x): method get_compile_config (line 967) | def get_compile_config(self): method compile_from_config (line 980) | def compile_from_config(self, config): method _should_eval (line 1008) | def _should_eval(self, epoch, validation_freq): method _get_metrics_result_or_logs (line 1021) | def _get_metrics_result_or_logs(self, logs): method _flatten_metrics_in_order (line 1052) | def _flatten_metrics_in_order(self, logs): method _assert_compile_called (line 1073) | def _assert_compile_called(self, method_name=None): method _symbolic_build (line 1082) | def _symbolic_build(self, iterator=None, data_batch=None): function model_supports_jit (line 1158) | def model_supports_jit(model): FILE: keras/src/trainers/trainer_test.py class ExampleModel (line 47) | class ExampleModel(Trainer, layers.Dense): method __init__ (line 48) | def __init__(self, units): class CustomTrainTestStepModel (line 58) | class CustomTrainTestStepModel(ExampleModel): method train_step (line 59) | def train_step(self, data): method test_step (line 64) | def test_step(self, data): class JaxCustomTrainTestStepModel (line 70) | class JaxCustomTrainTestStepModel(ExampleModel): method train_step (line 71) | def train_step(self, state, data): method test_step (line 76) | def test_step(self, state, data): class StructModel (line 82) | class StructModel(Trainer, layers.Layer): method __init__ (line 83) | def __init__(self, units): method call (line 97) | def call(self, x): class ListInputModel (line 104) | class ListInputModel(Trainer, layers.Layer): method __init__ (line 105) | def __init__(self, units): method call (line 119) | def call(self, x): class ListOutputModel (line 125) | class ListOutputModel(Trainer, layers.Layer): method __init__ (line 126) | def __init__(self, units): method call (line 140) | def call(self, x): class TrainingTestingLayer (line 144) | class TrainingTestingLayer(Trainer, layers.Layer): method __init__ (line 145) | def __init__(self, **kwargs): method call (line 149) | def call(self, x, training=False): class TestPyDataset (line 155) | class TestPyDataset(py_dataset_adapter.PyDataset): method __init__ (line 156) | def __init__(self, infinite=False, **kwargs): method num_batches (line 161) | def num_batches(self): method __getitem__ (line 164) | def __getitem__(self, idx): function create_dataset (line 174) | def create_dataset(dataset_type, dataset_kwargs): function sparse_generator (line 260) | def sparse_generator(generator_type): class EpochAgnosticMeanSquaredError (line 289) | class EpochAgnosticMeanSquaredError(metrics.MeanSquaredError): method __init__ (line 290) | def __init__(self): method reset_state (line 294) | def reset_state(self): class StepObserver (line 299) | class StepObserver(Callback): method __init__ (line 300) | def __init__(self): method on_epoch_begin (line 308) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 311) | def on_epoch_end(self, epoch, logs=None): method on_batch_begin (line 314) | def on_batch_begin(self, batch, logs=None): method on_batch_end (line 317) | def on_batch_end(self, batch, logs=None): class StepCount (line 322) | class StepCount(Callback): method __init__ (line 323) | def __init__(self, steps_per_execution=1): method on_epoch_begin (line 331) | def on_epoch_begin(self, epoch, logs=None): method on_epoch_end (line 336) | def on_epoch_end(self, epoch, logs=None): method on_batch_begin (line 339) | def on_batch_begin(self, batch, logs=None): method on_batch_end (line 344) | def on_batch_end(self, batch, logs=None): class TestTrainer (line 350) | class TestTrainer(testing.TestCase): method test_metric_tracking (line 352) | def test_metric_tracking(self): method test_nested_trainer_metrics (line 407) | def test_nested_trainer_metrics(self): method test_nested_trainer_metrics_without_compile (line 432) | def test_nested_trainer_metrics_without_compile(self): method test_multiple_compiles (line 449) | def test_multiple_compiles(self): method test_compile_eager_vs_jit_torch (line 485) | def test_compile_eager_vs_jit_torch(self): method test_fit_flow (line 504) | def test_fit_flow(self, run_eagerly, jit_compile, use_steps_per_epoch): method test_fit_with_data_adapter (line 662) | def test_fit_with_data_adapter( method test_fit_with_val_split (line 697) | def test_fit_with_val_split( method test_fit_with_custom_train_step (line 743) | def test_fit_with_custom_train_step(self): method test_fit_sparse (line 772) | def test_fit_sparse(self, generator_type, mode): method test_evaluate_flow (line 809) | def test_evaluate_flow(self, run_eagerly, jit_compile): method test_evaluate_with_custom_test_step (line 832) | def test_evaluate_with_custom_test_step(self, return_dict): method test_evaluate_sparse (line 864) | def test_evaluate_sparse(self, generator_type, mode): method test_predict_flow (line 883) | def test_predict_flow(self, run_eagerly, jit_compile): method test_predict_flow_struct (line 901) | def test_predict_flow_struct(self, run_eagerly, jit_compile): method test_predict_sparse (line 927) | def test_predict_sparse(self, generator_type, mode): method test_fit_eval_flow_for_jax_model_weights (line 947) | def test_fit_eval_flow_for_jax_model_weights(self): method test_steps_per_execution_steps_count (line 1012) | def test_steps_per_execution_steps_count(self, steps_per_execution, mo... method test_steps_per_execution_unrolled_steps_steps_count (line 1078) | def test_steps_per_execution_unrolled_steps_steps_count( method test_predict_preserve_order (line 1142) | def test_predict_preserve_order(self, steps_per_execution, mode): method test_predict_generator (line 1192) | def test_predict_generator(self, steps_per_execution, mode): method test_steps_per_execution_steps_count_unknown_dataset_size (line 1241) | def test_steps_per_execution_steps_count_unknown_dataset_size( method test_steps_per_execution_steps_per_epoch (line 1324) | def test_steps_per_execution_steps_per_epoch( method test_steps_per_epoch (line 1445) | def test_steps_per_epoch(self, steps_per_epoch_test, mode): method test_max_epochs_and_steps (line 1544) | def test_max_epochs_and_steps(self): method test_steps_per_execution_steps_per_epoch_unknown_data_size (line 1600) | def test_steps_per_execution_steps_per_epoch_unknown_data_size( method test_steps_per_execution_steps_count_without_training (line 1719) | def test_steps_per_execution_steps_count_without_training(self): method test_fit_with_different_batch_size_same_loss (line 1749) | def test_fit_with_different_batch_size_same_loss(self): method test_evaluate_with_different_batch_size_same_loss (line 1759) | def test_evaluate_with_different_batch_size_same_loss(self): method test_adds_loss_scaling_optimizer (line 1769) | def test_adds_loss_scaling_optimizer(self): method test_loss_scaling_prevents_underflow (line 1796) | def test_loss_scaling_prevents_underflow(self): method test_training_arg (line 1839) | def test_training_arg(self): method test_on_batch_methods (line 1859) | def test_on_batch_methods(self, run_eagerly, jit_compile): method test_on_batch_methods_without_training (line 1930) | def test_on_batch_methods_without_training(self, run_eagerly, jit_comp... method test_nested_input_predict (line 1960) | def test_nested_input_predict(self): method test_for_eval_epoch_iterator (line 1983) | def test_for_eval_epoch_iterator(self): method test_callback_methods_keys (line 2026) | def test_callback_methods_keys(self): method test_internal_only_loss (line 2121) | def test_internal_only_loss(self): method get_layer (line 2139) | def get_layer(self): method get_model (line 2146) | def get_model(self): method get_functional (line 2153) | def get_functional(self): method test_trainer_with_raggeds (line 2185) | def test_trainer_with_raggeds(self, model_class): method test_predict_dropout (line 2212) | def test_predict_dropout(self): method test_recompile (line 2227) | def test_recompile(self): method test_evaluate_return_list_respect_metrics_order (line 2256) | def test_evaluate_return_list_respect_metrics_order(self): method test_nested_inputs (line 2281) | def test_nested_inputs(self): method test_validation_data_infinite_generator (line 2308) | def test_validation_data_infinite_generator(self): method test_stop_loop (line 2352) | def test_stop_loop(self, method, method_gerund, on_end_name): method test_constraints_are_applied (line 2383) | def test_constraints_are_applied(self): method test_rng_updated_during_predict (line 2396) | def test_rng_updated_during_predict(self): method test_callbacks_can_update_state_at_batch_boundary (line 2418) | def test_callbacks_can_update_state_at_batch_boundary(self): method test_metric_update_in_compute_loss (line 2484) | def test_metric_update_in_compute_loss(self): method test_fwd_pass_loss_presence_in_compute_loss (line 2522) | def test_fwd_pass_loss_presence_in_compute_loss(self): method test_evaluate_with_custom_compute_loss (line 2558) | def test_evaluate_with_custom_compute_loss(self): method test_compute_loss_no_training_backwards_compatibility (line 2594) | def test_compute_loss_no_training_backwards_compatibility(self): method test_loss_weights (line 2627) | def test_loss_weights(self): method test_partial_loss_partial_label (line 2717) | def test_partial_loss_partial_label(self): method test_symbolic_build (line 2733) | def test_symbolic_build(self): method test_jit_compile_with_tf_determinism (line 2797) | def test_jit_compile_with_tf_determinism(self): method test_retracing (line 2818) | def test_retracing(self): method test_retracing_predict (line 2859) | def test_retracing_predict(self): class JAXTrainerCorrectnessTest (line 2887) | class JAXTrainerCorrectnessTest(test_case.TestCase, parameterized.TestCa... method test_jit_fit_with_out_shardings_logic (line 2893) | def test_jit_fit_with_out_shardings_logic(self, distributed): FILE: keras/src/tree/dmtree_impl.py class TypeErrorRemapping (line 33) | class TypeErrorRemapping: method __enter__ (line 34) | def __enter__(self): method __exit__ (line 37) | def __exit__(self, exc_type, exc_value, traceback): function register_tree_node (line 43) | def register_tree_node( function register_tree_node_class (line 55) | def register_tree_node_class(cls): function sorted_keys_and_values (line 76) | def sorted_keys_and_values(d): function is_nested (line 90) | def is_nested(structure): function traverse (line 94) | def traverse(func, structure, top_down=True): function flatten (line 142) | def flatten(structure): function _recursive_flatten_with_path (line 162) | def _recursive_flatten_with_path(path, structure, flattened): function flatten_with_path (line 186) | def flatten_with_path(structure): function map_structure (line 197) | def map_structure(func, *structures, none_is_leaf=True): function map_structure_up_to (line 234) | def map_structure_up_to(shallow_structure, func, *structures): function assert_same_structure (line 244) | def assert_same_structure(a, b): function assert_same_paths (line 327) | def assert_same_paths(a, b): function pack_sequence_as (line 342) | def pack_sequence_as(structure, flat_sequence): function lists_to_tuples (line 386) | def lists_to_tuples(structure): function map_shape_structure (line 393) | def map_shape_structure(func, structure): FILE: keras/src/tree/optree_impl.py function register_tree_node_class (line 7) | def register_tree_node_class(cls): function sorted_keys_and_values (line 24) | def sorted_keys_and_values(d): function is_nested (line 41) | def is_nested(structure): function traverse (line 47) | def traverse(func, structure, top_down=True): function flatten (line 79) | def flatten(structure): function flatten_with_path (line 89) | def flatten_with_path(structure): function map_structure (line 96) | def map_structure(func, *structures, none_is_leaf=True): function map_structure_up_to (line 116) | def map_structure_up_to(shallow_structure, func, *structures): function assert_same_structure (line 136) | def assert_same_structure(a, b): function assert_same_paths (line 149) | def assert_same_paths(a, b): function pack_sequence_as (line 164) | def pack_sequence_as(structure, flat_sequence): function lists_to_tuples (line 171) | def lists_to_tuples(structure): function map_shape_structure (line 178) | def map_shape_structure(func, structure): FILE: keras/src/tree/torchtree_impl.py function register_tree_node_class (line 6) | def register_tree_node_class(cls): function _tree_is_leaf (line 17) | def _tree_is_leaf(tree, is_leaf=None): function _dict_to_ordered_dict (line 23) | def _dict_to_ordered_dict(structure): function is_nested (line 57) | def is_nested(structure): function traverse (line 61) | def traverse(func, structure, top_down=True): function flatten (line 91) | def flatten(structure): function flatten_with_path (line 99) | def flatten_with_path(structure): function map_structure (line 126) | def map_structure(func, *structures, none_is_leaf=True): function map_structure_up_to (line 149) | def map_structure_up_to(shallow_structure, func, *structures): function assert_same_structure (line 167) | def assert_same_structure(a, b): function assert_same_paths (line 176) | def assert_same_paths(a, b): function pack_sequence_as (line 191) | def pack_sequence_as(structure, flat_sequence): function lists_to_tuples (line 199) | def lists_to_tuples(structure): function map_shape_structure (line 206) | def map_shape_structure(func, structure): FILE: keras/src/tree/tree_api.py function register_tree_node_class (line 23) | def register_tree_node_class(cls): class MAP_TO_NONE (line 28) | class MAP_TO_NONE: function is_nested (line 35) | def is_nested(structure): function traverse (line 56) | def traverse(func, structure, top_down=True): function flatten (line 109) | def flatten(structure): function flatten_with_path (line 142) | def flatten_with_path(structure): function map_structure (line 168) | def map_structure(func, *structures, none_is_leaf=True): function map_structure_up_to (line 204) | def map_structure_up_to(shallow_structure, func, *structures): function assert_same_structure (line 241) | def assert_same_structure(a, b, check_types=None): function assert_same_paths (line 297) | def assert_same_paths(a, b): function pack_sequence_as (line 326) | def pack_sequence_as(structure, flat_sequence): function lists_to_tuples (line 388) | def lists_to_tuples(structure): function map_shape_structure (line 401) | def map_shape_structure(func, structure): FILE: keras/src/tree/tree_test.py function default_value (line 57) | def default_value(): class Visitor (line 61) | class Visitor: method __init__ (line 62) | def __init__(self, func): method __call__ (line 66) | def __call__(self, x): method visited (line 70) | def visited(self): class TreeTest (line 77) | class TreeTest(testing.TestCase): method setUp (line 78) | def setUp(self): method assertEqualStrict (line 91) | def assertEqualStrict(self, a, b): method is_dmtree (line 107) | def is_dmtree(self, tree_impl): method test_is_nested (line 114) | def test_is_nested(self, t): method test_is_nested_tf_wrappers (line 163) | def test_is_nested_tf_wrappers(self, t): method test_flatten (line 174) | def test_flatten(self, t): method test_flatten_tf_wrappers (line 249) | def test_flatten_tf_wrappers(self, t): method test_flatten_with_path (line 262) | def test_flatten_with_path(self, t): method test_flatten_with_path_tf_wrappers (line 430) | def test_flatten_with_path_tf_wrappers(self, t): method test_pack_sequence_as (line 459) | def test_pack_sequence_as(self, t): method test_pack_sequence_as_tf_wrappers (line 588) | def test_pack_sequence_as_tf_wrappers(self, t): method test_map_structure_with_one_structure (line 614) | def test_map_structure_with_one_structure(self, t): method test_map_structure_with_one_structure_tf_wrappers (line 748) | def test_map_structure_with_one_structure_tf_wrappers(self, t): method test_map_structure_with_multiple_structures (line 777) | def test_map_structure_with_multiple_structures(self, t): method test_map_structure_with_multiple_structures_tf_wrappers (line 1105) | def test_map_structure_with_multiple_structures_tf_wrappers(self, t): method test_map_structure_up_to (line 1161) | def test_map_structure_up_to(self, t): method test_assert_same_structure (line 1187) | def test_assert_same_structure(self, t): method test_assert_same_structure_tf_wrappers (line 1542) | def test_assert_same_structure_tf_wrappers(self, t): method test_assert_same_paths (line 1583) | def test_assert_same_paths(self, t): method test_assert_same_paths_tf_wrappers (line 1779) | def test_assert_same_paths_tf_wrappers(self, t): method test_traverse_top_down (line 1798) | def test_traverse_top_down(self, t): method test_traverse_top_down_tf_wrappers (line 2064) | def test_traverse_top_down_tf_wrappers(self, t): method test_traverse_bottom_up (line 2103) | def test_traverse_bottom_up(self, t): method test_traverse_bottom_up_tf_wrappers (line 2388) | def test_traverse_bottom_up_tf_wrappers(self, t): method test_lists_to_tuples (line 2428) | def test_lists_to_tuples(self, t): method test_map_shape_structure (line 2454) | def test_map_shape_structure(self, t): FILE: keras/src/utils/argument_validation.py function standardize_tuple (line 1) | def standardize_tuple(value, n, name, allow_zero=False): function standardize_padding (line 56) | def standardize_padding(value, allow_causal=False): function validate_string_arg (line 73) | def validate_string_arg( FILE: keras/src/utils/audio_dataset_utils.py function audio_dataset_from_directory (line 12) | def audio_dataset_from_directory( function prepare_dataset (line 257) | def prepare_dataset( function get_training_and_validation_dataset (line 278) | def get_training_and_validation_dataset( function get_dataset (line 340) | def get_dataset( function read_and_decode_audio (line 378) | def read_and_decode_audio( function paths_and_labels_to_dataset (line 399) | def paths_and_labels_to_dataset( FILE: keras/src/utils/audio_dataset_utils_test.py class AudioDatasetFromDirectoryTest (line 10) | class AudioDatasetFromDirectoryTest(testing.TestCase): method _get_audio_samples (line 11) | def _get_audio_samples(self, count=16, different_sequence_lengths=False): method _prepare_directory (line 26) | def _prepare_directory( method test_audio_dataset_from_directory_standalone (line 68) | def test_audio_dataset_from_directory_standalone(self): method test_audio_dataset_from_directory_binary (line 94) | def test_audio_dataset_from_directory_binary(self): method test_static_shape_in_graph (line 132) | def test_static_shape_in_graph(self): method test_sample_count (line 146) | def test_sample_count(self): method test_audio_dataset_from_directory_multiclass (line 156) | def test_audio_dataset_from_directory_multiclass(self): method test_audio_dataset_from_directory_validation_split (line 197) | def test_audio_dataset_from_directory_validation_split(self): method test_audio_dataset_from_directory_manual_labels (line 222) | def test_audio_dataset_from_directory_manual_labels(self): method test_audio_dataset_from_directory_follow_links (line 235) | def test_audio_dataset_from_directory_follow_links(self): method test_audio_dataset_from_directory_no_audio (line 251) | def test_audio_dataset_from_directory_no_audio(self): method test_audio_dataset_from_directory_ragged (line 258) | def test_audio_dataset_from_directory_ragged(self): method test_audio_dataset_from_directory_no_output_sequence_length_no_ragged (line 269) | def test_audio_dataset_from_directory_no_output_sequence_length_no_rag... method test_audio_dataset_from_directory_no_output_sequence_length_same_lengths (line 292) | def test_audio_dataset_from_directory_no_output_sequence_length_same_l... method test_audio_dataset_from_directory_errors (line 310) | def test_audio_dataset_from_directory_errors(self): method test_audio_dataset_from_directory_not_batched (line 423) | def test_audio_dataset_from_directory_not_batched(self): FILE: keras/src/utils/backend_utils.py function in_tf_graph (line 13) | def in_tf_graph(): function convert_tf_tensor (line 24) | def convert_tf_tensor(outputs, dtype=None): class TFGraphScope (line 30) | class TFGraphScope: method __init__ (line 31) | def __init__(self): method __enter__ (line 36) | def __enter__(self): method __exit__ (line 39) | def __exit__(self, *args, **kwargs): function in_grain_data_pipeline (line 45) | def in_grain_data_pipeline(): class DynamicBackend (line 65) | class DynamicBackend: method __init__ (line 81) | def __init__(self, backend=None): method set_backend (line 84) | def set_backend(self, backend): method reset (line 92) | def reset(self): method name (line 96) | def name(self): method __getattr__ (line 99) | def __getattr__(self, name): function set_backend (line 123) | def set_backend(backend): FILE: keras/src/utils/backend_utils_test.py class BackendUtilsTest (line 9) | class BackendUtilsTest(testing.TestCase): method test_dynamic_backend (line 16) | def test_dynamic_backend(self, name): method test_dynamic_backend_invalid_name (line 50) | def test_dynamic_backend_invalid_name(self): FILE: keras/src/utils/code_stats.py function count_loc (line 4) | def count_loc(directory, exclude=("_test",), extensions=(".py",), verbos... FILE: keras/src/utils/code_stats_test.py class TestCountLoc (line 9) | class TestCountLoc(test_case.TestCase): method setUp (line 10) | def setUp(self): method create_file (line 13) | def create_file(self, filename, content): method test_count_loc_valid_python (line 19) | def test_count_loc_valid_python(self): method test_exclude_test_files (line 26) | def test_exclude_test_files(self): method test_other_extensions (line 31) | def test_other_extensions(self): method test_comment_lines (line 36) | def test_comment_lines(self): method test_empty_file (line 43) | def test_empty_file(self): method test_whitespace_only (line 48) | def test_whitespace_only(self): method test_inline_comments_after_code (line 53) | def test_inline_comments_after_code(self): method test_directory_structure (line 59) | def test_directory_structure(self): method test_normal_directory_name (line 68) | def test_normal_directory_name(self): method test_exclude_directory_name (line 75) | def test_exclude_directory_name(self): method test_verbose_output (line 83) | def test_verbose_output(self): method test_multiline_string_same_line (line 93) | def test_multiline_string_same_line(self): method test_multiline_string_ends_on_same_line (line 100) | def test_multiline_string_ends_on_same_line(self): method test_multiline_string_ends_in_middle_of_line (line 106) | def test_multiline_string_ends_in_middle_of_line(self): method test_line_starting_with_triple_quotes_not_ending (line 115) | def test_line_starting_with_triple_quotes_not_ending(self): method test_line_starting_and_ending_with_triple_quotes (line 122) | def test_line_starting_and_ending_with_triple_quotes(self): method test_string_open_true_line_starting_with_triple_quotes (line 129) | def test_string_open_true_line_starting_with_triple_quotes(self): FILE: keras/src/utils/config.py class Config (line 13) | class Config: method __init__ (line 85) | def __init__(self, **kwargs): method frozen (line 91) | def frozen(self): method freeze (line 95) | def freeze(self): method unfreeze (line 99) | def unfreeze(self): method _raise_if_frozen (line 102) | def _raise_if_frozen(self): method as_dict (line 108) | def as_dict(self): method to_json (line 111) | def to_json(self): method keys (line 114) | def keys(self): method values (line 117) | def values(self): method items (line 120) | def items(self): method pop (line 123) | def pop(self, *args): method update (line 127) | def update(self, *args, **kwargs): method get (line 131) | def get(self, keyname, value=None): method __setattr__ (line 134) | def __setattr__(self, name, value): method __getattr__ (line 142) | def __getattr__(self, name): method __setitem__ (line 159) | def __setitem__(self, key, item): method __getitem__ (line 163) | def __getitem__(self, key): method __repr__ (line 166) | def __repr__(self): method __iter__ (line 169) | def __iter__(self): method __len__ (line 174) | def __len__(self): method __delitem__ (line 177) | def __delitem__(self, key): method __contains__ (line 181) | def __contains__(self, item): FILE: keras/src/utils/dataset_utils.py function split_dataset (line 18) | def split_dataset( function _split_dataset_tf (line 89) | def _split_dataset_tf( function _split_dataset_torch (line 173) | def _split_dataset_torch( function _infer_preferred_backend (line 258) | def _infer_preferred_backend(dataset): function _convert_dataset_to_list (line 270) | def _convert_dataset_to_list( function _get_data_iterator_from_dataset (line 309) | def _get_data_iterator_from_dataset(dataset, dataset_type_spec): function _get_next_sample (line 384) | def _get_next_sample( function is_tf_dataset (line 460) | def is_tf_dataset(dataset): function is_grain_dataset (line 471) | def is_grain_dataset(dataset): function is_torch_dataset (line 479) | def is_torch_dataset(dataset): function _mro_matches (line 483) | def _mro_matches( function _rescale_dataset_split_sizes (line 498) | def _rescale_dataset_split_sizes(left_size, right_size, total_length): function _restore_dataset_from_list (line 623) | def _restore_dataset_from_list( function is_batched (line 650) | def is_batched(dataset): function get_batch_size (line 655) | def get_batch_size(dataset): function _get_type_spec (line 663) | def _get_type_spec(dataset): function index_directory (line 687) | def index_directory( function iter_valid_files (line 838) | def iter_valid_files(directory, follow_links, formats): function index_subdirectory (line 856) | def index_subdirectory(directory, class_indices, follow_links, formats): function get_training_or_validation_split (line 892) | def get_training_or_validation_split(samples, labels, validation_split, ... function labels_to_dataset_tf (line 930) | def labels_to_dataset_tf(labels, label_mode, num_classes): function labels_to_dataset_grain (line 962) | def labels_to_dataset_grain(labels, label_mode, num_classes): function check_validation_split_arg (line 1007) | def check_validation_split_arg(validation_split, subset, shuffle, seed): FILE: keras/src/utils/dataset_utils_test.py class MyTorchDataset (line 16) | class MyTorchDataset(TorchDataset): method __init__ (line 17) | def __init__(self, x, y=None): method __len__ (line 48) | def __len__(self): method __getitem__ (line 51) | def __getitem__(self, idx): class DatasetUtilsTest (line 67) | class DatasetUtilsTest(test_case.TestCase): method test_split_dataset (line 75) | def test_split_dataset( method test_split_dataset_nested_structures (line 118) | def test_split_dataset_nested_structures(self, structure_type): FILE: keras/src/utils/dtype_utils.py function dtype_size (line 13) | def dtype_size(dtype): function is_float (line 20) | def is_float(dtype): function cast_to_common_dtype (line 24) | def cast_to_common_dtype(tensors): FILE: keras/src/utils/dtype_utils_test.py class DtypeSizeTests (line 6) | class DtypeSizeTests(test_case.TestCase): method test_bfloat16_dtype_size (line 7) | def test_bfloat16_dtype_size(self): method test_float16_dtype_size (line 10) | def test_float16_dtype_size(self): method test_float32_dtype_size (line 13) | def test_float32_dtype_size(self): method test_int32_dtype_size (line 16) | def test_int32_dtype_size(self): method test_float64_dtype_size (line 19) | def test_float64_dtype_size(self): method test_int64_dtype_size (line 22) | def test_int64_dtype_size(self): method test_uint8_dtype_size (line 25) | def test_uint8_dtype_size(self): method test_bool_dtype_size (line 28) | def test_bool_dtype_size(self): method test_invalid_dtype_size (line 31) | def test_invalid_dtype_size(self): class IsFloatTests (line 36) | class IsFloatTests(test_case.TestCase): method test_is_float_float16 (line 37) | def test_is_float_float16(self): method test_is_float_float32 (line 40) | def test_is_float_float32(self): method test_is_float_float64 (line 43) | def test_is_float_float64(self): method test_is_float_int32 (line 46) | def test_is_float_int32(self): method test_is_float_bool (line 49) | def test_is_float_bool(self): method test_is_float_uint8 (line 52) | def test_is_float_uint8(self): method test_is_float_containing_float (line 55) | def test_is_float_containing_float(self): method test_is_float_empty_string (line 58) | def test_is_float_empty_string(self): class CastToCommonDtype (line 62) | class CastToCommonDtype(test_case.TestCase): method test_cast_to_common_dtype_float32_float64 (line 63) | def test_cast_to_common_dtype_float32_float64(self): method test_cast_to_common_dtype_float16_float32_float64 (line 70) | def test_cast_to_common_dtype_float16_float32_float64(self): method test_cast_to_common_dtype_float16_int16_float32 (line 80) | def test_cast_to_common_dtype_float16_int16_float32(self): method test_cast_to_common_dtype_all_float32 (line 90) | def test_cast_to_common_dtype_all_float32(self): method test_cast_to_common_dtype_float16_bfloat16 (line 100) | def test_cast_to_common_dtype_float16_bfloat16(self): method test_cast_to_common_dtype_float16_uint8 (line 107) | def test_cast_to_common_dtype_float16_uint8(self): method test_cast_to_common_dtype_mixed_types (line 114) | def test_cast_to_common_dtype_mixed_types(self): method test_cast_to_common_dtype_no_float (line 124) | def test_cast_to_common_dtype_no_float(self): method test_cast_to_common_dtype_float16_bfloat16_promotion (line 131) | def test_cast_to_common_dtype_float16_bfloat16_promotion(self): method test_cast_to_common_dtype_bfloat16_float16_promotion (line 138) | def test_cast_to_common_dtype_bfloat16_float16_promotion(self): method test_cast_to_common_dtype_f16_bf16_f64_preservation (line 145) | def test_cast_to_common_dtype_f16_bf16_f64_preservation(self): FILE: keras/src/utils/file_utils.py function path_to_string (line 22) | def path_to_string(path): function resolve_path (line 43) | def resolve_path(path): function is_path_in_dir (line 47) | def is_path_in_dir(path, base_dir): function is_link_in_dir (line 51) | def is_link_in_dir(info, base): function filter_safe_zipinfos (line 56) | def filter_safe_zipinfos(members, base_dir): function filter_safe_tarinfos (line 71) | def filter_safe_tarinfos(members, base_dir): function extract_open_archive (line 90) | def extract_open_archive(archive, path="."): function extract_archive (line 119) | def extract_archive(file_path, path=".", archive_format="auto"): function get_file (line 173) | def get_file( function resolve_hasher (line 392) | def resolve_hasher(algorithm, file_hash=None): function hash_file (line 404) | def hash_file(fpath, algorithm="sha256", chunk_size=65535): function validate_file (line 433) | def validate_file(fpath, file_hash, algorithm="auto", chunk_size=65535): function is_remote_path (line 455) | def is_remote_path(filepath): function _raise_if_no_gfile (line 480) | def _raise_if_no_gfile(path): function exists (line 487) | def exists(path): function File (line 496) | def File(path, mode="r"): function join (line 505) | def join(path, *paths): function isdir (line 514) | def isdir(path): function remove (line 523) | def remove(path): function rmtree (line 532) | def rmtree(path): function listdir (line 541) | def listdir(path): function copy (line 550) | def copy(src, dst): function makedirs (line 559) | def makedirs(path): FILE: keras/src/utils/file_utils_test.py class PathToStringTest (line 14) | class PathToStringTest(test_case.TestCase): method test_path_to_string_with_string_path (line 15) | def test_path_to_string_with_string_path(self): method test_path_to_string_with_PathLike_object (line 20) | def test_path_to_string_with_PathLike_object(self): method test_path_to_string_with_non_string_typed_path_object (line 25) | def test_path_to_string_with_non_string_typed_path_object(self): method test_path_to_string_with_none_path (line 36) | def test_path_to_string_with_none_path(self): class ResolvePathTest (line 41) | class ResolvePathTest(test_case.TestCase): method test_resolve_path_with_absolute_path (line 42) | def test_resolve_path_with_absolute_path(self): method test_resolve_path_with_relative_path (line 47) | def test_resolve_path_with_relative_path(self): class IsPathInDirTest (line 53) | class IsPathInDirTest(test_case.TestCase): method test_is_path_in_dir_with_absolute_paths (line 54) | def test_is_path_in_dir_with_absolute_paths(self): class IsLinkInDirTest (line 60) | class IsLinkInDirTest(test_case.TestCase): method test_is_link_in_dir_with_absolute_paths (line 61) | def test_is_link_in_dir_with_absolute_paths(self): method test_is_link_in_dir_with_relative_paths (line 85) | def test_is_link_in_dir_with_relative_paths(self): class FilterSafePathsTest (line 110) | class FilterSafePathsTest(test_case.TestCase): method setUp (line 111) | def setUp(self): method test_member_within_base_dir (line 120) | def test_member_within_base_dir(self): method test_symlink_within_base_dir (line 131) | def test_symlink_within_base_dir(self): method test_invalid_path_warning (line 142) | def test_invalid_path_warning(self): method test_symbolic_link_in_base_dir (line 161) | def test_symbolic_link_in_base_dir(self): class ExtractArchiveTest (line 178) | class ExtractArchiveTest(test_case.TestCase): method setUp (line 179) | def setUp(self): method create_tar (line 188) | def create_tar(self): method create_zip (line 196) | def create_zip(self): method test_extract_tar (line 204) | def test_extract_tar(self): method test_extract_zip (line 212) | def test_extract_zip(self): method test_extract_auto (line 220) | def test_extract_auto(self): method test_non_existent_file (line 241) | def test_non_existent_file(self): method test_archive_format_none (line 246) | def test_archive_format_none(self): method test_runtime_error_during_extraction (line 252) | def test_runtime_error_during_extraction(self): method test_keyboard_interrupt_during_extraction (line 263) | def test_keyboard_interrupt_during_extraction(self): class GetFileTest (line 277) | class GetFileTest(test_case.TestCase): method setUp (line 278) | def setUp(self): method test_valid_tar_extraction (line 285) | def test_valid_tar_extraction(self): method test_valid_zip_extraction (line 294) | def test_valid_zip_extraction(self): method test_valid_text_file_download (line 303) | def test_valid_text_file_download(self): method test_get_file_with_tgz_extension (line 314) | def test_get_file_with_tgz_extension(self): method test_get_file_with_integrity_check (line 331) | def test_get_file_with_integrity_check(self): method test_cache_invalidation (line 348) | def test_cache_invalidation(self): method test_force_download (line 376) | def test_force_download(self): method test_get_file_with_failed_integrity_check (line 402) | def test_get_file_with_failed_integrity_check(self): method _create_tar_file (line 421) | def _create_tar_file(self, directory): method _create_zip_file (line 433) | def _create_zip_file(self, directory): method _test_file_extraction_and_validation (line 445) | def _test_file_extraction_and_validation( method test_exists (line 475) | def test_exists(self): method test_file_open_read (line 487) | def test_file_open_read(self): method test_file_open_write (line 498) | def test_file_open_write(self): method test_isdir (line 509) | def test_isdir(self): method test_join_simple (line 518) | def test_join_simple(self): method test_join_single_directory (line 521) | def test_join_single_directory(self): method test_listdir (line 524) | def test_listdir(self): method test_makedirs_and_rmtree (line 528) | def test_makedirs_and_rmtree(self): method test_copy (line 535) | def test_copy(self): method test_remove_sub_directory (line 543) | def test_remove_sub_directory(self): method test_remove_files_inside_directory (line 551) | def test_remove_files_inside_directory(self): method test_handle_complex_paths (line 561) | def test_handle_complex_paths(self): class HashFileTest (line 568) | class HashFileTest(test_case.TestCase): method setUp (line 569) | def setUp(self): method test_hash_file_sha256 (line 575) | def test_hash_file_sha256(self): method test_hash_file_md5 (line 585) | def test_hash_file_md5(self): class TestValidateFile (line 592) | class TestValidateFile(test_case.TestCase): method setUp (line 593) | def setUp(self): method test_validate_file_sha256 (line 603) | def test_validate_file_sha256(self): method test_validate_file_md5 (line 609) | def test_validate_file_md5(self): method test_validate_file_auto_sha256 (line 615) | def test_validate_file_auto_sha256(self): method test_validate_file_auto_md5 (line 621) | def test_validate_file_auto_md5(self): method test_validate_file_wrong_hash (line 627) | def test_validate_file_wrong_hash(self): class ResolveHasherTest (line 635) | class ResolveHasherTest(test_case.TestCase): method test_resolve_hasher_sha256 (line 636) | def test_resolve_hasher_sha256(self): method test_resolve_hasher_auto_sha256 (line 641) | def test_resolve_hasher_auto_sha256(self): method test_resolve_hasher_auto_md5 (line 646) | def test_resolve_hasher_auto_md5(self): method test_resolve_hasher_default (line 651) | def test_resolve_hasher_default(self): class IsRemotePathTest (line 657) | class IsRemotePathTest(test_case.TestCase): method test_gcs_remote_path (line 658) | def test_gcs_remote_path(self): method test_hdfs_remote_path (line 663) | def test_hdfs_remote_path(self): method test_cns_remote_path (line 667) | def test_cns_remote_path(self): method test_placer_remote_path (line 670) | def test_placer_remote_path(self): method test_tfhub_remote_path (line 681) | def test_tfhub_remote_path(self): method test_cfs_remote_path (line 684) | def test_cfs_remote_path(self): method test_readahead_remote_path (line 687) | def test_readahead_remote_path(self): method test_non_remote_paths (line 690) | def test_non_remote_paths(self): class TestRaiseIfNoGFile (line 702) | class TestRaiseIfNoGFile(test_case.TestCase): method test_raise_if_no_gfile_raises_correct_message (line 703) | def test_raise_if_no_gfile_raises_correct_message(self): FILE: keras/src/utils/grain_utils.py function make_batch (line 5) | def make_batch(values): function make_string_batch (line 15) | def make_string_batch(values): FILE: keras/src/utils/image_dataset_utils.py function image_dataset_from_directory (line 34) | def image_dataset_from_directory( function paths_and_labels_to_dataset (line 412) | def paths_and_labels_to_dataset( function _paths_and_labels_to_dataset_tf (line 467) | def _paths_and_labels_to_dataset_tf( function _load_image_tf (line 516) | def _load_image_tf( function _paths_and_labels_to_dataset_grain (line 567) | def _paths_and_labels_to_dataset_grain( function _load_image_grain (line 610) | def _load_image_grain( FILE: keras/src/utils/image_dataset_utils_test.py class ImageDatasetFromDirectoryTest (line 14) | class ImageDatasetFromDirectoryTest(testing.TestCase): method _get_images (line 15) | def _get_images(self, count=16, color_mode="rgb"): method _prepare_directory (line 31) | def _prepare_directory( method test_image_dataset_from_directory_no_labels (line 75) | def test_image_dataset_from_directory_no_labels(self, format): method test_image_dataset_from_directory_binary (line 114) | def test_image_dataset_from_directory_binary(self, format): method test_static_shape_in_graph (line 162) | def test_static_shape_in_graph(self): method test_sample_count (line 184) | def test_sample_count(self, format): method test_image_dataset_from_directory_multiclass (line 202) | def test_image_dataset_from_directory_multiclass(self, format): method test_image_dataset_from_directory_color_modes (line 264) | def test_image_dataset_from_directory_color_modes(self, format): method test_image_dataset_from_directory_validation_split (line 305) | def test_image_dataset_from_directory_validation_split(self, format): method test_image_dataset_from_directory_manual_labels (line 361) | def test_image_dataset_from_directory_manual_labels(self, format): method test_image_dataset_from_directory_follow_links (line 414) | def test_image_dataset_from_directory_follow_links(self, format): method test_image_dataset_from_directory_no_images (line 435) | def test_image_dataset_from_directory_no_images(self, format): method test_image_dataset_from_directory_crop_to_aspect_ratio (line 446) | def test_image_dataset_from_directory_crop_to_aspect_ratio(self, format): method test_image_dataset_from_directory_pad_to_aspect_ratio (line 467) | def test_image_dataset_from_directory_pad_to_aspect_ratio(self, format): method test_image_dataset_from_directory_errors (line 488) | def test_image_dataset_from_directory_errors(self, format): method test_image_dataset_from_directory_not_batched (line 575) | def test_image_dataset_from_directory_not_batched(self, format): method test_image_dataset_from_directory_shuffle (line 592) | def test_image_dataset_from_directory_shuffle(self, format): FILE: keras/src/utils/image_utils.py function array_to_img (line 41) | def array_to_img(x, data_format=None, scale=True, dtype=None): function img_to_array (line 116) | def img_to_array(img, data_format=None, dtype=None): function save_img (line 163) | def save_img(path, x, data_format=None, file_format=None, scale=True, **... function load_img (line 200) | def load_img( function smart_resize (line 309) | def smart_resize( FILE: keras/src/utils/image_utils_test.py class SaveImgTest (line 12) | class SaveImgTest(testing.TestCase, parameterized.TestCase): method test_save_jpg (line 19) | def test_save_jpg(self, shape, name, file_format, use_explicit_format): FILE: keras/src/utils/io_utils.py function enable_interactive_logging (line 15) | def enable_interactive_logging(): function disable_interactive_logging (line 31) | def disable_interactive_logging(): function is_interactive_logging_enabled (line 47) | def is_interactive_logging_enabled(): function set_logging_verbosity (line 61) | def set_logging_verbosity(level): function print_msg (line 92) | def print_msg(message, line_break=True): function ask_to_proceed_with_overwrite (line 116) | def ask_to_proceed_with_overwrite(filepath): function _replace_special_unicode_character (line 140) | def _replace_special_unicode_character(message): FILE: keras/src/utils/io_utils_test.py class TestIoUtils (line 9) | class TestIoUtils(test_case.TestCase): method test_enable_interactive_logging (line 10) | def test_enable_interactive_logging(self): method test_disable_interactive_logging (line 14) | def test_disable_interactive_logging(self): method test_set_logging_verbosity_valid (line 18) | def test_set_logging_verbosity_valid(self): method test_set_logging_verbosity_invalid (line 23) | def test_set_logging_verbosity_invalid(self): method test_ask_to_proceed_with_overwrite_yes (line 28) | def test_ask_to_proceed_with_overwrite_yes(self, _): method test_ask_to_proceed_with_overwrite_no (line 32) | def test_ask_to_proceed_with_overwrite_no(self, _): method test_print_msg_interactive_with_line_break (line 36) | def test_print_msg_interactive_with_line_break(self, mock_write): method test_print_msg_interactive_without_line_break (line 42) | def test_print_msg_interactive_without_line_break(self, mock_write): method test_print_msg_non_interactive (line 48) | def test_print_msg_non_interactive(self, mock_logging): method test_ask_to_proceed_with_overwrite_invalid_then_yes (line 54) | def test_ask_to_proceed_with_overwrite_invalid_then_yes(self, _): method test_ask_to_proceed_with_overwrite_invalid_then_no (line 58) | def test_ask_to_proceed_with_overwrite_invalid_then_no(self, _): method test_print_msg_with_different_encoding (line 61) | def test_print_msg_with_different_encoding(self): FILE: keras/src/utils/jax_layer.py function tf_no_automatic_dependency_tracking (line 27) | def tf_no_automatic_dependency_tracking(fn): function _convert_to_jax_key (line 31) | def _convert_to_jax_key(tensor): class JaxLayer (line 38) | class JaxLayer(Layer): method __init__ (line 233) | def __init__( method _validate_signature (line 291) | def _validate_signature(self, fn, fn_name, allowed, required): method _get_jax2tf_input_shape (line 311) | def _get_jax2tf_input_shape(self, input_shape): method _jax2tf_convert (line 355) | def _jax2tf_convert(self, fn, polymorphic_shapes): method _partial_with_positional (line 363) | def _partial_with_positional(self, fn, index, value): method _create_variables (line 386) | def _create_variables(self, values, trainable): method _get_init_seed (line 444) | def _get_init_seed(self): method _get_init_rng (line 456) | def _get_init_rng(self): method _get_call_seed (line 470) | def _get_call_seed(self): method _get_call_rng (line 481) | def _get_call_rng(self, training): method _initialize_weights (line 499) | def _initialize_weights(self, input_shape): method build (line 539) | def build(self, input_shape): method call (line 582) | def call(self, inputs, training=False): method get_config (line 636) | def get_config(self): method from_config (line 645) | def from_config(cls, config): class FlaxLayer (line 654) | class FlaxLayer(JaxLayer): method __init__ (line 744) | def __init__( method _params_and_state_to_variables (line 815) | def _params_and_state_to_variables(self, params, state): method _variables_to_params_and_state (line 825) | def _variables_to_params_and_state(self, variables): method _get_init_rng (line 840) | def _get_init_rng(self): method _get_call_rng (line 846) | def _get_call_rng(self, training): method get_config (line 852) | def get_config(self): method from_config (line 871) | def from_config(cls, config): FILE: keras/src/utils/jax_layer_test.py function jax_stateless_function (line 36) | def jax_stateless_function(inputs): function jax_model_no_state_init (line 44) | def jax_model_no_state_init(rng, inputs): function jax_model_no_state_apply (line 57) | def jax_model_no_state_apply(params, inputs): function jax_model_with_state_init (line 69) | def jax_model_with_state_init(rng, inputs, training): function jax_model_with_state_apply (line 76) | def jax_model_with_state_apply(params, state, inputs, training): class FlaxTrainingIndependentModel (line 86) | class FlaxTrainingIndependentModel(flax.linen.Module): method forward (line 88) | def forward(self, inputs): method get_config (line 103) | def get_config(self): method from_config (line 107) | def from_config(cls, config): class FlaxDropoutModel (line 111) | class FlaxDropoutModel(flax.linen.Module): method my_apply (line 113) | def my_apply(self, inputs, training): method get_config (line 129) | def get_config(self): method from_config (line 133) | def from_config(cls, config): function flax_dropout_wrapper (line 137) | def flax_dropout_wrapper(module, x, training): class FlaxBatchNormModel (line 141) | class FlaxBatchNormModel(flax.linen.Module): method __call__ (line 143) | def __call__(self, inputs, training=False): method get_config (line 177) | def get_config(self): method from_config (line 181) | def from_config(cls, config): class TestJaxLayer (line 197) | class TestJaxLayer(testing.TestCase): method _test_layer (line 198) | def _test_layer( method test_jax_layer (line 411) | def test_jax_layer( method test_flax_layer (line 477) | def test_flax_layer( method test_with_no_init_fn_and_no_params (line 518) | def test_with_no_init_fn_and_no_params(self): method test_with_training_in_call_fn_but_not_init_fn (line 525) | def test_with_training_in_call_fn_but_not_init_fn(self): method test_with_different_argument_order (line 535) | def test_with_different_argument_order(self): method test_with_minimal_arguments (line 545) | def test_with_minimal_arguments(self): method test_with_missing_inputs_in_call_fn (line 555) | def test_with_missing_inputs_in_call_fn(self): method test_with_missing_inputs_in_init_fn (line 565) | def test_with_missing_inputs_in_init_fn(self): method test_with_unsupported_argument_in_call_fn (line 575) | def test_with_unsupported_argument_in_call_fn(self): method test_with_unsupported_argument_in_init_fn (line 585) | def test_with_unsupported_argument_in_init_fn(self): method test_with_structures_as_inputs_and_outputs (line 595) | def test_with_structures_as_inputs_and_outputs(self): method test_with_polymorphic_shape_more_than_26_dimension_names (line 619) | def test_with_polymorphic_shape_more_than_26_dimension_names(self): method test_with_flax_state_no_params (line 633) | def test_with_flax_state_no_params(self): method test_with_state_none_leaves (line 649) | def test_with_state_none_leaves(self): method test_with_state_non_tensor_leaves (line 657) | def test_with_state_non_tensor_leaves(self): method test_with_state_jax_registered_node_class (line 665) | def test_with_state_jax_registered_node_class(self): method test_state_mismatch_during_update (line 718) | def test_state_mismatch_during_update(self, init_state, error_regex): method test_rng_seeding (line 726) | def test_rng_seeding(self): FILE: keras/src/utils/jax_utils.py function is_in_jax_tracing_scope (line 4) | def is_in_jax_tracing_scope(x=None): FILE: keras/src/utils/model_visualization.py function check_pydot (line 24) | def check_pydot(): function check_graphviz (line 29) | def check_graphviz(): function add_edge (line 42) | def add_edge(dot, src, dst): function get_layer_activation_name (line 51) | def get_layer_activation_name(layer): function make_layer_label (line 61) | def make_layer_label(layer, **kwargs): function make_node (line 186) | def make_node(layer, **kwargs): function model_to_dot (line 195) | def model_to_dot( function plot_model (line 410) | def plot_model( FILE: keras/src/utils/module_utils.py class LazyModule (line 4) | class LazyModule: method __init__ (line 5) | def __init__(self, name, pip_name=None, import_error_msg=None): method available (line 16) | def available(self): method initialize (line 25) | def initialize(self): method __getattr__ (line 31) | def __getattr__(self, name): method __repr__ (line 38) | def __repr__(self): class OrbaxLazyModule (line 42) | class OrbaxLazyModule(LazyModule): method initialize (line 43) | def initialize(self): method __getattr__ (line 51) | def __getattr__(self, name): FILE: keras/src/utils/naming.py function auto_name (line 8) | def auto_name(prefix): function uniquify (line 13) | def uniquify(name): function to_snake_case (line 27) | def to_snake_case(name): function get_uid (line 35) | def get_uid(prefix=""): function reset_uids (line 60) | def reset_uids(): function get_object_name (line 66) | def get_object_name(obj): FILE: keras/src/utils/naming_test.py class NamingUtilsTest (line 5) | class NamingUtilsTest(test_case.TestCase): method test_uniquify_unique_name (line 6) | def test_uniquify_unique_name(self): method test_auto_name (line 11) | def test_auto_name(self): method test_get_uid (line 16) | def test_get_uid(self): method test_uniquify_non_unique_name (line 21) | def test_uniquify_non_unique_name(self): method test_to_snake_case_snake_case_name (line 27) | def test_to_snake_case_snake_case_name(self): method test_get_uid_existing_prefix (line 32) | def test_get_uid_existing_prefix(self): method test_reset_uids (line 38) | def test_reset_uids(self): method test_get_object_name_no_name_attribute (line 44) | def test_get_object_name_no_name_attribute(self): method test_get_object_name_no_name_or_class_attribute (line 52) | def test_get_object_name_no_name_or_class_attribute(self): method test_uniquify_already_uniquified_name (line 60) | def test_uniquify_already_uniquified_name(self): method test_to_snake_case_capital_after_any_character (line 72) | def test_to_snake_case_capital_after_any_character(self): method test_to_snake_case_lower_before_upper (line 77) | def test_to_snake_case_lower_before_upper(self): method test_to_snake_case_already_snake_cased (line 82) | def test_to_snake_case_already_snake_cased(self): method test_to_snake_case_no_changes (line 87) | def test_to_snake_case_no_changes(self): method test_to_snake_case_single_uppercase_word (line 92) | def test_to_snake_case_single_uppercase_word(self): method test_get_object_name_for_keras_objects (line 97) | def test_get_object_name_for_keras_objects(self): method test_get_object_name_for_functions (line 108) | def test_get_object_name_for_functions(self): FILE: keras/src/utils/numerical_utils.py function normalize (line 9) | def normalize(x, axis=-1, order=2): function to_categorical (line 39) | def to_categorical(x, num_classes=None): function encode_categorical_inputs (line 104) | def encode_categorical_inputs( function build_pos_neg_masks (line 197) | def build_pos_neg_masks( FILE: keras/src/utils/numerical_utils_test.py class TestNumericalUtils (line 11) | class TestNumericalUtils(testing.TestCase): method test_to_categorical (line 22) | def test_to_categorical(self, shape, expected_shape): method test_to_categorical_without_num_classes (line 34) | def test_to_categorical_without_num_classes(self): method test_to_categorical_with_backend_tensor (line 39) | def test_to_categorical_with_backend_tensor(self): method test_normalize (line 57) | def test_normalize(self, order): method test_build_pos_neg_masks (line 76) | def test_build_pos_neg_masks(self): FILE: keras/src/utils/progbar.py class Progbar (line 13) | class Progbar: method __init__ (line 27) | def __init__( method update (line 63) | def update(self, current, values=None, finalize=None): method add (line 211) | def add(self, n, values=None): method _format_time (line 214) | def _format_time(self, time_per_unit, unit_name): method _estimate_step_duration (line 236) | def _estimate_step_duration(self, current, now): FILE: keras/src/utils/progbar_test.py class ProgbarTest (line 8) | class ProgbarTest(testing.TestCase): method test_update (line 16) | def test_update(self, value_type): method test_zero_target (line 35) | def test_zero_target(self, verbose): FILE: keras/src/utils/python_utils.py function is_continuous_axis (line 8) | def is_continuous_axis(axis): function default (line 20) | def default(method): function is_default (line 26) | def is_default(method): function func_dump (line 31) | def func_dump(func): function func_load (line 54) | def func_load(code, defaults=None, closure=None, globs=None): function to_list (line 103) | def to_list(x): function remove_long_seq (line 120) | def remove_long_seq(maxlen, seq, label): function removeprefix (line 139) | def removeprefix(x, prefix): function removesuffix (line 148) | def removesuffix(x, suffix): function remove_by_id (line 157) | def remove_by_id(lst, value): function pythonify_logs (line 165) | def pythonify_logs(logs): FILE: keras/src/utils/python_utils_test.py class PythonUtilsTest (line 8) | class PythonUtilsTest(testing.TestCase): method test_func_dump_and_load (line 9) | def test_func_dump_and_load(self): method test_removesuffix (line 17) | def test_removesuffix(self): method test_removeprefix (line 22) | def test_removeprefix(self): method test_func_load_defaults_as_tuple (line 27) | def test_func_load_defaults_as_tuple(self): method test_remove_long_seq_standard_case (line 39) | def test_remove_long_seq_standard_case(self): method test_func_load_with_closure (line 48) | def test_func_load_with_closure(self): method test_func_load_closure_conversion (line 60) | def test_func_load_closure_conversion(self): method test_ensure_value_to_cell (line 69) | def test_ensure_value_to_cell(self): method test_closure_processing (line 78) | def test_closure_processing(self): method test_func_load_valid_encoded_code (line 86) | def test_func_load_valid_encoded_code(self): method test_func_load_bad_encoded_code (line 98) | def test_func_load_bad_encoded_code(self): method test_is_continuous_axis (line 103) | def test_is_continuous_axis(self): FILE: keras/src/utils/rng_utils.py function set_random_seed (line 15) | def set_random_seed(seed): function get_random_seed (line 73) | def get_random_seed(): FILE: keras/src/utils/rng_utils_test.py class TestRandomSeedSetting (line 9) | class TestRandomSeedSetting(test_case.TestCase): method test_set_random_seed_with_seed_generator (line 10) | def test_set_random_seed_with_seed_generator(self): method test_set_random_seed_with_global_seed_generator (line 39) | def test_set_random_seed_with_global_seed_generator(self): FILE: keras/src/utils/sequence_utils.py function pad_sequences (line 12) | def pad_sequences( FILE: keras/src/utils/sequence_utils_test.py class PadSequencesTest (line 5) | class PadSequencesTest(testing.TestCase): method test_pad_sequences (line 6) | def test_pad_sequences(self): method test_pad_sequences_float (line 25) | def test_pad_sequences_float(self): method test_pad_sequences_str (line 52) | def test_pad_sequences_str(self): method test_pad_sequences_vector (line 86) | def test_pad_sequences_vector(self): FILE: keras/src/utils/summary_utils.py function count_params (line 20) | def count_params(weights): function _compute_memory_size (line 26) | def _compute_memory_size(shape, dtype): function weight_memory_size (line 33) | def weight_memory_size(weights): function readable_memory_size (line 49) | def readable_memory_size(weight_memory_size): function highlight_number (line 61) | def highlight_number(x): function highlight_symbol (line 72) | def highlight_symbol(x): function bold_text (line 77) | def bold_text(x, color=None): function format_layer_shape (line 84) | def format_layer_shape(layer): function print_summary (line 121) | def print_summary( function get_layer_index_bound_by_layer_name (line 392) | def get_layer_index_bound_by_layer_name(layers, layer_range=None): FILE: keras/src/utils/summary_utils_test.py class SummaryUtilsTest (line 12) | class SummaryUtilsTest(testing.TestCase): method test_print_model_summary (line 15) | def test_print_model_summary(self, optimizer): method test_print_model_summary_custom_build (line 45) | def test_print_model_summary_custom_build(self): method test_print_model_summary_op_as_layer (line 79) | def test_print_model_summary_op_as_layer(self): method test_print_model_summary_with_mha (line 102) | def test_print_model_summary_with_mha(self): FILE: keras/src/utils/text_dataset_utils.py function text_dataset_from_directory (line 16) | def text_dataset_from_directory( function paths_and_labels_to_dataset (line 297) | def paths_and_labels_to_dataset( function _paths_and_labels_to_dataset_tf (line 333) | def _paths_and_labels_to_dataset_tf( function _path_to_string_content_tf (line 369) | def _path_to_string_content_tf(path, max_length): function _paths_and_labels_to_dataset_grain (line 376) | def _paths_and_labels_to_dataset_grain( function _path_to_string_content_grain (line 411) | def _path_to_string_content_grain(path, max_length): FILE: keras/src/utils/text_dataset_utils_test.py class TextDatasetFromDirectoryTest (line 12) | class TextDatasetFromDirectoryTest(testing.TestCase): method _prepare_directory (line 13) | def _prepare_directory( method test_text_dataset_from_directory_standalone (line 52) | def test_text_dataset_from_directory_standalone(self, format): method test_text_dataset_from_directory_binary (line 92) | def test_text_dataset_from_directory_binary(self, format=format): method test_sample_count (line 152) | def test_sample_count(self, format): method test_text_dataset_from_directory_multiclass (line 166) | def test_text_dataset_from_directory_multiclass(self, format): method test_text_dataset_from_directory_validation_split (line 216) | def test_text_dataset_from_directory_validation_split(self, format): method test_text_dataset_from_directory_manual_labels (line 263) | def test_text_dataset_from_directory_manual_labels(self, format): method test_text_dataset_from_directory_follow_links (line 276) | def test_text_dataset_from_directory_follow_links(self, format): method test_text_dataset_from_directory_no_files (line 296) | def test_text_dataset_from_directory_no_files(self, format): method test_text_dataset_from_directory_errors (line 307) | def test_text_dataset_from_directory_errors(self, format): method test_text_dataset_from_directory_not_batched (line 389) | def test_text_dataset_from_directory_not_batched(self, format): FILE: keras/src/utils/tf_utils.py function get_tensor_spec (line 5) | def get_tensor_spec(t, dynamic_batch=False, name=None): function ensure_tensor (line 31) | def ensure_tensor(inputs, dtype=None): function is_ragged_tensor (line 43) | def is_ragged_tensor(x): function sparse_bincount (line 47) | def sparse_bincount(inputs, depth, binary_output, dtype, count_weights=N... function dense_bincount (line 69) | def dense_bincount(inputs, depth, binary_output, dtype, count_weights=No... function expand_dims (line 88) | def expand_dims(inputs, axis): function tf_encode_categorical_inputs (line 95) | def tf_encode_categorical_inputs( FILE: keras/src/utils/timeseries_dataset_utils.py function timeseries_dataset_from_array (line 15) | def timeseries_dataset_from_array( function _timeseries_dataset_tf (line 235) | def _timeseries_dataset_tf( function _timeseries_dataset_grain (line 311) | def _timeseries_dataset_grain( function sequences_from_indices (line 370) | def sequences_from_indices(array, indices_ds, start_index, end_index): FILE: keras/src/utils/timeseries_dataset_utils_test.py class TimeseriesDatasetTest (line 8) | class TimeseriesDatasetTest(testing.TestCase): method test_basics (line 13) | def test_basics(self, format): method test_timeseries_regression (line 41) | def test_timeseries_regression(self, format): method test_no_targets (line 64) | def test_no_targets(self, format): method test_shuffle_tf (line 83) | def test_shuffle_tf(self): method test_shuffle_grain (line 119) | def test_shuffle_grain(self): method test_sampling_rate (line 142) | def test_sampling_rate(self, format): method test_sequence_stride (line 175) | def test_sequence_stride(self, format): method test_start_and_end_index (line 208) | def test_start_and_end_index(self, format): method test_errors (line 225) | def test_errors(self): method test_invalid_format (line 255) | def test_invalid_format(self): method test_not_batched (line 265) | def test_not_batched(self, format): FILE: keras/src/utils/torch_utils.py class TorchModuleWrapper (line 15) | class TorchModuleWrapper(Layer): method __init__ (line 87) | def __init__(self, module, name=None, output_shape=None, **kwargs): method parameters (line 107) | def parameters(self, recurse=True): method _track_module_parameters (line 110) | def _track_module_parameters(self): method call (line 120) | def call(self, *args, training=None, **kwargs): method save_own_variables (line 127) | def save_own_variables(self, store): method load_own_variables (line 137) | def load_own_variables(self, store): method compute_output_shape (line 146) | def compute_output_shape(self, input_shape): method get_config (line 151) | def get_config(self): method from_config (line 166) | def from_config(cls, config): function no_grad (line 188) | def no_grad(orig_func): FILE: keras/src/utils/torch_utils_test.py class Classifier (line 18) | class Classifier(models.Model): method __init__ (line 19) | def __init__( method call (line 34) | def call(self, x, training=None): method get_config (line 39) | def get_config(self): class ClassifierWithNoSpecialCasing (line 46) | class ClassifierWithNoSpecialCasing(models.Model): method __init__ (line 47) | def __init__(self, *args, **kwargs): method call (line 54) | def call(self, x, training=None): class TorchUtilsTest (line 61) | class TorchUtilsTest(testing.TestCase): method test_basic_usage (line 66) | def test_basic_usage(self, use_batch_norm, num_torch_layers): method test_training_args (line 95) | def test_training_args(self, cls, kwargs): method test_module_autowrapping (line 131) | def test_module_autowrapping(self): method test_load_weights_autowrapping (line 147) | def test_load_weights_autowrapping(self): method test_serialize_model_autowrapping (line 167) | def test_serialize_model_autowrapping(self): method test_load_weights (line 190) | def test_load_weights(self, use_batch_norm, num_torch_layers): method test_serialize_model (line 216) | def test_serialize_model(self, use_batch_norm, num_torch_layers): method test_from_config (line 233) | def test_from_config(self): method test_build_model (line 241) | def test_build_model(self): method test_save_load (line 255) | def test_save_load(self, safe_mode): FILE: keras/src/utils/traceback_utils.py function enable_traceback_filtering (line 19) | def enable_traceback_filtering(): function disable_traceback_filtering (line 40) | def disable_traceback_filtering(): function is_traceback_filtering_enabled (line 61) | def is_traceback_filtering_enabled(): function include_frame (line 85) | def include_frame(fname): function _process_traceback_frames (line 92) | def _process_traceback_frames(tb): function filter_traceback (line 107) | def filter_traceback(fn): function inject_argument_info_in_traceback (line 129) | def inject_argument_info_in_traceback(fn, object_name=None): function format_argument_value (line 222) | def format_argument_value(value): FILE: keras/src/utils/tracking.py class DotNotTrackScope (line 10) | class DotNotTrackScope: method __enter__ (line 11) | def __enter__(self): method __exit__ (line 15) | def __exit__(self, *args, **kwargs): function is_tracking_enabled (line 19) | def is_tracking_enabled(): function no_automatic_dependency_tracking (line 23) | def no_automatic_dependency_tracking(fn): class Tracker (line 32) | class Tracker: method __init__ (line 64) | def __init__(self, config, exclusions=None): method track (line 71) | def track(self, attr): method untrack (line 105) | def untrack(self, value): method lock (line 111) | def lock(self, msg=None): method unlock (line 116) | def unlock(self): method add_to_store (line 119) | def add_to_store(self, store_name, value): method is_in_store (line 125) | def is_in_store(self, store_name, value): method replace_tracked_value (line 128) | def replace_tracked_value(self, store_name, old_value, new_value): class TrackedList (line 139) | class TrackedList(list): method __init__ (line 140) | def __init__(self, values=None, tracker=None): method append (line 146) | def append(self, value): method insert (line 151) | def insert(self, index, value): method extend (line 156) | def extend(self, values): method remove (line 161) | def remove(self, value): method pop (line 169) | def pop(self, index=-1): method clear (line 177) | def clear(self): method __delitem__ (line 183) | def __delitem__(self, index): method tree_flatten (line 189) | def tree_flatten(self): method tree_unflatten (line 194) | def tree_unflatten(cls, metadata, children): method torchtree_flatten (line 198) | def torchtree_flatten(self): method torchtree_unflatten (line 204) | def torchtree_unflatten(cls, children, metadata): method torchtree_flatten_with_keys (line 209) | def torchtree_flatten_with_keys(self): class TrackedDict (line 221) | class TrackedDict(dict): method __init__ (line 222) | def __init__(self, values=None, tracker=None): method __setitem__ (line 235) | def __setitem__(self, key, value): method update (line 240) | def update(self, mapping): method pop (line 245) | def pop(self, key, *args): method popitem (line 263) | def popitem(self): method clear (line 269) | def clear(self): method tree_flatten (line 275) | def tree_flatten(self): method tree_unflatten (line 282) | def tree_unflatten(cls, keys, values): method torchtree_flatten (line 286) | def torchtree_flatten(self): method torchtree_unflatten (line 294) | def torchtree_unflatten(cls, values, keys): method torchtree_flatten_with_keys (line 299) | def torchtree_flatten_with_keys(self): class TrackedOrderedDict (line 311) | class TrackedOrderedDict(OrderedDict): method __init__ (line 312) | def __init__(self, values=None, tracker=None): method __setitem__ (line 322) | def __setitem__(self, key, value): method update (line 327) | def update(self, mapping): method pop (line 334) | def pop(self, key, *args): method popitem (line 350) | def popitem(self, last=True): method clear (line 356) | def clear(self): method tree_flatten (line 362) | def tree_flatten(self): method tree_unflatten (line 368) | def tree_unflatten(cls, keys, values): method torchtree_flatten (line 371) | def torchtree_flatten(self): method torchtree_unflatten (line 377) | def torchtree_unflatten(cls, values, keys): method torchtree_flatten_with_keys (line 380) | def torchtree_flatten_with_keys(self): class TrackedSet (line 390) | class TrackedSet(set): method __init__ (line 391) | def __init__(self, values=None, tracker=None): method add (line 397) | def add(self, value): method update (line 402) | def update(self, values): method remove (line 407) | def remove(self, value): method pop (line 412) | def pop(self): method clear (line 418) | def clear(self): method tree_flatten (line 424) | def tree_flatten(self): method tree_unflatten (line 429) | def tree_unflatten(cls, metadata, children): method torchtree_flatten (line 433) | def torchtree_flatten(self): method torchtree_unflatten (line 439) | def torchtree_unflatten(cls, children, metadata): method torchtree_flatten_with_keys (line 444) | def torchtree_flatten_with_keys(self): FILE: keras/src/utils/tracking_test.py class TrackingTest (line 8) | class TrackingTest(testing.TestCase): method test_untracking_in_tracked_list (line 9) | def test_untracking_in_tracked_list(self): method test_tuple_tracking (line 60) | def test_tuple_tracking(self): method test_namedtuple_tracking (line 79) | def test_namedtuple_tracking(self): method test_tracked_dict_constructor_with_ordered_dict (line 101) | def test_tracked_dict_constructor_with_ordered_dict(self): method test_tracked_dict_constructor_with_iterable_pairs (line 125) | def test_tracked_dict_constructor_with_iterable_pairs(self): method test_tracked_ordered_dict_preserves_type_and_order (line 151) | def test_tracked_ordered_dict_preserves_type_and_order(self): method test_tracked_ordered_dict_setitem_and_pop (line 170) | def test_tracked_ordered_dict_setitem_and_pop(self): FILE: keras/src/version.py function version (line 8) | def version(): FILE: keras/src/visualization/draw_bounding_boxes.py function draw_bounding_boxes (line 17) | def draw_bounding_boxes( function _find_text_location (line 173) | def _find_text_location(x, y, font_scale, thickness): FILE: keras/src/visualization/draw_segmentation_masks.py function draw_segmentation_masks (line 9) | def draw_segmentation_masks( function _generate_color_palette (line 107) | def _generate_color_palette(num_classes): FILE: keras/src/visualization/plot_bounding_box_gallery.py function plot_bounding_box_gallery (line 18) | def plot_bounding_box_gallery( FILE: keras/src/visualization/plot_image_gallery.py function _extract_image_batch (line 18) | def _extract_image_batch(images, num_images, batch_size): function plot_image_gallery (line 45) | def plot_image_gallery( FILE: keras/src/visualization/plot_segmentation_mask_gallery.py function plot_segmentation_mask_gallery (line 15) | def plot_segmentation_mask_gallery( FILE: keras/src/wrappers/fixes.py function _validate_data (line 7) | def _validate_data(estimator, *args, **kwargs): function type_of_target (line 26) | def type_of_target(y, input_name="", *, raise_unknown=False): function _routing_enabled (line 43) | def _routing_enabled(): function _raise_for_params (line 56) | def _raise_for_params(params, owner, method): FILE: keras/src/wrappers/sklearn_test.py function wrapped_parametrize_with_checks (line 22) | def wrapped_parametrize_with_checks( function dynamic_model (line 61) | def dynamic_model(X, y, loss, layers=[10]): function use_floatx (line 81) | def use_floatx(x): function test_sklearn_estimator_checks (line 148) | def test_sklearn_estimator_checks(estimator, check): FILE: keras/src/wrappers/sklearn_wrapper.py class BaseEstimator (line 24) | class BaseEstimator: class ClassifierMixin (line 27) | class ClassifierMixin: class RegressorMixin (line 30) | class RegressorMixin: class TransformerMixin (line 33) | class TransformerMixin: class SKLBase (line 37) | class SKLBase(BaseEstimator): method __init__ (line 74) | def __init__( method _more_tags (line 87) | def _more_tags(self): method __sklearn_tags__ (line 90) | def __sklearn_tags__(self): method __sklearn_clone__ (line 95) | def __sklearn_clone__(self): method epoch_ (line 110) | def epoch_(self): method set_fit_request (line 114) | def set_fit_request(self, **kwargs): method _get_model (line 144) | def _get_model(self, X, y): method fit (line 151) | def fit(self, X, y, **kwargs): method predict (line 173) | def predict(self, X): method _process_target (line 182) | def _process_target(self, y, reset=False): method _reverse_process_target (line 190) | def _reverse_process_target(self, y): class SKLearnClassifier (line 196) | class SKLearnClassifier(ClassifierMixin, SKLBase): method _process_target (line 281) | def _process_target(self, y, reset=False): method _more_tags (line 301) | def _more_tags(self): method __sklearn_tags__ (line 305) | def __sklearn_tags__(self): class SKLearnRegressor (line 312) | class SKLearnRegressor(RegressorMixin, SKLBase): method _more_tags (line 393) | def _more_tags(self): method __sklearn_tags__ (line 397) | def __sklearn_tags__(self): class SKLearnTransformer (line 404) | class SKLearnTransformer(TransformerMixin, SKLBase): method transform (line 468) | def transform(self, X): method _more_tags (line 485) | def _more_tags(self): method __sklearn_tags__ (line 491) | def __sklearn_tags__(self): FILE: keras/src/wrappers/utils.py class BaseEstimator (line 10) | class BaseEstimator: class TransformerMixin (line 13) | class TransformerMixin: function assert_sklearn_installed (line 17) | def assert_sklearn_installed(symbol_name): function _check_model (line 25) | def _check_model(model): class TargetReshaper (line 35) | class TargetReshaper(TransformerMixin, BaseEstimator): method fit (line 46) | def fit(self, y): method transform (line 56) | def transform(self, y): method inverse_transform (line 71) | def inverse_transform(self, y): FILE: pip_build.py function export_version_string (line 39) | def export_version_string(version, is_nightly=False, rc_index=None): function ignore_files (line 65) | def ignore_files(_, filenames): function copy_source_to_build_directory (line 69) | def copy_source_to_build_directory(root_path): function build (line 82) | def build(root_path, is_nightly=False, rc_index=None): function build_and_save_output (line 98) | def build_and_save_output(root_path, __version__): function install_whl (line 123) | def install_whl(whl_fpath):