Deep Learning for humans
This report summarizes scanner evidence for keras-team/keras, a Python project with 64,363 GitHub stars. SynthScan examined 322,905 lines of code across 1029 source files, recording 7741 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 26.2 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 3719 finding(s).
Are imports declared and package/API names verified? 3665 finding(s).
Are wrappers, guards, and repeated structures necessary? 3469 finding(s).
Which changes need focused human review? 7741 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 7741 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 50 | def pytest_collection_modifyitems(config, items): | CODE |
| LOW | pip_build.py | 73 | def copy_source_to_build_directory(root_path): | CODE |
| LOW | api_gen.py | 23 | def copy_source_to_build_directory(root_path): | CODE |
| LOW | keras/src/api_export.py | 13 | def register_internal_serializable(path, symbol): | CODE |
| LOW | keras/src/activations/activations_test.py | 106 | def test_softmax_higher_dim_multiple_axes(self): | CODE |
| LOW | keras/src/activations/activations_test.py | 115 | def test_softmax_negative_axis(self): | CODE |
| LOW⚡ | keras/src/activations/activations_test.py | 151 | def test_log_softmax_higher_dim(self): | CODE |
| LOW⚡ | keras/src/activations/activations_test.py | 160 | def test_log_softmax_higher_dim_multiple_axes(self): | CODE |
| LOW⚡ | keras/src/activations/activations_test.py | 169 | def test_log_softmax_negative_axis(self): | CODE |
| LOW⚡ | keras/src/activations/activations_test.py | 177 | def test_temporal_log_softmax(self): | CODE |
| LOW⚡ | keras/src/activations/activations_test.py | 488 | def test_relu_combined_threshold_and_max_value(self): | CODE |
| LOW⚡ | keras/src/activations/activations_test.py | 497 | def test_relu_combined_all_parameters(self): | CODE |
| LOW | keras/src/activations/activations_test.py | 514 | def test_relu_to_trigger_leaky(self): | CODE |
| LOW | keras/src/visualization/plot_bounding_box_gallery.py | 18 | def plot_bounding_box_gallery( | CODE |
| LOW | …as/src/visualization/plot_segmentation_mask_gallery.py | 15 | def plot_segmentation_mask_gallery( | CODE |
| LOW | keras/src/tree/dmtree_impl.py | 162 | def _recursive_flatten_with_path(path, structure, flattened): | CODE |
| LOW | keras/src/tree/torchtree_impl.py | 32 | def _dict_to_ordered_dict_with_changed(structure): | CODE |
| LOW | keras/src/tree/torchtree_impl.py | 175 | def func_with_check_without_shallow_structure(shallow, *args): | CODE |
| LOW | keras/src/tree/tree_test.py | 163 | def test_is_nested_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 430 | def test_flatten_with_path_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 587 | def test_nested_dict_key_order(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 610 | def test_pack_sequence_as_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 636 | def test_map_structure_with_one_structure(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 770 | def test_map_structure_with_one_structure_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 799 | def test_map_structure_with_multiple_structures(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 1127 | def test_map_structure_with_multiple_structures_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 1209 | def test_assert_same_structure(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 1564 | def test_assert_same_structure_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 1801 | def test_assert_same_paths_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 2086 | def test_traverse_top_down_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 2410 | def test_traverse_bottom_up_tf_wrappers(self, t): | CODE |
| LOW | keras/src/tree/tree_test.py | 2533 | def test_traverse_torch_compile_fullgraph(self, t): | CODE |
| LOW | keras/src/tree/optree_impl.py | 122 | def func_with_check_without_shallow_structure(shallow, *args): | CODE |
| LOW⚡ | keras/src/metrics/confusion_metrics_test.py | 727 | def test_unweighted_all_correct(self): | CODE |
| LOW⚡ | keras/src/metrics/confusion_metrics_test.py | 734 | def test_unweighted_high_specificity(self): | CODE |
| LOW⚡ | keras/src/metrics/confusion_metrics_test.py | 744 | def test_unweighted_low_specificity(self): | CODE |
| LOW⚡ | keras/src/metrics/confusion_metrics_test.py | 829 | def test_unweighted_all_correct(self): | CODE |
| LOW⚡ | keras/src/metrics/confusion_metrics_test.py | 837 | def test_unweighted_high_sensitivity(self): | CODE |
| LOW⚡ | keras/src/metrics/confusion_metrics_test.py | 847 | def test_unweighted_low_sensitivity(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 54 | def test_unweighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 72 | def test_weighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 148 | def test_unweighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 166 | def test_weighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 237 | def test_unweighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 255 | def test_weighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 326 | def test_unweighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 344 | def test_weighted_with_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 407 | def test_unweighted_all_incorrect(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 436 | def test_unweighted_with_threshold(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 443 | def test_weighted_with_threshold(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 504 | def test_unweighted_class_id_multiclass(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 532 | def test_unweighted_top_k_and_threshold(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 572 | def test_unweighted_all_incorrect(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 599 | def test_unweighted_with_threshold(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 605 | def test_weighted_with_threshold(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 665 | def test_unweighted_class_id_multiclass(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 693 | def test_unweighted_top_k_and_threshold(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 784 | def test_invalid_num_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 887 | def test_invalid_num_thresholds(self): | CODE |
| LOW | keras/src/metrics/confusion_metrics_test.py | 913 | def test_unweighted_all_correct(self): | CODE |
| 2861 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | pip_build.py | 29 | CODE | |
| LOW | keras/__init__.py | 9 | CODE | |
| LOW | keras/__init__.py | 10 | CODE | |
| LOW | keras/api/__init__.py | 7 | CODE | |
| LOW | keras/api/__init__.py | 8 | CODE | |
| LOW | keras/api/__init__.py | 9 | CODE | |
| LOW | keras/api/__init__.py | 10 | CODE | |
| LOW | keras/api/__init__.py | 11 | CODE | |
| LOW | keras/api/__init__.py | 12 | CODE | |
| LOW | keras/api/__init__.py | 13 | CODE | |
| LOW | keras/api/__init__.py | 14 | CODE | |
| LOW | keras/api/__init__.py | 15 | CODE | |
| LOW | keras/api/__init__.py | 16 | CODE | |
| LOW | keras/api/__init__.py | 17 | CODE | |
| LOW | keras/api/__init__.py | 18 | CODE | |
| LOW | keras/api/__init__.py | 19 | CODE | |
| LOW | keras/api/__init__.py | 20 | CODE | |
| LOW | keras/api/__init__.py | 21 | CODE | |
| LOW | keras/api/__init__.py | 22 | CODE | |
| LOW | keras/api/__init__.py | 23 | CODE | |
| LOW | keras/api/__init__.py | 24 | CODE | |
| LOW | keras/api/__init__.py | 25 | CODE | |
| LOW | keras/api/__init__.py | 26 | CODE | |
| LOW | keras/api/__init__.py | 27 | CODE | |
| LOW | keras/api/__init__.py | 28 | CODE | |
| LOW | keras/api/__init__.py | 29 | CODE | |
| LOW | keras/api/__init__.py | 30 | CODE | |
| LOW | keras/api/__init__.py | 31 | CODE | |
| LOW | keras/api/__init__.py | 32 | CODE | |
| LOW | keras/api/__init__.py | 33 | CODE | |
| LOW | keras/api/__init__.py | 34 | CODE | |
| LOW | keras/api/__init__.py | 35 | CODE | |
| LOW | keras/api/__init__.py | 36 | CODE | |
| LOW | keras/api/__init__.py | 37 | CODE | |
| LOW | keras/api/__init__.py | 38 | CODE | |
| LOW | keras/api/__init__.py | 39 | CODE | |
| LOW | keras/api/__init__.py | 40 | CODE | |
| LOW | keras/api/__init__.py | 41 | CODE | |
| LOW | keras/api/__init__.py | 42 | CODE | |
| LOW | keras/api/__init__.py | 43 | CODE | |
| LOW | keras/api/__init__.py | 46 | CODE | |
| LOW | keras/api/__init__.py | 49 | CODE | |
| LOW | keras/api/__init__.py | 50 | CODE | |
| LOW | keras/api/__init__.py | 53 | CODE | |
| LOW | keras/api/__init__.py | 54 | CODE | |
| LOW | keras/api/__init__.py | 55 | CODE | |
| LOW | keras/api/__init__.py | 56 | CODE | |
| LOW | keras/api/__init__.py | 57 | CODE | |
| LOW | keras/api/__init__.py | 58 | CODE | |
| LOW | keras/api/__init__.py | 59 | CODE | |
| LOW | keras/api/__init__.py | 60 | CODE | |
| LOW | keras/api/__init__.py | 61 | CODE | |
| LOW | keras/api/__init__.py | 62 | CODE | |
| LOW | keras/api/__init__.py | 63 | CODE | |
| LOW | keras/api/__init__.py | 64 | CODE | |
| LOW | keras/api/__init__.py | 65 | CODE | |
| LOW | keras/api/__init__.py | 66 | CODE | |
| LOW | keras/api/__init__.py | 67 | CODE | |
| LOW | keras/api/activations/__init__.py | 7 | CODE | |
| LOW | keras/api/activations/__init__.py | 8 | CODE | |
| 3600 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 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. | STRING |
| 184 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | keras/src/activations/activations.py | 8 | Applies the rectified linear unit activation function. With default values, this returns the standard ReLU activati | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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_ | STRING |
| 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_ | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | keras/src/tree/tree_api.py | 177 | Maps `func` through given structures. Examples: >>> structure = [[1], [2], [3]] >>> keras.tree.map_structu | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | keras/src/losses/losses.py | 2697 | Computes the sparse categorical crossentropy loss. Args: y_true: Ground truth values. y_pred: The p | STRING |
| HIGH | keras/src/layers/layer.py | 78 | This is the class from which all layers inherit. A layer is a callable object that takes as input one or more tenso | STRING |
| HIGH | keras/src/layers/core/einsum_dense.py | 646 | Parses an einsum string to determine the shapes of the weights. This function is the main entry point for analyzing | STRING |
| HIGH | keras/src/layers/core/einsum_dense.py | 713 | Computes kernel and bias shapes from a parsed einsum equation. This function takes the components of an einsum equa | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | …ssing/image_preprocessing/bounding_boxes/converters.py | 14 | Converts bounding boxes between formats. Supported formats (case-insensitive): `"xyxy"`: [left, top, right, bot | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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, | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| 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 | STRING |
| HIGH | keras/src/callbacks/tensorboard.py | 660 | Writes a Keras model as JSON to as a Summary. Writing the Keras model configuration allows the TensorBoard graph pl | STRING |
| HIGH | keras/src/distillation/distiller.py | 12 | Distillation model for transferring knowledge from teacher to student. Knowledge distillation transfers knowledge f | STRING |
| HIGH | keras/src/legacy/preprocessing/image.py | 1385 | Applies a transformation to an image according to given parameters. Args: x: 3D tensor, single imag | STRING |
| HIGH | keras/src/legacy/preprocessing/image.py | 1705 | Performs a brightness shift. DEPRECATED. Args: x: Input tensor. Must be 3D. brightness: Float. | STRING |
| HIGH | keras/src/legacy/preprocessing/image.py | 1736 | Performs a random brightness shift. DEPRECATED. Args: x: Input tensor. Must be 3D. brightness_ | STRING |
| HIGH | keras/src/legacy/saving/saving_utils.py | 24 | Instantiates a Keras model from its config. Args: config: Configuration dictionary. custom_objects: | STRING |
| HIGH | keras/src/legacy/saving/json_utils.py | 134 | Serializes any object to a JSON-serializable structure. Args: obj: the object to serialize Returns: | STRING |
| 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 | STRING |
| HIGH | keras/src/legacy/saving/legacy_h5_format.py | 579 | Load layer weights of a model from hdf5. Args: group: HDF5 group. Returns: List of NumPy array | STRING |
| HIGH | keras/src/backend/config.py | 54 | Set the default float dtype. Note: It is not recommended to set this to `"float16"` for training, as this will | STRING |
| 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 | STRING |
| HIGH | keras/src/backend/common/dtypes.py | 286 | Returns the type from applying the Keras type promotion rules. In general, each argument is first parsed by `backen | STRING |
| HIGH | keras/src/backend/jax/ops/nn.py | 1596 | Applies a wrapped flash attention mechanism using the Splash kernel. This function prepares the appropriate attentio | STRING |
| 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 | STRING |
| HIGH | …ras/src/optimizers/schedules/learning_rate_schedule.py | 191 | A `LearningRateSchedule` that uses a piecewise constant decay schedule. The function returns a 1-arg callable to co | STRING |
| HIGH | keras/src/dtype_policies/dtype_policy_map.py | 126 | Retrieves the corresponding `DTypePolicy` by the string key. This method first attempts an exact key match. If | STRING |
| HIGH | keras/src/applications/imagenet_utils.py | 19 | Preprocesses a tensor or Numpy array encoding a batch of images. Usage example with `applications.MobileNet`: ` | STRING |
| HIGH | keras/src/applications/imagenet_utils.py | 118 | Decodes the prediction of an ImageNet model. Args: preds: NumPy array encoding a batch of predictions. | STRING |
| HIGH | keras/src/applications/imagenet_utils.py | 304 | Internal utility to compute/validate a model's input shape. Args: input_shape: Either None (will return the d | STRING |
| HIGH | keras/src/applications/convnext.py | 223 | ConvNeXt block. References: - https://arxiv.org/abs/2201.03545 - https://github.com/facebookresearch/ConvNe | STRING |
| 68 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | conftest.py | 19 | CODE | |
| LOW | api_gen.py | 36 | CODE | |
| LOW | keras/src/visualization/draw_bounding_boxes.py | 17 | CODE | |
| LOW | keras/src/tree/dmtree_impl.py | 162 | CODE | |
| LOW | keras/src/tree/dmtree_impl.py | 244 | CODE | |
| LOW | keras/src/tree/torchtree_impl.py | 119 | CODE | |
| LOW | keras/src/losses/loss.py | 56 | CODE | |
| LOW | keras/src/losses/losses.py | 1309 | CODE | |
| LOW | keras/src/layers/input_spec.py | 122 | CODE | |
| LOW | keras/src/layers/layer.py | 902 | CODE | |
| LOW | keras/src/layers/layer.py | 1130 | CODE | |
| LOW | keras/src/layers/layer.py | 2089 | CODE | |
| LOW | keras/src/layers/activations/softmax.py | 55 | CODE | |
| LOW | …s/src/layers/attention/grouped_query_attention_test.py | 106 | CODE | |
| LOW | keras/src/layers/attention/multi_head_attention_test.py | 113 | CODE | |
| LOW | keras/src/layers/reshaping/cropping3d.py | 125 | CODE | |
| LOW | keras/src/layers/reshaping/cropping2d.py | 145 | CODE | |
| LOW | keras/src/layers/core/embedding.py | 261 | CODE | |
| LOW | keras/src/layers/core/embedding.py | 308 | CODE | |
| LOW | keras/src/layers/core/dense.py | 254 | CODE | |
| LOW | keras/src/layers/core/dense.py | 316 | CODE | |
| LOW | keras/src/layers/core/embedding_test.py | 722 | CODE | |
| LOW | keras/src/layers/core/dense_test.py | 1196 | CODE | |
| LOW | keras/src/layers/core/einsum_dense.py | 337 | CODE | |
| LOW | keras/src/layers/core/einsum_dense.py | 399 | CODE | |
| LOW | keras/src/layers/core/einsum_dense_test.py | 1415 | CODE | |
| LOW | keras/src/layers/convolutional/conv_transpose_test.py | 178 | CODE | |
| LOW | keras/src/layers/preprocessing/index_lookup.py | 653 | CODE | |
| LOW | keras/src/layers/preprocessing/index_lookup.py | 866 | CODE | |
| LOW | keras/src/layers/preprocessing/hashed_crossing.py | 138 | CODE | |
| LOW | keras/src/layers/preprocessing/discretization.py | 167 | CODE | |
| LOW | keras/src/layers/preprocessing/text_vectorization.py | 401 | CODE | |
| LOW | keras/src/layers/preprocessing/text_vectorization.py | 585 | CODE | |
| LOW | keras/src/layers/preprocessing/stft_spectrogram.py | 290 | CODE | |
| LOW | keras/src/layers/preprocessing/normalization.py | 252 | CODE | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 387 | CODE | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 463 | CODE | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 494 | CODE | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 628 | CODE | |
| LOW | keras/src/layers/preprocessing/feature_space.py | 760 | CODE | |
| LOW | …ayers/preprocessing/image_preprocessing/center_crop.py | 191 | CODE | |
| LOW | …ssing/image_preprocessing/bounding_boxes/validation.py | 24 | CODE | |
| LOW | …ssing/image_preprocessing/bounding_boxes/validation.py | 124 | CODE | |
| LOW | keras/src/layers/merging/base_merge.py | 60 | CODE | |
| LOW | keras/src/layers/merging/base_merge.py | 143 | CODE | |
| LOW | keras/src/layers/rnn/bidirectional.py | 199 | CODE | |
| LOW | keras/src/layers/rnn/bidirectional.py | 309 | CODE | |
| LOW | keras/src/layers/rnn/bidirectional.py | 415 | CODE | |
| LOW | keras/src/layers/rnn/lstm.py | 529 | CODE | |
| LOW | keras/src/layers/rnn/gru.py | 547 | CODE | |
| LOW | keras/src/callbacks/callback_list.py | 59 | CODE | |
| LOW | keras/src/callbacks/swap_ema_weights.py | 116 | CODE | |
| LOW | keras/src/callbacks/reduce_lr_on_plateau.py | 99 | CODE | |
| LOW | keras/src/callbacks/orbax_checkpoint.py | 301 | CODE | |
| LOW | keras/src/callbacks/model_checkpoint.py | 255 | CODE | |
| LOW | keras/src/callbacks/model_checkpoint.py | 388 | CODE | |
| LOW | keras/src/callbacks/monitor_callback.py | 62 | CODE | |
| LOW | keras/src/callbacks/tensorboard_test.py | 64 | CODE | |
| LOW | keras/src/callbacks/tensorboard_test.py | 663 | CODE | |
| LOW | keras/src/callbacks/tensorboard.py | 156 | CODE | |
| 224 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | keras/src/activations/activations_test.py | 460 | # Define the input tensor | COMMENT |
| MEDIUM⚡ | keras/src/activations/activations_test.py | 471 | # Define the input tensor | COMMENT |
| MEDIUM⚡ | keras/src/activations/activations_test.py | 480 | # Define the input tensor | COMMENT |
| MEDIUM⚡ | keras/src/activations/activations_test.py | 489 | # Define the input tensor | COMMENT |
| MEDIUM⚡ | keras/src/activations/activations_test.py | 498 | # Define the input tensor | COMMENT |
| MEDIUM | keras/src/layers/layer.py | 166 | # Create the state of the layer (weights) | STRING |
| MEDIUM | keras/src/layers/layer.py | 206 | # Create a non-trainable weight. | STRING |
| MEDIUM | keras/src/layers/layer_test.py | 188 | # Create a mock to track calls to remat | COMMENT |
| MEDIUM | keras/src/layers/layer_test.py | 1098 | # Create an input tensor WITHOUT an attached mask. | COMMENT |
| MEDIUM | keras/src/layers/layer_test.py | 1102 | # Create a mask to be passed explicitly. | COMMENT |
| MEDIUM | keras/src/layers/preprocessing/text_vectorization.py | 180 | >>> # Create the layer. | STRING |
| MEDIUM | keras/src/layers/preprocessing/text_vectorization.py | 202 | >>> # Create the layer, passing the vocab directly. You can also pass the | STRING |
| MEDIUM | keras/src/layers/preprocessing/discretization_test.py | 407 | # Create a KerasTensor input | COMMENT |
| MEDIUM | …/src/layers/preprocessing/image_preprocessing/clahe.py | 58 | # Create a CLAHE layer with default parameters | STRING |
| MEDIUM | …yers/preprocessing/image_preprocessing/equalization.py | 48 | # Create an equalization layer for standard 8-bit images | STRING |
| MEDIUM | keras/src/callbacks/orbax_checkpoint_test.py | 220 | # Create a new model with the same architecture | COMMENT |
| MEDIUM | keras/src/callbacks/orbax_checkpoint.py | 171 | # Create the V1 Checkpointer with direct parameter passing | COMMENT |
| MEDIUM | keras/src/callbacks/model_checkpoint.py | 37 | # Define a learning rate schedule | STRING |
| MEDIUM | keras/src/callbacks/model_checkpoint.py | 97 | # Define a learning rate schedule | STRING |
| MEDIUM | keras/src/quantizers/quantizers_test.py | 199 | # Create a random tensor with int4 values in the specified range and | COMMENT |
| MEDIUM | keras/src/quantizers/awq.py | 462 | # Create a temporary object that holds a reshaped 2D version | COMMENT |
| MEDIUM | keras/src/quantizers/gptq.py | 335 | # Create a temporary object that holds a reshaped | COMMENT |
| MEDIUM | keras/src/distribution/distribution_lib.py | 553 | # Create a mesh with 2 devices for data parallelism and 4 devices for | STRING |
| MEDIUM | keras/src/distribution/distribution_lib.py | 557 | # Create a layout map that shard the `Dense` layer and `Conv2D` | STRING |
| MEDIUM | keras/src/distillation/distiller_test.py | 130 | # Create a new teacher that is trainable and verify it gets frozen | COMMENT |
| MEDIUM | keras/src/utils/config.py | 26 | # Create a config via constructor arguments | STRING |
| MEDIUM | keras/src/utils/file_utils_test.py | 136 | # Creating a TarInfo-like object with a name attribute | COMMENT |
| MEDIUM | keras/src/utils/summary_utils.py | 351 | # Create a rich console for printing. Capture for non-interactive logging. | COMMENT |
| MEDIUM | …backend/torch/torch_multi_process_distribution_test.py | 163 | # Create a dataset with range, so that we can verify the numerical | COMMENT |
| MEDIUM | keras/src/backend/torch/trainer.py | 322 | # Create the validation data using the training data. Only supported | COMMENT |
| MEDIUM | keras/src/backend/torch/trainer.py | 339 | # Create an iterator that yields batches for one epoch. | COMMENT |
| MEDIUM | keras/src/backend/torch/trainer.py | 466 | # Create an iterator that yields batches of input/target data. | COMMENT |
| MEDIUM | keras/src/backend/torch/trainer.py | 516 | # Create an iterator that yields batches of input data. | COMMENT |
| MEDIUM | keras/src/backend/torch/ops/nn.py | 421 | # Create a real tensor to execute the ops. | COMMENT |
| MEDIUM | keras/src/backend/numpy/trainer.py | 172 | # Create an iterator that yields batches of input data. | COMMENT |
| MEDIUM | keras/src/backend/numpy/trainer.py | 242 | # Create an iterator that yields batches of input/target data. | COMMENT |
| MEDIUM | keras/src/backend/common/remat.py | 177 | # Define a simple model using the custom layer | STRING |
| MEDIUM | keras/src/backend/common/name_scope_test.py | 55 | # Create a name_scope instance | COMMENT |
| MEDIUM | keras/src/backend/common/name_scope_test.py | 72 | # Create a name_scope instance | COMMENT |
| MEDIUM | keras/src/backend/common/name_scope_test.py | 118 | # Create a name_scope but don't enter it | COMMENT |
| MEDIUM | keras/src/backend/common/remat_test.py | 123 | # Define a function that uses keyword arguments | COMMENT |
| MEDIUM | keras/src/backend/common/variables_test.py | 1264 | # Create a mock SymInt object | COMMENT |
| MEDIUM | keras/src/backend/common/symbolic_scope_test.py | 11 | # Define a function that behaves differently according to | COMMENT |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 344 | # Create the validation data using the training data. Only supported | COMMENT |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 360 | # Create an iterator that yields batches for one epoch. | COMMENT |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 477 | # Create an iterator that yields batches of input/target data. | COMMENT |
| MEDIUM | keras/src/backend/tensorflow/trainer.py | 526 | # Create an iterator that yields batches of input data. | COMMENT |
| MEDIUM | keras/src/backend/tensorflow/ops/numpy.py | 3801 | # Create a smaller square eye and pad appropriately. | COMMENT |
| MEDIUM | …src/backend/jax/jax_multi_process_distribution_test.py | 97 | # Create a dataset with range, so that we can verify the numerical | COMMENT |
| MEDIUM | keras/src/backend/jax/trainer.py | 146 | """This method is stateless and is intended for use with jax.grad.""" | STRING |
| MEDIUM | keras/src/backend/jax/trainer.py | 455 | # Create the validation data using the training data. Only supported | COMMENT |
| MEDIUM | keras/src/backend/jax/trainer.py | 471 | # Create an iterator that yields batches for one epoch. | COMMENT |
| MEDIUM | keras/src/backend/jax/trainer.py | 636 | # Create an iterator that yields batches of | COMMENT |
| MEDIUM | keras/src/backend/jax/trainer.py | 721 | # Create an iterator that yields batches of input data. | COMMENT |
| MEDIUM | keras/src/backend/jax/ops/core.py | 462 | # Create a _DimExpr instance for one dimension by creating a symbolic | COMMENT |
| MEDIUM | keras/src/models/model_test.py | 997 | # Create the parameter lists before quantization. | COMMENT |
| MEDIUM | keras/src/models/cloning.py | 81 | # Create a test Sequential model. | STRING |
| MEDIUM | keras/src/models/cloning.py | 87 | # Create a copy of the test model (with freshly initialized weights). | STRING |
| MEDIUM | keras/src/models/model.py | 554 | # Create a custom config | STRING |
| MEDIUM | …/src/trainers/data_adapters/tf_dataset_adapter_test.py | 194 | # Create a tf.data Dataset from the input data and two target outputs | COMMENT |
| 25 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | pip_build.py | 30 | except ImportError: | CODE |
| HIGH | keras/src/activations/activations.py | 164 | except AttributeError: | CODE |
| HIGH | keras/src/activations/activations.py | 503 | except AttributeError: | CODE |
| HIGH | keras/src/tree/optree_impl.py | 37 | except ValueError: | CODE |
| HIGH | keras/src/layers/layer_test.py | 771 | except RuntimeError: | CODE |
| HIGH | keras/src/layers/attention/multi_head_attention_test.py | 1014 | except: | CODE |
| HIGH | keras/src/layers/attention/multi_head_attention_test.py | 1039 | except: | CODE |
| HIGH | keras/src/layers/rnn/bidirectional.py | 209 | except NotImplementedError: | CODE |
| HIGH | keras/src/layers/rnn/bidirectional.py | 214 | except NotImplementedError: | CODE |
| HIGH | keras/src/layers/rnn/lstm.py | 579 | except NotImplementedError: | CODE |
| HIGH | keras/src/layers/rnn/gru.py | 595 | except NotImplementedError: | CODE |
| HIGH | keras/src/callbacks/orbax_checkpoint_test.py | 435 | except Exception: | CODE |
| HIGH | keras/src/callbacks/orbax_checkpoint_test.py | 504 | except: | CODE |
| HIGH | keras/src/callbacks/orbax_checkpoint.py | 23 | except ImportError: | CODE |
| HIGH | keras/src/legacy/saving/json_utils.py | 126 | except ValueError: | CODE |
| HIGH | keras/src/legacy/saving/serialization.py | 214 | except TypeError: | CODE |
| HIGH | keras/src/utils/model_visualization.py | 114 | except (ValueError, AttributeError): | CODE |
| HIGH | keras/src/utils/model_visualization.py | 149 | except (ValueError, AttributeError): | CODE |
| HIGH | keras/src/utils/model_visualization.py | 528 | except ImportError: | CODE |
| HIGH | keras/src/utils/summary_utils_test.py | 42 | except ImportError: | CODE |
| HIGH | keras/src/utils/numerical_utils.py | 154 | except ValueError: | CODE |
| HIGH | keras/src/utils/python_utils.py | 179 | except: | CODE |
| HIGH | keras/src/backend/config.py | 342 | except OSError: | CODE |
| HIGH | keras/src/backend/config.py | 357 | except IOError: | CODE |
| HIGH | keras/src/backend/torch/rnn.py | 617 | except Exception: | CODE |
| HIGH | keras/src/backend/torch/rnn.py | 807 | except Exception: | CODE |
| HIGH | keras/src/backend/torch/ops/core.py | 815 | except (TypeError, RuntimeError): | CODE |
| HIGH | keras/src/backend/torch/ops/numpy.py | 163 | except RuntimeError: | CODE |
| HIGH | keras/src/backend/common/variables.py | 404 | except: | CODE |
| HIGH | keras/src/backend/tensorflow/trackable.py | 21 | except AttributeError: | CODE |
| HIGH | keras/src/backend/tensorflow/ops/core.py | 208 | except: | CODE |
| HIGH | keras/src/backend/jax/ops/core.py | 340 | except ValueError: | CODE |
| HIGH | keras/src/backend/jax/ops/linalg.py | 23 | except jax.errors.TracerBoolConversionError: | CODE |
| HIGH | keras/src/models/model.py | 758 | except: | CODE |
| HIGH | keras/src/models/model.py | 770 | except: | CODE |
| HIGH | keras/src/models/functional.py | 407 | except ValueError: | CODE |
| HIGH | keras/src/trainers/trainer_test.py | 2010 | except: | CODE |
| HIGH | keras/src/trainers/data_adapters/py_dataset_adapter.py | 166 | except NotImplementedError: | CODE |
| HIGH | keras/src/trainers/data_adapters/py_dataset_adapter.py | 740 | except queue.Empty: | CODE |
| HIGH | keras/src/trainers/data_adapters/py_dataset_adapter.py | 751 | except queue.Empty: | CODE |
| HIGH | keras/src/trainers/data_adapters/data_adapter_utils.py | 543 | except StopIteration: | CODE |
| HIGH | keras/src/trainers/data_adapters/data_adapter_utils.py | 570 | except (ValueError, RuntimeError): | CODE |
| HIGH | keras/src/ops/operation.py | 244 | except RecursionError: | CODE |
| HIGH | keras/src/export/onnx.py | 284 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/visualization/plot_bounding_box_gallery.py | 18 | CODE | |
| LOW | …as/src/visualization/plot_segmentation_mask_gallery.py | 15 | CODE | |
| LOW | keras/src/visualization/plot_image_gallery.py | 45 | CODE | |
| LOW | keras/src/metrics/confusion_metrics.py | 1189 | CODE | |
| LOW | keras/src/losses/losses.py | 903 | CODE | |
| LOW | keras/src/losses/losses.py | 1164 | CODE | |
| LOW | keras/src/losses/losses.py | 1281 | CODE | |
| LOW | keras/src/layers/input_spec.py | 51 | CODE | |
| LOW | keras/src/layers/layer.py | 522 | CODE | |
| LOW | keras/src/layers/attention/grouped_query_attention.py | 102 | CODE | |
| LOW | keras/src/layers/attention/grouped_query_attention.py | 256 | CODE | |
| LOW | keras/src/layers/attention/grouped_query_attention.py | 612 | CODE | |
| LOW | keras/src/layers/attention/multi_head_attention.py | 114 | CODE | |
| LOW | keras/src/layers/attention/multi_head_attention.py | 611 | CODE | |
| LOW | keras/src/layers/attention/multi_head_attention.py | 867 | CODE | |
| LOW | keras/src/layers/core/ternary_dense.py | 110 | CODE | |
| LOW | keras/src/layers/core/embedding.py | 81 | CODE | |
| LOW | keras/src/layers/core/dense.py | 77 | CODE | |
| LOW | keras/src/layers/core/input_layer.py | 146 | CODE | |
| LOW | keras/src/layers/core/input_layer.py | 11 | CODE | |
| LOW | keras/src/layers/core/einsum_dense.py | 120 | CODE | |
| LOW | keras/src/layers/normalization/batch_normalization.py | 160 | CODE | |
| LOW | keras/src/layers/normalization/layer_normalization.py | 106 | CODE | |
| LOW | keras/src/layers/normalization/group_normalization.py | 67 | CODE | |
| LOW | keras/src/layers/convolutional/base_depthwise_conv.py | 83 | CODE | |
| LOW | keras/src/layers/convolutional/depthwise_conv2d.py | 101 | CODE | |
| LOW | keras/src/layers/convolutional/depthwise_conv1d.py | 100 | CODE | |
| LOW | keras/src/layers/convolutional/base_conv_transpose.py | 71 | CODE | |
| LOW | keras/src/layers/convolutional/separable_conv2d.py | 99 | CODE | |
| LOW | keras/src/layers/convolutional/separable_conv1d.py | 98 | CODE | |
| LOW | keras/src/layers/convolutional/conv3d_transpose.py | 113 | CODE | |
| LOW | keras/src/layers/convolutional/conv1d.py | 95 | CODE | |
| LOW | keras/src/layers/convolutional/conv2d_transpose.py | 109 | CODE | |
| LOW | keras/src/layers/convolutional/conv3d.py | 95 | CODE | |
| LOW | keras/src/layers/convolutional/conv2d.py | 98 | CODE | |
| LOW | keras/src/layers/convolutional/conv1d_transpose.py | 101 | CODE | |
| LOW | keras/src/layers/convolutional/base_separable_conv.py | 77 | CODE | |
| LOW | keras/src/layers/convolutional/base_conv.py | 90 | CODE | |
| LOW | keras/src/layers/preprocessing/mel_spectrogram.py | 87 | CODE | |
| LOW | keras/src/layers/preprocessing/index_lookup.py | 119 | CODE | |
| LOW | keras/src/layers/preprocessing/integer_lookup.py | 335 | CODE | |
| LOW | keras/src/layers/preprocessing/text_vectorization.py | 219 | CODE | |
| LOW | keras/src/layers/preprocessing/stft_spectrogram.py | 134 | CODE | |
| LOW | keras/src/layers/preprocessing/string_lookup.py | 302 | CODE | |
| LOW | …essing/image_preprocessing/random_elastic_transform.py | 84 | CODE | |
| LOW | …rc/layers/preprocessing/image_preprocessing/aug_mix.py | 86 | CODE | |
| LOW | keras/src/layers/merging/dot.py | 323 | CODE | |
| LOW | keras/src/layers/rnn/conv_lstm3d.py | 122 | CODE | |
| LOW | keras/src/layers/rnn/conv_lstm2d.py | 123 | CODE | |
| LOW | keras/src/layers/rnn/lstm.py | 88 | CODE | |
| LOW | keras/src/layers/rnn/lstm.py | 448 | CODE | |
| LOW | keras/src/layers/rnn/gru.py | 86 | CODE | |
| LOW | keras/src/layers/rnn/gru.py | 465 | CODE | |
| LOW | keras/src/layers/rnn/conv_lstm1d.py | 123 | CODE | |
| LOW | keras/src/layers/rnn/simple_rnn.py | 79 | CODE | |
| LOW | keras/src/layers/rnn/simple_rnn.py | 297 | CODE | |
| LOW | keras/src/layers/rnn/conv_lstm.py | 85 | CODE | |
| LOW | keras/src/layers/rnn/conv_lstm.py | 472 | CODE | |
| LOW | keras/src/callbacks/reduce_lr_on_plateau.py | 48 | CODE | |
| LOW | keras/src/callbacks/orbax_checkpoint.py | 110 | CODE | |
| 131 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | keras/src/backend/jax/trainer_test.py | 33 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | keras/src/backend/jax/trainer_test.py | 35 | # ---------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 469 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 471 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 480 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 482 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 585 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 587 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 590 | # ------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | keras/src/saving/file_editor.py | 592 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 499 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 501 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 528 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 530 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 551 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 553 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 572 | # ------------------------------------------------------ | COMMENT |
| MEDIUM | keras/src/saving/file_editor.py | 574 | # ------------------------------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/wrappers/sklearn_test.py | 158 | except Exception as exc: | CODE |
| LOW | keras/src/wrappers/sklearn_test.py | 212 | except Exception as exc: | CODE |
| LOW | keras/src/layers/layer.py | 1771 | except Exception as e: | CODE |
| LOW | keras/src/callbacks/orbax_checkpoint_test.py | 435 | except Exception: | CODE |
| LOW | keras/src/callbacks/orbax_checkpoint.py | 357 | except Exception as e: | CODE |
| LOW | keras/src/callbacks/tensorboard.py | 638 | except Exception as e: | CODE |
| LOW | keras/src/callbacks/tensorboard.py | 652 | except Exception as e: | CODE |
| LOW | keras/src/callbacks/tensorboard.py | 694 | except Exception as exc: | CODE |
| LOW | keras/src/utils/traceback_utils.py | 118 | except Exception as e: | CODE |
| LOW | keras/src/utils/traceback_utils.py | 153 | except Exception: | CODE |
| LOW⚡ | keras/src/utils/traceback_utils.py | 197 | except Exception: | CODE |
| LOW⚡ | keras/src/utils/traceback_utils.py | 201 | except Exception: | CODE |
| LOW | keras/src/utils/traceback_utils.py | 249 | except Exception: | CODE |
| LOW | keras/src/backend/torch/rnn.py | 617 | except Exception: | CODE |
| LOW | keras/src/backend/torch/rnn.py | 807 | except Exception: | CODE |
| LOW | keras/src/backend/torch/ops/core.py | 328 | except Exception: | CODE |
| MEDIUM | keras/src/backend/torch/ops/core.py | 325 | def __eq__(self, other): | CODE |
| LOW | keras/src/backend/common/variables.py | 641 | except Exception as e: | CODE |
| LOW | keras/src/backend/jax/ops/nn.py | 1809 | except Exception: | CODE |
| LOW | keras/src/backend/jax/ops/nn.py | 1831 | except Exception: | CODE |
| LOW | keras/src/trainers/trainer.py | 1186 | except Exception as e: | CODE |
| LOW | keras/src/trainers/data_adapters/py_dataset_adapter.py | 720 | except Exception as e: | CODE |
| LOW | keras/src/trainers/data_adapters/py_dataset_adapter.py | 753 | except Exception as e: | CODE |
| LOW | keras/src/dtype_policies/dtype_policy_map.py | 229 | except Exception: | CODE |
| LOW | keras/src/ops/core.py | 1087 | except Exception as e: | CODE |
| LOW | keras/src/ops/numpy.py | 7595 | except Exception: | CODE |
| LOW | keras/src/ops/operation.py | 60 | except Exception as e: | CODE |
| LOW | keras/src/ops/operation.py | 148 | except Exception as e: | CODE |
| LOW | keras/src/ops/operation.py | 364 | except Exception as e: | CODE |
| MEDIUM | keras/src/ops/operation.py | 145 | def compute_output_spec(self, *args, **kwargs): | CODE |
| LOW | keras/src/ops/linalg.py | 47 | except Exception as e: | CODE |
| LOW | keras/src/ops/linalg.py | 93 | except Exception as e: | CODE |
| LOW | keras/src/saving/file_editor.py | 82 | except Exception: | CODE |
| LOW | keras/src/saving/saving_lib.py | 733 | except Exception: | CODE |
| LOW | keras/src/saving/saving_lib.py | 837 | except Exception as e: | CODE |
| LOW | keras/src/saving/saving_lib.py | 849 | except Exception as e: | CODE |
| LOW | keras/src/export/openvino_test.py | 110 | except Exception as e: | CODE |
| LOW | keras/src/export/openvino_test.py | 165 | except Exception as e: | CODE |
| LOW | keras/src/export/openvino_test.py | 200 | except Exception as e: | CODE |
| LOW | keras/src/export/openvino_test.py | 233 | except Exception as e: | CODE |
| LOW | keras/src/export/onnx.py | 284 | except Exception: | CODE |
| LOW | keras/src/export/litert_torch_test.py | 45 | except Exception: | CODE |
| LOW | keras/src/export/tf2onnx_lib.py | 127 | except Exception as ex: | CODE |
| LOW | keras/src/export/torch.py | 100 | except Exception as e: | CODE |
| LOW | keras/src/export/litert.py | 245 | except Exception as e: | CODE |
| LOW | integration_tests/pytorch_export_test.py | 102 | except Exception as e: | CODE |
| LOW | integration_tests/pytorch_export_test.py | 163 | except Exception as e: | CODE |
| LOW | integration_tests/pytorch_export_test.py | 179 | except Exception as e: | CODE |
| LOW | integration_tests/pytorch_export_test.py | 246 | except Exception as e: | CODE |
| LOW | integration_tests/pytorch_export_test.py | 297 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/tree/dmtree_impl.py | 207 | # Check if the reference entry (first one) is None | COMMENT |
| LOW | keras/src/tree/torchtree_impl.py | 154 | # Check if the reference entry (first one) is None | COMMENT |
| LOW | keras/src/losses/losses_test.py | 1230 | # Check if any SyntaxWarning was issued | COMMENT |
| LOW | keras/src/losses/losses_test.py | 2066 | # Check if any SyntaxWarning was issued | COMMENT |
| LOW | keras/src/layers/core/embedding.py | 297 | # Check if the attribute exists on the instance before saving. | COMMENT |
| LOW | keras/src/layers/core/embedding.py | 345 | # Check if the attribute exists before attempting to assign. | COMMENT |
| LOW | keras/src/layers/normalization/batch_normalization.py | 340 | # Check if the mask has one less dimension than the inputs. | COMMENT |
| LOW | keras/src/layers/preprocessing/feature_space.py | 530 | # Check if the dataset needs batching | COMMENT |
| LOW | keras/src/layers/rnn/time_distributed.py | 79 | # Check if mask has at least 2 dimensions (batch and timesteps) | COMMENT |
| LOW | keras/src/callbacks/orbax_checkpoint.py | 196 | # Check if JAX distributed client is initialized | COMMENT |
| LOW | keras/src/distillation/distiller_test.py | 101 | # Check if the model has been compiled (different backends may handle | COMMENT |
| 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 | COMMENT |
| LOW | keras/src/utils/image_utils.py | 295 | # Set back to input height / width | COMMENT |
| LOW | keras/src/utils/image_utils.py | 409 | # Set back to input height / width if crop_height / crop_width is not | COMMENT |
| LOW | keras/src/backend/torch/rnn.py | 433 | # Check if mask is valid for cuDNN | COMMENT |
| LOW | keras/src/backend/jax/ops/nn.py | 1496 | # Check if cuDNN is installed and raise RuntimeError if cuDNN is not | COMMENT |
| LOW | keras/src/models/model.py | 963 | # Check if LiteRT export is available (requires TensorFlow or | COMMENT |
| LOW | keras/src/models/model.py | 973 | # Check if Torch export is available (requires PyTorch backend) | COMMENT |
| LOW | keras/src/trainers/data_adapters/tf_dataset_adapter.py | 49 | # Check if the dataset is batched. | COMMENT |
| LOW | keras/src/ops/ops_test.py | 56 | # Check if that function exist. Some classes are abstract super | COMMENT |
| LOW | keras/src/ops/function.py | 134 | # Check if input shapes are identical to ref input shapes, | COMMENT |
| LOW | keras/src/saving/file_editor.py | 30 | # Check if an active IPython shell exists. | COMMENT |
| LOW | keras/src/saving/serialization_lib_test.py | 447 | # Check if it resolves to the canonical keras activation function | COMMENT |
| LOW | keras/src/export/onnx.py | 288 | # Set verbose to False for TorchScript due to file system leakage | COMMENT |
| LOW | integration_tests/dataset_tests/imdb_test.py | 35 | # Check if top 10 words are skipped properly | COMMENT |
| LOW | integration_tests/dataset_tests/imdb_test.py | 46 | # Check if word_index contains specific known words | COMMENT |
| LOW | integration_tests/dataset_tests/reuters_test.py | 43 | # Check if word_index contains specific known words | COMMENT |
| LOW | integration_tests/dataset_tests/reuters_test.py | 49 | # Check if the tuple contains specific known labels | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/tree/dmtree_impl.py | 1 | import collections | COMMENT |
| LOW | keras/src/metrics/confusion_metrics_test.py | 1161 | # without sample_weight: | COMMENT |
| LOW | keras/src/metrics/confusion_metrics_test.py | 1561 | # tn = [[0, 1, 2, 2, 2], [0, 2, 2, 2, 2]] | COMMENT |
| LOW | keras/src/metrics/metrics_utils.py | 141 | bucket_index(y_pred) = ops.floor(y_pred * num_buckets) | COMMENT |
| LOW | keras/src/layers/layer.py | 961 | self._assert_input_compatibility(call_spec.first_arg) | COMMENT |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 441 | COMMENT | |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 461 | # # Same hashed output as test_hash_sparse_input_farmhash | COMMENT |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 481 | # empty_mask_output = empty_mask_layer(inp_data) | COMMENT |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 501 | # self.assertAllClose(expected_output[1], out_data[1]) | COMMENT |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 521 | COMMENT | |
| LOW | keras/src/layers/preprocessing/hashing_test.py | 541 | # # Same hashed output as test_hash_sparse_input_farmhash | COMMENT |
| LOW | …/preprocessing/image_preprocessing/center_crop_test.py | 181 | # np.random.rand(10, 10, 3), | COMMENT |
| LOW | keras/src/callbacks/callback.py | 81 | COMMENT | |
| LOW | keras/src/callbacks/tensorboard_test.py | 521 | # self.assertEqual( | COMMENT |
| LOW | keras/src/callbacks/tensorboard_test.py | 701 | # Dense(1), | COMMENT |
| LOW | keras/src/callbacks/tensorboard_test.py | 721 | COMMENT | |
| LOW | keras/src/quantizers/strategy_registry.py | 61 | COMMENT | |
| LOW | keras/src/datasets/npz_utils.py | 1 | """Utilities shared by the built-in datasets.""" | COMMENT |
| LOW | keras/src/distribution/distribution_lib_test.py | 621 | # cpus = tf.config.list_physical_devices("cpu") | COMMENT |
| LOW | keras/src/distribution/distribution_lib_test.py | 641 | # axis_names = ["batch", "model"] | COMMENT |
| LOW | keras/src/distribution/distribution_lib_test.py | 661 | # ) | COMMENT |
| LOW | keras/src/utils/model_visualization.py | 361 | # No nesting, connect directly. | COMMENT |
| LOW | keras/src/backend/torch/ops/nn.py | 301 | COMMENT | |
| LOW | keras/src/backend/torch/ops/numpy.py | 201 | ori_dtype = standardize_dtype(x.dtype) | COMMENT |
| LOW | keras/src/backend/common/dtypes.py | 121 | COMMENT | |
| LOW | keras/src/backend/tensorflow/random.py | 141 | dtype, | COMMENT |
| LOW | keras/src/backend/tensorflow/rnn.py | 901 | # after batch dim for time major or batch major inputs respectively | COMMENT |
| LOW | keras/src/backend/jax/ops/core.py | 461 | COMMENT | |
| LOW | keras/src/optimizers/optimizer_sparse_test.py | 141 | ): | COMMENT |
| LOW | keras/src/trainers/data_adapters/array_data_adapter.py | 141 | num_samples = self._num_samples | COMMENT |
| LOW | keras/src/testing/test_case.py | 501 | # Single op loss to avoid compilation issues with ragged / sparse. | COMMENT |
| LOW | keras/src/ops/image_test.py | 1841 | def test_resize_uint8_round(self): | COMMENT |
| LOW | keras/src/ops/image_test.py | 1881 | expected = np.array( | COMMENT |
| LOW | keras/src/saving/saving_lib_test.py | 441 | self.assertIn("keras_version", metadata) | COMMENT |
| LOW | keras/src/saving/saving_lib.py | 401 | model = deserialize_keras_object( | COMMENT |
| LOW | keras/src/export/saved_model_export_archive.py | 361 | # input signature raises `TypeError: missing a | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 321 | # | sub (Sequential) | | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 381 | edge_dict = get_edge_dict(model_to_dot(model)) | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 401 | # | v | | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 441 | keras.layers.Dense(10, name="dense1"), | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 481 | # | | inner v | | | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 521 | model = keras.models.Sequential( | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 561 | # | mid | | | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 601 | COMMENT | |
| LOW | integration_tests/model_visualization_test.py | 641 | # | +-------------------------+ | | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 721 | ) | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 741 | { | COMMENT |
| LOW | integration_tests/model_visualization_test.py | 761 | # | | | dense0 | | | |inner_inp1t| |inner_inp2t| | | subclass3 | | | COMMENT |
| 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) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/activations/__init__.py | 101 | # Case for keras.activations builtins (simply return name) | COMMENT |
| MEDIUM | keras/src/metrics/confusion_metrics.py | 1493 | # Due to the hyperbolic transform, this formula is less robust than | COMMENT |
| 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. | COMMENT |
| MEDIUM | keras/src/layers/rnn/lstm.py | 558 | # TF for instance, it will leverage cuDNN when feasible, and | COMMENT |
| MEDIUM | keras/src/layers/rnn/gru.py | 574 | # TF for instance, it will leverage cuDNN when feasible, and | COMMENT |
| MEDIUM | keras/src/callbacks/orbax_checkpoint_test.py | 547 | """Test comprehensive model state restoration with exact weight | STRING |
| MEDIUM | keras/src/callbacks/early_stopping_test.py | 286 | # in conjunction with 'start_from_epoch'. | COMMENT |
| LOW | keras/src/legacy/saving/serialization.py | 241 | # already serialized this config. If so, just use that config. This will | COMMENT |
| LOW | keras/src/utils/text_dataset_utils_test.py | 72 | # We just return the texts, no labels | COMMENT |
| MEDIUM | keras/src/backend/torch/ops/core.py | 499 | # more robust, but more expensive. | COMMENT |
| MEDIUM | keras/src/backend/tensorflow/ops/numpy.py | 354 | # Replace tf.einsum with custom ops to utilize hardware-accelerated | COMMENT |
| MEDIUM | keras/src/backend/tensorflow/ops/numpy.py | 3906 | # unfortunately we can't leverage 'SAME' padding directly like | COMMENT |
| LOW | keras/src/trainers/data_adapters/py_dataset_adapter.py | 788 | # If a worker dies during init, the pool will just create a replacement. | COMMENT |
| MEDIUM | keras/src/ops/function.py | 155 | # Wrap `input_shape` into the structure of KerasTensor to utilize | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | keras/src/quantizers/awq.py | 342 | # Step 1: Find optimal AWQ scales via grid search | COMMENT |
| LOW⚡ | keras/src/quantizers/awq.py | 350 | # Step 2: Apply AWQ scales by MULTIPLYING (expand salient weights) | COMMENT |
| LOW⚡ | keras/src/quantizers/awq.py | 354 | # Step 3: (Optional) Search and apply per-group clipping bounds. | COMMENT |
| LOW | keras/src/saving/saving_api.py | 416 | # Step 1: Load model_config to rebuild the model. | COMMENT |
| LOW | keras/src/saving/saving_api.py | 434 | # Step 2: Load pytree (arrays) with optional resharding. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | keras/src/tree/dmtree_impl.py | 24 | # non-sortable keys as unsupported (meaning behavior is undefined). | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | keras/src/quantizers/awq.py | 342 | # Step 1: Find optimal AWQ scales via grid search | COMMENT |
| LOW⚡ | keras/src/quantizers/awq.py | 350 | # Step 2: Apply AWQ scales by MULTIPLYING (expand salient weights) | COMMENT |
| LOW | keras/src/saving/saving_api.py | 416 | # Step 1: Load model_config to rebuild the model. | COMMENT |
| LOW | keras/src/saving/saving_api.py | 434 | # Step 2: Load pytree (arrays) with optional resharding. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/backend/torch/ops/core_test.py | 42 | if node.op == "placeholder": | CODE |
| LOW⚡ | keras/src/backend/jax/ops/core.py | 150 | dummy_value = jnp.array(0.0) | CODE |
| LOW⚡ | keras/src/backend/jax/ops/core.py | 152 | dummy_value = jnp.zeros(shape, dtype=standardize_dtype(dtype)) | CODE |
| LOW⚡ | keras/src/backend/jax/ops/core.py | 155 | nnx.Variable.__init__(self, value=dummy_value, **nnx_metadata) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | keras/src/layers/preprocessing/text_vectorization.py | 190 | >>> # Now, the layer can map strings to integers -- you can use an | STRING |
| MEDIUM | keras/src/constraints/constraints.py | 17 | Here's a simple example of a non-negative weight constraint: | STRING |
| MEDIUM | keras/src/utils/dataset_utils.py | 63 | >>> # For a tf.data.Dataset, you can use .cardinality() | STRING |
| MEDIUM | keras/src/utils/dataset_utils.py | 66 | >>> # For a torch.utils.data.Dataset, you can use len() | STRING |
| MEDIUM | keras/src/initializers/initializer.py | 34 | Here's a simple example: a random normal initializer. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | keras/src/quantizers/strategy_registry.py | 263 | # --- Model-level orchestration ---------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/utils/python_utils_test.py | 10 | def my_function(x, y=1, **kwargs): | CODE |
| LOW | keras/src/backend/torch/trainer.py | 206 | def test_function(data): | CODE |
| LOW | keras/src/backend/jax/distribution_lib_test.py | 99 | def test_function(inputs, target_layout): | CODE |
| LOW | keras/src/backend/jax/distribution_lib_test.py | 125 | def test_function(inputs, target_layout): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | keras/src/wrappers/__init__.py | 5 | __all__ = ["SKLearnClassifier", "SKLearnRegressor", "SKLearnTransformer"] | CODE |