Deep Learning for humans
7078 matches across 15 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | pip_build.py | 29 | |
| LOW | keras/__init__.py | 9 | |
| LOW | keras/__init__.py | 10 | |
| LOW | keras/api/__init__.py | 7 | |
| LOW | keras/api/__init__.py | 8 | |
| LOW | keras/api/__init__.py | 9 | |
| LOW | keras/api/__init__.py | 10 | |
| LOW | keras/api/__init__.py | 11 | |
| LOW | keras/api/__init__.py | 12 | |
| LOW | keras/api/__init__.py | 13 | |
| LOW | keras/api/__init__.py | 14 | |
| LOW | keras/api/__init__.py | 15 | |
| LOW | keras/api/__init__.py | 16 | |
| LOW | keras/api/__init__.py | 17 | |
| LOW | keras/api/__init__.py | 18 | |
| LOW | keras/api/__init__.py | 19 | |
| LOW | keras/api/__init__.py | 20 | |
| LOW | keras/api/__init__.py | 21 | |
| LOW | keras/api/__init__.py | 22 | |
| LOW | keras/api/__init__.py | 23 | |
| LOW | keras/api/__init__.py | 24 | |
| LOW | keras/api/__init__.py | 25 | |
| LOW | keras/api/__init__.py | 26 | |
| LOW | keras/api/__init__.py | 27 | |
| LOW | keras/api/__init__.py | 28 | |
| LOW | keras/api/__init__.py | 29 | |
| LOW | keras/api/__init__.py | 30 | |
| LOW | keras/api/__init__.py | 31 | |
| LOW | keras/api/__init__.py | 32 | |
| LOW | keras/api/__init__.py | 33 | |
| LOW | keras/api/__init__.py | 34 | |
| LOW | keras/api/__init__.py | 35 | |
| LOW | keras/api/__init__.py | 36 | |
| LOW | keras/api/__init__.py | 37 | |
| LOW | keras/api/__init__.py | 38 | |
| LOW | keras/api/__init__.py | 39 | |
| LOW | keras/api/__init__.py | 40 | |
| LOW | keras/api/__init__.py | 41 | |
| LOW | keras/api/__init__.py | 42 | |
| LOW | keras/api/__init__.py | 43 | |
| LOW | keras/api/__init__.py | 46 | |
| LOW | keras/api/__init__.py | 49 | |
| LOW | keras/api/__init__.py | 50 | |
| LOW | keras/api/__init__.py | 53 | |
| LOW | keras/api/__init__.py | 54 | |
| LOW | keras/api/__init__.py | 55 | |
| LOW | keras/api/__init__.py | 56 | |
| LOW | keras/api/__init__.py | 57 | |
| LOW | keras/api/__init__.py | 58 | |
| LOW | keras/api/__init__.py | 59 | |
| LOW | keras/api/__init__.py | 60 | |
| LOW | keras/api/__init__.py | 61 | |
| LOW | keras/api/__init__.py | 62 | |
| LOW | keras/api/__init__.py | 63 | |
| LOW | keras/api/__init__.py | 64 | |
| LOW | keras/api/__init__.py | 65 | |
| LOW | keras/api/__init__.py | 66 | |
| LOW | keras/api/__init__.py | 67 | |
| LOW | keras/api/activations/__init__.py | 7 | |
| LOW | keras/api/activations/__init__.py | 8 | |
| 3641 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | conftest.py | 40 | def pytest_collection_modifyitems(config, items): |
| LOW | pip_build.py | 69 | def copy_source_to_build_directory(root_path): |
| LOW | api_gen.py | 23 | def copy_source_to_build_directory(root_path): |
| LOW | keras/src/api_export.py | 13 | def register_internal_serializable(path, symbol): |
| LOW | keras/src/activations/activations_test.py | 106 | def test_softmax_higher_dim_multiple_axes(self): |
| LOW | keras/src/activations/activations_test.py | 115 | def test_softmax_negative_axis(self): |
| LOW | keras/src/activations/activations_test.py | 151 | def test_log_softmax_higher_dim(self): |
| LOW | keras/src/activations/activations_test.py | 160 | def test_log_softmax_higher_dim_multiple_axes(self): |
| LOW | keras/src/activations/activations_test.py | 169 | def test_log_softmax_negative_axis(self): |
| LOW | keras/src/activations/activations_test.py | 177 | def test_temporal_log_softmax(self): |
| LOW | keras/src/activations/activations_test.py | 488 | def test_relu_combined_threshold_and_max_value(self): |
| LOW | keras/src/activations/activations_test.py | 497 | def test_relu_combined_all_parameters(self): |
| LOW | keras/src/activations/activations_test.py | 514 | def test_relu_to_trigger_leaky(self): |
| LOW | keras/src/visualization/plot_bounding_box_gallery.py | 18 | def plot_bounding_box_gallery( |
| LOW | …as/src/visualization/plot_segmentation_mask_gallery.py | 15 | def plot_segmentation_mask_gallery( |
| LOW | keras/src/tree/dmtree_impl.py | 162 | def _recursive_flatten_with_path(path, structure, flattened): |
| LOW | keras/src/tree/torchtree_impl.py | 155 | def func_with_check_without_shallow_structure(shallow, *args): |
| LOW | keras/src/tree/tree_test.py | 163 | def test_is_nested_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 430 | def test_flatten_with_path_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 588 | def test_pack_sequence_as_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 614 | def test_map_structure_with_one_structure(self, t): |
| LOW | keras/src/tree/tree_test.py | 748 | def test_map_structure_with_one_structure_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 777 | def test_map_structure_with_multiple_structures(self, t): |
| LOW | keras/src/tree/tree_test.py | 1105 | def test_map_structure_with_multiple_structures_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 1187 | def test_assert_same_structure(self, t): |
| LOW | keras/src/tree/tree_test.py | 1542 | def test_assert_same_structure_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 1779 | def test_assert_same_paths_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 2064 | def test_traverse_top_down_tf_wrappers(self, t): |
| LOW | keras/src/tree/tree_test.py | 2388 | def test_traverse_bottom_up_tf_wrappers(self, t): |
| LOW | keras/src/tree/optree_impl.py | 122 | def func_with_check_without_shallow_structure(shallow, *args): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 727 | def test_unweighted_all_correct(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 734 | def test_unweighted_high_specificity(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 744 | def test_unweighted_low_specificity(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 829 | def test_unweighted_all_correct(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 837 | def test_unweighted_high_sensitivity(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 847 | def test_unweighted_low_sensitivity(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 54 | def test_unweighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 72 | def test_weighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 148 | def test_unweighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 166 | def test_weighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 237 | def test_unweighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 255 | def test_weighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 326 | def test_unweighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 344 | def test_weighted_with_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 407 | def test_unweighted_all_incorrect(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 436 | def test_unweighted_with_threshold(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 443 | def test_weighted_with_threshold(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 504 | def test_unweighted_class_id_multiclass(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 532 | def test_unweighted_top_k_and_threshold(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 572 | def test_unweighted_all_incorrect(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 599 | def test_unweighted_with_threshold(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 605 | def test_weighted_with_threshold(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 665 | def test_unweighted_class_id_multiclass(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 693 | def test_unweighted_top_k_and_threshold(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 784 | def test_invalid_num_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 887 | def test_invalid_num_thresholds(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 913 | def test_unweighted_all_correct(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 921 | def test_unweighted_high_recall(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 932 | def test_unweighted_low_recall(self): |
| LOW | keras/src/metrics/confusion_metrics_test.py | 975 | def test_invalid_num_thresholds(self): |
| 2402 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | keras/api/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/activations/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/visualization/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/tree/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/metrics/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/losses/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/wrappers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/layers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/constraints/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/config/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/callbacks/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/quantizers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/mnist/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/boston_housing/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/fashion_mnist/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/reuters/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/cifar100/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/imdb/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/california_housing/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/datasets/cifar10/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/distribution/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/distillation/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/mixed_precision/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/legacy/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/legacy/saving/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/utils/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/utils/bounding_boxes/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/utils/legacy/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/backend/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/models/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/optimizers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/optimizers/legacy/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/optimizers/schedules/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/regularizers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/activations/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/visualization/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/tree/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/metrics/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/losses/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/wrappers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/layers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/constraints/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/config/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/callbacks/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/quantizers/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/datasets/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/datasets/mnist/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | …pi/_tf_keras/keras/datasets/boston_housing/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | …api/_tf_keras/keras/datasets/fashion_mnist/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/datasets/reuters/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/datasets/cifar100/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/datasets/imdb/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | …tf_keras/keras/datasets/california_housing/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/datasets/cifar10/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/distribution/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/distillation/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/mixed_precision/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| HIGH | keras/api/_tf_keras/keras/legacy/__init__.py | 0 | do not edit. this file was autogenerated. do not edit it by hand, since your modifications would be overwritten. |
| 151 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | keras/src/activations/activations.py | 8 | Applies the rectified linear unit activation function. With default values, this returns the standard ReLU activati |
| HIGH | keras/src/visualization/plot_bounding_box_gallery.py | 39 | Plots a gallery of images with bounding boxes. This function can display both ground truth and predicted bounding b |
| HIGH | keras/src/visualization/draw_bounding_boxes.py | 28 | Draws bounding boxes on images. This function draws bounding boxes on a batch of images. It supports different |
| HIGH | keras/src/visualization/draw_segmentation_masks.py | 19 | Draws segmentation masks on images. The function overlays segmentation masks on the input images. The masks are |
| HIGH | …as/src/visualization/plot_segmentation_mask_gallery.py | 28 | Plots a gallery of images with corresponding segmentation masks. Args: images: A 4D tensor or NumPy array o |
| HIGH | keras/src/visualization/plot_image_gallery.py | 19 | Extracts a batch of images for plotting. Args: images: The 4D tensor or NumPy array of images. num_ |
| HIGH | keras/src/tree/tree_api.py | 36 | Checks if a given structure is nested. Examples: >>> keras.tree.is_nested(42) False >>> keras.tree.is_ |
| HIGH | keras/src/tree/tree_api.py | 57 | Traverses the given nested structure, applying the given function. The traversal is depth-first. If `top_down` is T |
| HIGH | keras/src/tree/tree_api.py | 110 | Flattens a possibly nested structure into a list. In the case of dict instances, the sequence consists of the value |
| HIGH | keras/src/tree/tree_api.py | 151 | Flattens a possibly nested structure into a list. This is a variant of flattens() which produces a list of pair |
| HIGH | keras/src/tree/tree_api.py | 177 | Maps `func` through given structures. Examples: >>> structure = [[1], [2], [3]] >>> keras.tree.map_structu |
| HIGH | keras/src/tree/tree_api.py | 217 | Maps `func` through given structures up to `shallow_structure`. This is a variant of `map_structure` which only map |
| HIGH | keras/src/tree/tree_api.py | 254 | Asserts that two structures are nested in the same way. This function verifies that the nested structures match. Th |
| HIGH | keras/src/tree/tree_api.py | 310 | Asserts that two structures have identical paths in their tree structure. This function verifies that two nested st |
| HIGH | keras/src/tree/tree_api.py | 339 | Returns a given flattened sequence packed into a given structure. If `structure` is an atom, `flat_sequence` must b |
| HIGH | keras/src/losses/losses.py | 2316 | Computes the sparse categorical crossentropy loss. Args: y_true: Ground truth values. y_pred: The p |
| HIGH | keras/src/layers/layer.py | 73 | This is the class from which all layers inherit. A layer is a callable object that takes as input one or more tenso |
| HIGH | keras/src/layers/core/einsum_dense.py | 945 | Performs int8 quantized einsum with a custom gradient. Computes the einsum operation with quantized inputs |
| HIGH | keras/src/layers/core/einsum_dense.py | 1615 | Parses an einsum string to determine the shapes of the weights. This function is the main entry point for analyzing |
| HIGH | keras/src/layers/core/einsum_dense.py | 1682 | Computes kernel and bias shapes from a parsed einsum equation. This function takes the components of an einsum equa |
| HIGH | keras/src/layers/convolutional/depthwise_conv2d.py | 7 | 2D depthwise convolution layer. Depthwise convolution is a type of convolution in which each input channel is c |
| HIGH | keras/src/layers/convolutional/depthwise_conv1d.py | 7 | 1D depthwise convolution layer. Depthwise convolution is a type of convolution in which each input channel is c |
| HIGH | keras/src/layers/convolutional/conv3d_transpose.py | 12 | 3D transposed convolution layer. The need for transposed convolutions generally arise from the desire to use a |
| HIGH | keras/src/layers/convolutional/conv1d.py | 8 | 1D convolution layer (e.g. temporal convolution). This layer creates a convolution kernel that is convolved with th |
| HIGH | keras/src/layers/convolutional/conv2d_transpose.py | 12 | 2D transposed convolution layer. The need for transposed convolutions generally arise from the desire to use a |
| HIGH | keras/src/layers/convolutional/conv3d.py | 7 | 3D convolution layer. This layer creates a convolution kernel that is convolved with the layer input over a 3D |
| HIGH | keras/src/layers/convolutional/conv2d.py | 7 | 2D convolution layer. This layer creates a convolution kernel that is convolved with the layer input over a 2D |
| HIGH | keras/src/layers/convolutional/conv1d_transpose.py | 12 | 1D transposed convolution layer. The need for transposed convolutions generally arise from the desire to use a |
| HIGH | keras/src/layers/preprocessing/stft_spectrogram.py | 14 | Layer to compute the Short-Time Fourier Transform (STFT) on a 1D signal. A layer that computes Spectrograms of the |
| HIGH | …ssing/image_preprocessing/bounding_boxes/converters.py | 14 | Converts bounding boxes between formats. Supported formats (case-insensitive): `"xyxy"`: [left, top, right, bot |
| HIGH | …ssing/image_preprocessing/bounding_boxes/converters.py | 265 | Encodes bounding boxes relative to anchors as deltas. This function calculates the deltas that represent the differ |
| HIGH | …ssing/image_preprocessing/bounding_boxes/converters.py | 357 | Converts bounding boxes from delta format to the specified `box_format`. This function decodes bounding box deltas |
| HIGH | keras/src/layers/merging/concatenate.py | 10 | Concatenates a list of inputs. It takes as input a list of tensors, all of the same shape except for the concat |
| HIGH | keras/src/layers/merging/add.py | 42 | Functional interface to the `keras.layers.Add` layer. Args: inputs: A list of input tensors with the same s |
| HIGH | keras/src/layers/merging/subtract.py | 53 | Functional interface to the `keras.layers.Subtract` layer. Args: inputs: A list of input tensors of size 2, |
| HIGH | keras/src/layers/merging/multiply.py | 63 | Functional interface to the `keras.layers.Multiply` layer. Args: inputs: A list of input tensors , all of t |
| HIGH | keras/src/layers/merging/maximum.py | 39 | Functional interface to the `keras.layers.Maximum` layer. Args: inputs: A list of input tensors , all of th |
| HIGH | keras/src/layers/merging/minimum.py | 39 | Functional interface to the `keras.layers.Minimum` layer. Args: inputs: A list of input tensors , all of th |
| HIGH | keras/src/layers/merging/average.py | 42 | Functional interface to the `keras.layers.Average` layer. Args: inputs: A list of input tensors , all of th |
| HIGH | keras/src/layers/merging/base_merge.py | 61 | Computes the shape of the resultant of an elementwise operation. Args: shape1: Tuple or None. Shape |
| HIGH | keras/src/callbacks/tensorboard_test.py | 65 | Read all summaries under the logdir into a `_SummaryFile`. Args: logdir: A path to a directory that contains |
| HIGH | keras/src/callbacks/tensorboard.py | 654 | Writes a Keras model as JSON to as a Summary. Writing the Keras model configuration allows the TensorBoard graph pl |
| HIGH | keras/src/quantizers/awq_core.py | 194 | Get group size from config or dtype policy. Args: layer: The layer to get group size for. config: O |
| HIGH | keras/src/quantizers/gptq_core.py | 369 | Determine the group size for GPTQ quantization. The group size can be specified either through the `config` argumen |
| HIGH | keras/src/quantizers/gptq_core.py | 410 | Determine the number of weight bits for GPTQ quantization. The number of weight bits can be specified either throug |
| HIGH | keras/src/distribution/distribution_lib.py | 394 | Create a distributed dataset from the original global dataset. Args: dataset: the original global d |
| HIGH | keras/src/distillation/distiller.py | 11 | Distillation model for transferring knowledge from teacher to student. Knowledge distillation transfers knowledge f |
| HIGH | keras/src/legacy/preprocessing/image.py | 1384 | Applies a transformation to an image according to given parameters. Args: x: 3D tensor, single imag |
| HIGH | keras/src/legacy/preprocessing/image.py | 1704 | Performs a brightness shift. DEPRECATED. Args: x: Input tensor. Must be 3D. brightness: Float. |
| HIGH | keras/src/legacy/preprocessing/image.py | 1735 | Performs a random brightness shift. DEPRECATED. Args: x: Input tensor. Must be 3D. brightness_ |
| HIGH | keras/src/legacy/saving/saving_utils.py | 24 | Instantiates a Keras model from its config. Args: config: Configuration dictionary. custom_objects: |
| HIGH | keras/src/legacy/saving/json_utils.py | 134 | Serializes any object to a JSON-serializable structure. Args: obj: the object to serialize Returns: |
| HIGH | keras/src/legacy/saving/legacy_h5_format.py | 81 | Loads a model saved via `save_model_to_hdf5`. Args: filepath: One of the following: - String, p |
| HIGH | keras/src/legacy/saving/legacy_h5_format.py | 577 | Load layer weights of a model from hdf5. Args: group: HDF5 group. Returns: List of NumPy array |
| HIGH | keras/src/backend/config.py | 46 | Set the default float dtype. Note: It is not recommended to set this to `"float16"` for training, as this will |
| HIGH | keras/src/backend/common/variables.py | 16 | Represents a backend-agnostic variable in Keras. A `Variable` acts as a container for state. It holds a tensor valu |
| HIGH | keras/src/backend/common/dtypes.py | 282 | Returns the type from applying the Keras type promotion rules. In general, each argument is first parsed by `backen |
| HIGH | keras/src/backend/jax/nn.py | 1580 | Applies a wrapped flash attention mechanism using the Splash kernel. This function prepares the appropriate attentio |
| HIGH | keras/src/optimizers/multi_optimizer.py | 37 | Retrieves the corresponding `Optimizer` by the string key. This method first attempts an exact key match. If no |
| HIGH | …ras/src/optimizers/schedules/learning_rate_schedule.py | 189 | A `LearningRateSchedule` that uses a piecewise constant decay schedule. The function returns a 1-arg callable to co |
| 69 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | conftest.py | 14 | |
| LOW | api_gen.py | 36 | |
| LOW | keras/src/visualization/draw_bounding_boxes.py | 17 | |
| LOW | keras/src/tree/dmtree_impl.py | 162 | |
| LOW | keras/src/tree/dmtree_impl.py | 244 | |
| LOW | keras/src/tree/torchtree_impl.py | 99 | |
| LOW | keras/src/losses/loss_test.py | 177 | |
| LOW | keras/src/losses/loss.py | 56 | |
| LOW | keras/src/layers/input_spec.py | 122 | |
| LOW | keras/src/layers/layer.py | 875 | |
| LOW | keras/src/layers/layer.py | 1375 | |
| LOW | keras/src/layers/layer.py | 1763 | |
| LOW | keras/src/layers/layer.py | 1889 | |
| LOW | keras/src/layers/activations/softmax.py | 55 | |
| LOW | …s/src/layers/attention/grouped_query_attention_test.py | 106 | |
| LOW | keras/src/layers/attention/multi_head_attention_test.py | 113 | |
| LOW | keras/src/layers/reshaping/cropping3d.py | 125 | |
| LOW | keras/src/layers/reshaping/cropping2d.py | 145 | |
| LOW | keras/src/layers/core/embedding.py | 261 | |
| LOW | keras/src/layers/core/embedding.py | 303 | |
| LOW | keras/src/layers/core/dense.py | 159 | |
| LOW | keras/src/layers/core/dense.py | 297 | |
| LOW | keras/src/layers/core/dense.py | 334 | |
| LOW | keras/src/layers/core/dense.py | 454 | |
| LOW | keras/src/layers/core/dense.py | 1031 | |
| LOW | keras/src/layers/core/einsum_dense.py | 238 | |
| LOW | keras/src/layers/core/einsum_dense.py | 380 | |
| LOW | keras/src/layers/core/einsum_dense.py | 417 | |
| LOW | keras/src/layers/core/einsum_dense.py | 543 | |
| LOW | keras/src/layers/core/einsum_dense.py | 584 | |
| LOW | keras/src/layers/core/einsum_dense.py | 700 | |
| LOW | keras/src/layers/core/einsum_dense.py | 1267 | |
| LOW | keras/src/layers/core/reversible_embedding.py | 383 | |
| LOW | keras/src/layers/convolutional/conv_transpose_test.py | 178 | |
| LOW | keras/src/layers/preprocessing/index_lookup.py | 645 | |
| LOW | keras/src/layers/preprocessing/index_lookup.py | 844 | |
| LOW | keras/src/layers/preprocessing/hashed_crossing.py | 138 | |
| LOW | keras/src/layers/preprocessing/discretization.py | 159 | |
| LOW | keras/src/layers/preprocessing/text_vectorization.py | 393 | |
| LOW | keras/src/layers/preprocessing/text_vectorization.py | 563 | |
| LOW | keras/src/layers/preprocessing/stft_spectrogram.py | 290 | |
| LOW | keras/src/layers/preprocessing/normalization.py | 251 | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 386 | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 462 | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 493 | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 580 | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 712 | |
| LOW | …ayers/preprocessing/image_preprocessing/center_crop.py | 184 | |
| LOW | …ssing/image_preprocessing/bounding_boxes/validation.py | 24 | |
| LOW | …ssing/image_preprocessing/bounding_boxes/validation.py | 118 | |
| LOW | keras/src/layers/merging/base_merge.py | 60 | |
| LOW | keras/src/layers/merging/base_merge.py | 143 | |
| LOW | keras/src/layers/rnn/bidirectional.py | 199 | |
| LOW | keras/src/layers/rnn/bidirectional.py | 309 | |
| LOW | keras/src/layers/rnn/bidirectional.py | 415 | |
| LOW | keras/src/layers/rnn/lstm.py | 529 | |
| LOW | keras/src/layers/rnn/gru.py | 547 | |
| LOW | keras/src/callbacks/callback_list.py | 59 | |
| LOW | keras/src/callbacks/swap_ema_weights.py | 116 | |
| LOW | keras/src/callbacks/reduce_lr_on_plateau.py | 99 | |
| 230 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | keras/src/activations/activations_test.py | 460 | # Define the input tensor |
| MEDIUM | keras/src/activations/activations_test.py | 471 | # Define the input tensor |
| MEDIUM | keras/src/activations/activations_test.py | 480 | # Define the input tensor |
| MEDIUM | keras/src/activations/activations_test.py | 489 | # Define the input tensor |
| MEDIUM | keras/src/activations/activations_test.py | 498 | # Define the input tensor |
| MEDIUM | keras/src/layers/layer.py | 161 | # Create the state of the layer (weights) |
| MEDIUM | keras/src/layers/layer.py | 201 | # Create a non-trainable weight. |
| MEDIUM | keras/src/layers/layer_test.py | 189 | # Create a mock to track calls to remat |
| MEDIUM | keras/src/layers/layer_test.py | 983 | # Create an input tensor WITHOUT an attached mask. |
| MEDIUM | keras/src/layers/layer_test.py | 987 | # Create a mask to be passed explicitly. |
| MEDIUM | keras/src/layers/preprocessing/text_vectorization.py | 172 | >>> # Create the layer. |
| MEDIUM | keras/src/layers/preprocessing/text_vectorization.py | 194 | >>> # Create the layer, passing the vocab directly. You can also pass the |
| MEDIUM | keras/src/layers/preprocessing/discretization_test.py | 406 | # Create a KerasTensor input |
| MEDIUM | …/src/layers/preprocessing/image_preprocessing/clahe.py | 58 | # Create a CLAHE layer with default parameters |
| MEDIUM | …yers/preprocessing/image_preprocessing/equalization.py | 48 | # Create an equalization layer for standard 8-bit images |
| MEDIUM | keras/src/callbacks/orbax_checkpoint_test.py | 220 | # Create a new model with the same architecture |
| MEDIUM | keras/src/callbacks/orbax_checkpoint.py | 171 | # Create the V1 Checkpointer with direct parameter passing |
| MEDIUM | keras/src/callbacks/model_checkpoint.py | 37 | # Define a learning rate schedule |
| MEDIUM | keras/src/callbacks/model_checkpoint.py | 97 | # Define a learning rate schedule |
| MEDIUM | keras/src/quantizers/quantizers_test.py | 146 | # Create a random tensor with int4 values in the specified range and |
| MEDIUM | keras/src/quantizers/quantizers_test.py | 552 | # Define the function to compute gradients for |
| MEDIUM | keras/src/quantizers/awq.py | 281 | # Create a temporary object that holds a reshaped 2D version |
| MEDIUM | keras/src/quantizers/gptq.py | 313 | # Create a temporary object that holds a reshaped |
| MEDIUM | keras/src/distribution/distribution_lib.py | 573 | # Create a mesh with 2 devices for data parallelism and 4 devices for |
| MEDIUM | keras/src/distribution/distribution_lib.py | 577 | # Create a layout map that shard the `Dense` layer and `Conv2D` |
| MEDIUM | keras/src/distillation/distiller_test.py | 130 | # Create a new teacher that is trainable and verify it gets frozen |
| MEDIUM | keras/src/utils/config.py | 26 | # Create a config via constructor arguments |
| MEDIUM | keras/src/utils/file_utils_test.py | 129 | # Creating a TarInfo-like object with a name attribute |
| MEDIUM | keras/src/utils/summary_utils.py | 351 | # Create a rich console for printing. Capture for non-interactive logging. |
| MEDIUM | keras/src/backend/openvino/core.py | 1322 | # Create a zeros tensor of the target shape. |
| MEDIUM | keras/src/backend/openvino/numpy.py | 1351 | # Create a slice of zeros with the same type as x |
| MEDIUM | keras/src/backend/openvino/trainer.py | 242 | # Create an iterator that yields batches of input data. |
| MEDIUM | keras/src/backend/torch/nn.py | 379 | # Create a real tensor to execute the ops. |
| MEDIUM | keras/src/backend/torch/trainer.py | 207 | # Create the validation data using the training data. Only supported |
| MEDIUM | keras/src/backend/torch/trainer.py | 224 | # Create an iterator that yields batches for one epoch. |
| MEDIUM | keras/src/backend/torch/trainer.py | 351 | # Create an iterator that yields batches of input/target data. |
| MEDIUM | keras/src/backend/torch/trainer.py | 401 | # Create an iterator that yields batches of input data. |
| MEDIUM | keras/src/backend/numpy/trainer.py | 176 | # Create an iterator that yields batches of input data. |
| MEDIUM | keras/src/backend/numpy/trainer.py | 246 | # Create an iterator that yields batches of input/target data. |
| MEDIUM | keras/src/backend/common/remat.py | 175 | # Define a simple model using the custom layer |
| MEDIUM | keras/src/backend/common/name_scope_test.py | 55 | # Create a name_scope instance |
| MEDIUM | keras/src/backend/common/name_scope_test.py | 72 | # Create a name_scope instance |
| MEDIUM | keras/src/backend/common/name_scope_test.py | 118 | # Create a name_scope but don't enter it |
| MEDIUM | keras/src/backend/common/remat_test.py | 118 | # Define a function that uses keyword arguments |
| MEDIUM | keras/src/backend/common/variables_test.py | 1277 | # Create a mock SymInt object |
| MEDIUM | keras/src/backend/common/symbolic_scope_test.py | 11 | # Define a function that behaves differently according to |
| MEDIUM | keras/src/backend/tensorflow/numpy.py | 3624 | # Create a smaller square eye and pad appropriately. |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 343 | # Create the validation data using the training data. Only supported |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 359 | # Create an iterator that yields batches for one epoch. |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 477 | # Create an iterator that yields batches of input/target data. |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 526 | # Create an iterator that yields batches of input data. |
| MEDIUM | keras/src/backend/jax/core.py | 414 | # Create a _DimExpr instance for one dimension by creating a symbolic |
| MEDIUM | keras/src/backend/jax/trainer.py | 50 | """This method is stateless and is intended for use with jax.grad.""" |
| MEDIUM | keras/src/backend/jax/trainer.py | 390 | # Create the validation data using the training data. Only supported |
| MEDIUM | keras/src/backend/jax/trainer.py | 406 | # Create an iterator that yields batches for one epoch. |
| MEDIUM | keras/src/backend/jax/trainer.py | 571 | # Create an iterator that yields batches of |
| MEDIUM | keras/src/backend/jax/trainer.py | 656 | # Create an iterator that yields batches of input data. |
| MEDIUM | keras/src/models/cloning.py | 81 | # Create a test Sequential model. |
| MEDIUM | keras/src/models/cloning.py | 87 | # Create a copy of the test model (with freshly initialized weights). |
| MEDIUM | keras/src/models/model.py | 504 | # Create a custom config |
| 43 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | keras/src/backend/jax/trainer_test.py | 33 | # ---------------------------------------------------------------- |
| MEDIUM | keras/src/backend/jax/trainer_test.py | 35 | # ---------------------------------------------------------------- |
| MEDIUM | keras/src/saving/file_editor.py | 458 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 460 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 469 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 471 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 574 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 576 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 579 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 581 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 488 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 490 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 517 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 519 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 540 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 542 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 561 | # ------------------------------------------------------ |
| MEDIUM | keras/src/saving/file_editor.py | 563 | # ------------------------------------------------------ |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | keras/src/wrappers/sklearn_test.py | 157 | except Exception as exc: |
| LOW | keras/src/wrappers/sklearn_test.py | 211 | except Exception as exc: |
| LOW | keras/src/layers/layer.py | 256 | except Exception: |
| LOW | keras/src/layers/layer.py | 1568 | except Exception as e: |
| LOW | keras/src/layers/normalization/group_normalization.py | 119 | except Exception: |
| LOW | keras/src/callbacks/orbax_checkpoint_test.py | 435 | except Exception: |
| LOW | keras/src/callbacks/orbax_checkpoint.py | 357 | except Exception: |
| LOW | keras/src/callbacks/tensorboard.py | 632 | except Exception as e: |
| LOW | keras/src/callbacks/tensorboard.py | 646 | except Exception as e: |
| LOW | keras/src/callbacks/tensorboard.py | 688 | except Exception as exc: |
| LOW | keras/src/utils/traceback_utils.py | 118 | except Exception as e: |
| LOW | keras/src/utils/traceback_utils.py | 157 | except Exception as e: |
| LOW | keras/src/backend/openvino/core.py | 627 | except Exception as e: |
| LOW | keras/src/backend/openvino/core.py | 889 | except Exception as e: |
| LOW | keras/src/backend/openvino/core.py | 931 | except Exception: |
| LOW | keras/src/backend/openvino/core.py | 949 | except Exception as inner_exception: |
| MEDIUM | keras/src/backend/openvino/core.py | 623 | def __array__(self, dtype=None): |
| LOW | keras/src/backend/openvino/numpy.py | 271 | except Exception: |
| LOW | keras/src/backend/openvino/numpy.py | 690 | except Exception: |
| LOW | keras/src/backend/openvino/numpy.py | 2623 | except Exception as e: |
| LOW | keras/src/backend/torch/core.py | 189 | except Exception: |
| MEDIUM | keras/src/backend/torch/core.py | 186 | def __eq__(self, other): |
| LOW | keras/src/backend/torch/rnn.py | 617 | except Exception: |
| LOW | keras/src/backend/torch/rnn.py | 807 | except Exception: |
| LOW | keras/src/backend/common/variables.py | 635 | except Exception as e: |
| LOW | keras/src/backend/jax/nn.py | 1793 | except Exception: |
| LOW | keras/src/backend/jax/nn.py | 1815 | except Exception: |
| LOW | keras/src/trainers/trainer.py | 1121 | except Exception as e: |
| LOW | keras/src/trainers/data_adapters/py_dataset_adapter.py | 639 | except Exception as e: |
| LOW | keras/src/trainers/data_adapters/py_dataset_adapter.py | 672 | except Exception as e: |
| LOW | keras/src/dtype_policies/dtype_policy_map.py | 229 | except Exception: |
| LOW | keras/src/ops/numpy.py | 7060 | except Exception: |
| LOW | keras/src/ops/operation.py | 102 | except Exception as e: |
| LOW | keras/src/ops/operation.py | 318 | except Exception as e: |
| MEDIUM | keras/src/ops/operation.py | 99 | def compute_output_spec(self, *args, **kwargs): |
| LOW | keras/src/ops/linalg.py | 47 | except Exception as e: |
| LOW | keras/src/ops/linalg.py | 93 | except Exception as e: |
| LOW | keras/src/saving/saving_lib.py | 692 | except Exception: |
| LOW | keras/src/saving/saving_lib.py | 799 | except Exception as e: |
| LOW | keras/src/saving/saving_lib.py | 811 | except Exception as e: |
| LOW | keras/src/export/openvino_test.py | 110 | except Exception as e: |
| LOW | keras/src/export/openvino_test.py | 165 | except Exception as e: |
| LOW | keras/src/export/openvino_test.py | 200 | except Exception as e: |
| LOW | keras/src/export/openvino_test.py | 233 | except Exception as e: |
| LOW | keras/src/export/onnx.py | 245 | except Exception: |
| LOW | keras/src/export/tf2onnx_lib.py | 129 | except Exception as ex: |
| LOW | keras/src/export/torch.py | 100 | except Exception as e: |
| LOW | keras/src/export/litert.py | 245 | except Exception as e: |
| LOW | integration_tests/pytorch_export_test.py | 102 | except Exception as e: |
| LOW | integration_tests/pytorch_export_test.py | 163 | except Exception as e: |
| LOW | integration_tests/pytorch_export_test.py | 179 | except Exception as e: |
| LOW | integration_tests/pytorch_export_test.py | 246 | except Exception as e: |
| LOW | integration_tests/pytorch_export_test.py | 297 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | keras/src/tree/dmtree_impl.py | 207 | # Check if the reference entry (first one) is None |
| LOW | keras/src/tree/torchtree_impl.py | 134 | # Check if the reference entry (first one) is None |
| LOW | keras/src/layers/core/embedding.py | 293 | # Check if the attribute exists on the instance before saving. |
| LOW | keras/src/layers/core/embedding.py | 327 | # Check if the attribute exists before attempting to assign. |
| LOW | keras/src/layers/core/einsum_dense.py | 1339 | # Assign values to the newly created variables. |
| LOW | keras/src/layers/normalization/batch_normalization.py | 335 | # Check if the mask has one less dimension than the inputs. |
| LOW | keras/src/layers/rnn/time_distributed.py | 79 | # Check if mask has at least 2 dimensions (batch and timesteps) |
| LOW | keras/src/callbacks/orbax_checkpoint.py | 196 | # Check if JAX distributed client is initialized |
| LOW | keras/src/distillation/distiller_test.py | 101 | # Check if the model has been compiled (different backends may handle |
| LOW | keras/src/legacy/saving/serialization.py | 362 | # Check if `cls_config` is a list. If it is a list, return the class and the |
| LOW | keras/src/utils/image_utils.py | 287 | # Set back to input height / width |
| LOW | keras/src/utils/image_utils.py | 401 | # Set back to input height / width if crop_height / crop_width is not |
| LOW | keras/src/backend/openvino/numpy.py | 2987 | # Check if k is odd |
| LOW | keras/src/backend/torch/rnn.py | 433 | # Check if mask is valid for cuDNN |
| LOW | keras/src/backend/jax/nn.py | 1480 | # Check if cuDNN is installed and raise RuntimeError if cuDNN is not |
| LOW | keras/src/models/model.py | 809 | # Check if LiteRT export is available (requires TensorFlow or |
| LOW | keras/src/models/model.py | 819 | # Check if Torch export is available (requires PyTorch backend) |
| LOW | keras/src/dtype_policies/dtype_policy.py | 604 | # Check if mode has block_size component (e.g., "int4/128") |
| LOW | keras/src/ops/ops_test.py | 56 | # Check if that function exist. Some classes are abstract super |
| LOW | keras/src/ops/function.py | 134 | # Check if input shapes are identical to ref input shapes, |
| LOW | keras/src/saving/file_editor.py | 29 | # Check if an active IPython shell exists. |
| LOW | keras/src/saving/serialization_lib_test.py | 446 | # Check if it resolves to the canonical keras activation function |
| LOW | keras/src/export/onnx.py | 249 | # Set verbose to False for TorchScript due to file system leakage |
| LOW | integration_tests/dataset_tests/imdb_test.py | 35 | # Check if top 10 words are skipped properly |
| LOW | integration_tests/dataset_tests/imdb_test.py | 46 | # Check if word_index contains specific known words |
| LOW | integration_tests/dataset_tests/reuters_test.py | 43 | # Check if word_index contains specific known words |
| LOW | integration_tests/dataset_tests/reuters_test.py | 49 | # Check if the tuple contains specific known labels |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | keras/src/tree/dmtree_impl.py | 1 | import collections |
| LOW | keras/src/metrics/confusion_metrics_test.py | 1161 | # without sample_weight: |
| LOW | keras/src/metrics/confusion_metrics_test.py | 1561 | # tn = [[0, 1, 2, 2, 2], [0, 2, 2, 2, 2]] |
| LOW | keras/src/metrics/metrics_utils.py | 141 | = ops.floor([0.2, 1.0, 0.6, 1.8]) |
| LOW | keras/src/layers/layer.py | 921 | ############################################ |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 441 | |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 461 | # # Same hashed output as test_hash_sparse_input_farmhash |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 481 | # empty_mask_output = empty_mask_layer(inp_data) |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 501 | # self.assertAllClose(expected_output[1], out_data[1]) |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 521 | |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 541 | # # Same hashed output as test_hash_sparse_input_farmhash |
| LOW | keras/src/layers/preprocessing/feature_space.py | 521 | for name in self._list_adaptable_preprocessors(): |
| LOW | …/preprocessing/image_preprocessing/center_crop_test.py | 181 | # np.random.rand(10, 10, 3), |
| LOW | keras/src/callbacks/callback.py | 81 | |
| LOW | keras/src/callbacks/tensorboard_test.py | 521 | # self.assertEqual( |
| LOW | keras/src/callbacks/tensorboard_test.py | 701 | # Dense(1), |
| LOW | keras/src/callbacks/tensorboard_test.py | 721 | |
| LOW | keras/src/distribution/distribution_lib_test.py | 561 | # # Config virtual devices for testing. |
| LOW | keras/src/distribution/distribution_lib_test.py | 581 | # shape = (4, 2) |
| LOW | keras/src/distribution/distribution_lib_test.py | 601 | # dtensor.Layout(["data", dtensor.UNSHARDED], dtensor_mesh), |
| LOW | keras/src/utils/model_visualization.py | 361 | # No nesting, connect directly. |
| LOW | keras/src/backend/torch/numpy.py | 181 | |
| LOW | keras/src/backend/common/dtypes.py | 121 | Returns: |
| LOW | keras/src/backend/tensorflow/random.py | 141 | dtype, |
| LOW | keras/src/backend/tensorflow/rnn.py | 901 | # after batch dim for time major or batch major inputs respectively |
| LOW | keras/src/optimizers/optimizer_sparse_test.py | 141 | ): |
| LOW | keras/src/trainers/data_adapters/array_data_adapter.py | 121 | # 2. parallelized map |
| LOW | keras/src/saving/saving_lib_test.py | 441 | self.assertIn("date_saved", metadata) |
| LOW | integration_tests/model_visualization_test.py | 321 | # | sub (Sequential) | |
| LOW | integration_tests/model_visualization_test.py | 381 | edge_dict = get_edge_dict(model_to_dot(model)) |
| LOW | integration_tests/model_visualization_test.py | 401 | # | v | |
| LOW | integration_tests/model_visualization_test.py | 441 | keras.layers.Dense(10, name="dense1"), |
| LOW | integration_tests/model_visualization_test.py | 481 | # | | inner v | | |
| LOW | integration_tests/model_visualization_test.py | 521 | model = keras.models.Sequential( |
| LOW | integration_tests/model_visualization_test.py | 561 | # | mid | | |
| LOW | integration_tests/model_visualization_test.py | 601 | |
| LOW | integration_tests/model_visualization_test.py | 641 | # | +-------------------------+ | |
| LOW | integration_tests/model_visualization_test.py | 721 | ) |
| LOW | integration_tests/model_visualization_test.py | 741 | { |
| LOW | integration_tests/model_visualization_test.py | 761 | # | | | dense0 | | | |inner_inp1t| |inner_inp2t| | | subclass3 | | |
| LOW | examples/demo_jax_distributed.py | 181 | # Use Keras APIs to find the variable of a specific layer (we will be sharding this one in a special way) |
| LOW | .github/workflows/labeler.yaml | 1 | # Copyright 2024 Google LLC. All Rights Reserved. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | keras/src/activations/__init__.py | 101 | # Case for keras.activations builtins (simply return name) |
| MEDIUM | keras/src/metrics/confusion_metrics.py | 1493 | # Due to the hyperbolic transform, this formula is less robust than |
| LOW | keras/src/layers/normalization/batch_normalization.py | 27 | # If we get a string or dict, just return as we cannot and should not clone. |
| MEDIUM | keras/src/layers/rnn/lstm.py | 548 | # TF for instance, it will leverage cuDNN when feasible, and |
| MEDIUM | keras/src/layers/rnn/gru.py | 566 | # TF for instance, it will leverage cuDNN when feasible, and |
| MEDIUM | keras/src/callbacks/orbax_checkpoint_test.py | 547 | """Test comprehensive model state restoration with exact weight |
| MEDIUM | keras/src/callbacks/early_stopping_test.py | 282 | # in conjunction with 'start_from_epoch'. |
| LOW | keras/src/legacy/saving/serialization.py | 241 | # already serialized this config. If so, just use that config. This will |
| LOW | keras/src/utils/text_dataset_utils_test.py | 72 | # We just return the texts, no labels |
| LOW | keras/src/backend/openvino/numpy.py | 2370 | # that ever changes, we could simplify this to just call that operation. |
| LOW | keras/src/backend/openvino/linalg.py | 594 | # If not continue_cond, just return A_curr and V_curr |
| MEDIUM | keras/src/backend/torch/core.py | 357 | # more robust, but more expensive. |
| MEDIUM | keras/src/backend/tensorflow/numpy.py | 333 | # Replace tf.einsum with custom ops to utilize hardware-accelerated |
| MEDIUM | keras/src/backend/tensorflow/numpy.py | 3729 | # unfortunately we can't leverage 'SAME' padding directly like |
| LOW | keras/src/trainers/data_adapters/py_dataset_adapter.py | 707 | # If a worker dies during init, the pool will just create a replacement. |
| MEDIUM | keras/src/ops/function.py | 155 | # Wrap `input_shape` into the structure of KerasTensor to utilize |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | keras/src/layers/preprocessing/text_vectorization.py | 182 | >>> # Now, the layer can map strings to integers -- you can use an |
| MEDIUM | keras/src/constraints/constraints.py | 17 | Here's a simple example of a non-negative weight constraint: |
| MEDIUM | keras/src/utils/dataset_utils.py | 63 | >>> # For a tf.data.Dataset, you can use .cardinality() |
| MEDIUM | keras/src/utils/dataset_utils.py | 66 | >>> # For a torch.utils.data.Dataset, you can use len() |
| MEDIUM | keras/src/initializers/initializer.py | 34 | Here's a simple example: a random normal initializer. |
| MEDIUM | guides/custom_train_step_in_torch.py | 210 | # Just use `fit` as usual -- you can use callbacks, etc. |
| MEDIUM | guides/understanding_masking_and_padding.py | 335 | Here's a simple example below: a layer that computes a softmax over the time dimension |
| LOW | guides/writing_a_custom_training_loop_in_torch.py | 119 | Also, don't forget to call `model.zero_grad()` before `loss.backward()`, or you won't |
| MEDIUM | guides/distributed_training_with_tensorflow.py | 184 | Here's a simple example: |
| MEDIUM | guides/custom_train_step_in_tensorflow.py | 195 | # Just use `fit` as usual -- you can use callbacks, etc. |
| MEDIUM | guides/custom_train_step_in_jax.py | 283 | # Just use `fit` as usual -- you can use callbacks, etc. |
| MEDIUM | guides/training_with_built_in_methods.py | 315 | Here's a simple example showing how to implement a `CategoricalTruePositives` metric |
| MEDIUM | guides/training_with_built_in_methods.py | 362 | (the one passed to `compile()`). Here's a simple example that adds activity |
| MEDIUM | guides/training_with_built_in_methods.py | 1075 | Here's a simple example saving a list of per-batch loss values during training: |
| MEDIUM | guides/functional_api.py | 60 | # Just for demonstration purposes. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | keras/src/layers/core/dense.py | 1167 | # Step 1: Dequantize kernel to float |
| LOW | keras/src/layers/core/dense.py | 1200 | # Step 2: Merge LoRA weights in float domain |
| LOW | keras/src/layers/core/dense.py | 1206 | # Step 3: Re-quantize the merged kernel |
| LOW | keras/src/quantizers/awq.py | 174 | # Step 1: Find optimal AWQ scales via grid search |
| LOW | keras/src/quantizers/awq.py | 182 | # Step 2: Apply AWQ scales by MULTIPLYING (expand salient weights) |
| LOW | keras/src/saving/saving_api.py | 402 | # Step 1: Load model_config to rebuild the model. |
| LOW | keras/src/saving/saving_api.py | 420 | # Step 2: Load pytree (arrays) with optional resharding. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | keras/src/tree/dmtree_impl.py | 24 | # non-sortable keys as unsupported (meaning behavior is undefined). |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | keras/src/utils/python_utils_test.py | 10 | def my_function(x, y=1, **kwargs): |
| LOW | keras/src/backend/jax/distribution_lib_test.py | 99 | def test_function(inputs, target_layout): |
| LOW | keras/src/backend/jax/distribution_lib_test.py | 125 | def test_function(inputs, target_layout): |