The largest collection of PyTorch image encoders / backbones. Including train, eval, inference, export scripts, and pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNetV4, MobileNet-V3 & V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more
This report summarizes scanner evidence for huggingface/pytorch-image-models, a Python project with 37,208 GitHub stars. SynthScan examined 361,226 lines of code across 397 source files, recording 2548 pattern matches distributed across 19 syntactic categories. The legacy adjusted pattern signal is 9.2 (Moderate 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? 1283 finding(s).
Are imports declared and package/API names verified? 812 finding(s).
Are wrappers, guards, and repeated structures necessary? 1493 finding(s).
Which changes need focused human review? 2548 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 2548 distinct pattern matches across 19 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 |
|---|---|---|---|---|
| HIGH | timm/optim/mars.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/lamb.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/adafactor.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/nvnovograd.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/adabelief.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/adamw.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/laprop.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/nadam.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/rmsprop_tf.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/madgrad.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/sgdw.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/lars.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/nadamw.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/optim/adopt.py | 0 | perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returns | STRING |
| HIGH | timm/models/repvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/tiny_vit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/ghostnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/davit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/efficientvit_mit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/rexnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/edgenext.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/swiftformer.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/nest.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/regnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/resnetv2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/efficientvit_msra.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/shvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/tresnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/fastvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/fasternet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/efficientformer.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/levit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/vovnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/inception_v4.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/maxxvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/metaformer.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/repghost.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/swin_transformer_v2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/pvt_v2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/lcnetv2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/mambaout.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/gcvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/starnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/inception_next.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/focalnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/pit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/swin_transformer_v2_cr.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/efficientformer_v2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/nextvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/hgnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/volo.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/xcit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/mvitv2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/twins.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/vision_transformer_sam.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/hiera.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/hieradet_sam2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/vision_transformer_relpos.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/cpubone.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| HIGH | timm/models/byobnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a | STRING |
| 144 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | legacy_train.py | 53 | CODE | |
| LOW | train.py | 70 | CODE | |
| LOW | inference.py | 9 | CODE | |
| LOW | clean_checkpoint.py | 15 | CODE | |
| LOW | tests/test_scheduler.py | 20 | CODE | |
| LOW | tests/test_models.py | 33 | CODE | |
| LOW | timm/__init__.py | 1 | CODE | |
| LOW | timm/__init__.py | 2 | CODE | |
| LOW | timm/__init__.py | 2 | CODE | |
| LOW | timm/__init__.py | 2 | CODE | |
| LOW | timm/__init__.py | 2 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/__init__.py | 8 | CODE | |
| LOW | timm/layers/squeeze_excite.py | 13 | CODE | |
| LOW | timm/layers/classifier.py | 11 | CODE | |
| LOW | timm/layers/create_act.py | 4 | CODE | |
| LOW | timm/layers/create_act.py | 4 | CODE | |
| LOW | timm/layers/create_act.py | 6 | CODE | |
| LOW | timm/layers/create_act.py | 7 | CODE | |
| LOW | timm/layers/create_norm.py | 9 | CODE | |
| LOW | timm/layers/separable_conv.py | 8 | CODE | |
| LOW | timm/layers/trace_utils.py | 2 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 1 | CODE | |
| LOW | timm/layers/__init__.py | 11 | CODE | |
| LOW | timm/layers/__init__.py | 12 | CODE | |
| LOW | timm/layers/__init__.py | 12 | CODE | |
| LOW | timm/layers/__init__.py | 12 | CODE | |
| LOW | timm/layers/__init__.py | 12 | CODE | |
| LOW | timm/layers/__init__.py | 18 | CODE | |
| LOW | timm/layers/__init__.py | 18 | CODE | |
| LOW | timm/layers/__init__.py | 18 | CODE | |
| LOW | timm/layers/__init__.py | 18 | CODE | |
| LOW | timm/layers/__init__.py | 19 | CODE | |
| LOW | timm/layers/__init__.py | 19 | CODE | |
| LOW | timm/layers/__init__.py | 19 | CODE | |
| LOW | timm/layers/__init__.py | 20 | CODE | |
| LOW | timm/layers/__init__.py | 20 | CODE | |
| LOW | timm/layers/__init__.py | 21 | CODE | |
| LOW | timm/layers/__init__.py | 21 | CODE | |
| LOW | timm/layers/__init__.py | 22 | CODE | |
| LOW | timm/layers/__init__.py | 22 | CODE | |
| LOW | timm/layers/__init__.py | 23 | CODE | |
| LOW | timm/layers/__init__.py | 23 | CODE | |
| LOW | timm/layers/__init__.py | 23 | CODE | |
| LOW | timm/layers/__init__.py | 23 | CODE | |
| LOW | timm/layers/__init__.py | 24 | CODE | |
| 747 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_utils.py | 19 | def test_average_meter_zero_count(): | CODE |
| LOW | tests/test_utils.py | 77 | def test_activation_stats_hook_validation(): | CODE |
| LOW | tests/test_utils.py | 110 | def test_freeze_unfreeze_bn_root(): | CODE |
| LOW | tests/test_utils.py | 127 | def test_activation_stats_functions(): | CODE |
| LOW | tests/test_utils.py | 146 | def test_reparameterize_model(): | CODE |
| LOW | tests/test_utils.py | 175 | def test_get_state_dict_custom_unwrap(): | CODE |
| LOW | tests/test_utils.py | 193 | def test_freeze_unfreeze_string_input(): | CODE |
| LOW | tests/test_utils.py | 212 | def test_parse_kwargs_literal_values(): | CODE |
| LOW | tests/test_utils.py | 220 | def test_parse_kwargs_value_with_equals(): | CODE |
| LOW | tests/test_utils.py | 231 | def test_parse_kwargs_non_literal_falls_back_to_string(): | CODE |
| LOW | tests/conftest.py | 8 | def isolate_cli_backend_flags(monkeypatch): | CODE |
| LOW⚡ | tests/test_task.py | 68 | def _param_group_weight_decay(optimizer): | CODE |
| LOW⚡ | tests/test_task.py | 76 | def _create_tiny_distilled_student(): | CODE |
| LOW⚡ | tests/test_task.py | 86 | def test_distillation_train_keeps_teacher_in_eval(task_cls): | CODE |
| LOW | tests/test_task.py | 122 | def test_token_distillation_reuses_teacher_wrapper(compiled): | CODE |
| LOW | tests/test_task.py | 147 | def test_token_distillation_named_teacher_checkpoint(tmp_path): | CODE |
| LOW | tests/test_task.py | 171 | def test_task_checkpoint_omits_empty_task_state_and_keeps_legacy_paths(tmp_path): | CODE |
| LOW | tests/test_task.py | 202 | def test_feature_distillation_checkpoint_keeps_projection_in_task_state(tmp_path): | CODE |
| LOW | tests/test_task.py | 240 | def test_feature_distillation_trainable_module_optimizer_grouping(): | CODE |
| LOW | tests/test_task.py | 266 | def test_base_eval_model_preserves_trainable_wrapper_for_use(): | CODE |
| LOW | tests/test_task.py | 276 | def test_compiled_ema_eval_model_reflects_update(): | CODE |
| LOW | tests/test_task.py | 301 | def test_compiled_eval_checkpoint_load_uses_unwrapped_state_dict_target(): | CODE |
| LOW | tests/test_naflex_dataset.py | 42 | def test_naflex_epoch_batches_are_prepared_when_iteration_starts(): | CODE |
| LOW | tests/test_naflex_dataset.py | 64 | def test_naflex_persistent_workers_read_shared_epoch(): | CODE |
| LOW | tests/test_naflex_dataset.py | 88 | def test_naflex_persistent_workers_disable_mixup_at_configured_epoch(): | CODE |
| LOW | tests/test_naflex_dataset.py | 117 | def test_naflex_epoch_prep_warnings_only_emitted_by_worker_zero(monkeypatch): | CODE |
| LOW⚡ | tests/test_hub.py | 27 | def test_load_state_dict_from_path_prefers_preferred_file(tmp_path): | CODE |
| LOW⚡ | tests/test_hub.py | 35 | def test_load_state_dict_from_path_ext_priority(tmp_path): | CODE |
| LOW⚡ | tests/test_hub.py | 45 | def test_load_state_dict_from_path_multiple_same_ext_warns(tmp_path, caplog): | CODE |
| LOW⚡ | tests/test_hub.py | 55 | def test_load_state_dict_from_path_accepts_str(tmp_path): | CODE |
| LOW⚡ | tests/test_hub.py | 60 | def test_load_state_dict_from_path_no_checkpoint(tmp_path): | CODE |
| LOW | tests/test_input_conv.py | 29 | def test_adapt_non_rgb_input_conv(source, target, dtype): | CODE |
| LOW | tests/test_input_conv.py | 42 | def test_space_to_depth_grayscale_preserves_spatial_groups(base_channels): | CODE |
| LOW⚡ | tests/test_input_conv.py | 55 | def test_default_rgb_conversion_is_preserved(target): | CODE |
| LOW⚡ | tests/test_input_conv.py | 65 | def test_matching_channel_count_preserves_double_precision(): | CODE |
| LOW⚡ | tests/test_input_conv.py | 74 | def test_channel_counts_must_be_positive(target, source): | CODE |
| LOW | tests/test_input_conv.py | 123 | def test_load_pretrained_uses_source_channel_metadata(source_channels, target_channels, second_stem): | CODE |
| LOW⚡ | tests/test_input_conv.py | 135 | def test_temporal_stacking_preserves_response_to_repeated_frames(frames): | CODE |
| LOW⚡ | tests/test_input_conv.py | 145 | def test_grayscale_matches_repeating_one_band_for_every_pretrained_channel(): | CODE |
| LOW⚡ | tests/test_input_conv.py | 152 | def test_missing_source_metadata_retains_rgb_default(): | CODE |
| LOW⚡ | tests/test_input_conv.py | 157 | def test_unsupported_non_rgb_linear_stem_keeps_existing_fallback(): | CODE |
| LOW⚡ | tests/test_input_conv.py | 163 | def test_non_grayscale_space_to_depth_conversion_remains_explicitly_unsupported(): | CODE |
| LOW⚡ | tests/test_input_conv.py | 169 | def test_create_model_transfers_multispectral_checkpoint(frames): | CODE |
| LOW | tests/test_prune.py | 10 | def test_pruned_feature_info_matches_forward(model_name): | CODE |
| LOW⚡ | tests/test_layers_pos_embed.py | 37 | def _legacy_build_fourier_pos_embed( | CODE |
| LOW⚡ | tests/test_layers_pos_embed.py | 315 | def test_build_grid_xy_swaps_channels(): | CODE |
| LOW⚡ | tests/test_layers_pos_embed.py | 1045 | def test_rope_aug_invalid_config(kind, name, value): | CODE |
| LOW⚡ | tests/test_layers_pos_embed.py | 1053 | def test_rope_aug_invalid_functional_config(name, value): | CODE |
| LOW⚡ | tests/test_layers_pos_embed.py | 1062 | def test_rope_aug_output_dtype(kind, cached, dtype, rope_device): | CODE |
| LOW | tests/test_layers_pos_embed.py | 101 | def _legacy_build_rotary_pos_embed( | CODE |
| LOW | tests/test_layers_pos_embed.py | 255 | def test_build_fourier_pos_embed_matches_legacy( | CODE |
| LOW | tests/test_layers_pos_embed.py | 280 | def test_build_rotary_pos_embed_matches_legacy( | CODE |
| LOW | tests/test_layers_pos_embed.py | 339 | def test_rotary_module_matches_functional(cls, kwargs, rotate_half): | CODE |
| LOW | tests/test_layers_pos_embed.py | 366 | def test_rotary_cat_get_batch_embeds_matches_get_embed(kwargs, seq_len): | CODE |
| LOW | tests/test_layers_pos_embed.py | 489 | def test_rotary_init_after_to_empty(cls, feat_shape): | CODE |
| LOW | tests/test_layers_pos_embed.py | 508 | def test_rotary_module_forward_nchw(cls, feat_shape, rotate_half): | CODE |
| LOW | tests/test_layers_pos_embed.py | 529 | def test_mixed_rope_low_precision_cast(): | CODE |
| LOW | tests/test_layers_pos_embed.py | 591 | def test_mrope_reference_precision_and_meta_init(rope_device, low_dtype, dim, sections): | CODE |
| LOW | tests/test_layers_pos_embed.py | 638 | def test_rope_batch_padding_dtype_and_gradients(kind): | CODE |
| LOW | tests/test_layers_pos_embed.py | 666 | def test_mixed_rope_forward_per_block(feat_shape, block_index): | CODE |
| 502 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | legacy_train.py | 1076 | CODE | |
| LOW | benchmark.py | 215 | CODE | |
| LOW | train.py | 1419 | CODE | |
| LOW | tests/test_layers_pos_embed.py | 98 | CODE | |
| LOW | tests/test_layers_pos_embed.py | 37 | CODE | |
| LOW | tests/test_layers_pos_embed.py | 101 | CODE | |
| LOW | timm/layers/std_conv.py | 35 | CODE | |
| LOW | timm/layers/std_conv.py | 76 | CODE | |
| LOW | timm/layers/std_conv.py | 121 | CODE | |
| LOW | timm/layers/std_conv.py | 182 | CODE | |
| LOW | timm/layers/squeeze_excite.py | 30 | CODE | |
| LOW | timm/layers/squeeze_excite.py | 109 | CODE | |
| LOW | timm/layers/attention.py | 53 | CODE | |
| LOW | timm/layers/attention.py | 159 | CODE | |
| LOW | timm/layers/classifier.py | 249 | CODE | |
| LOW | timm/layers/attention_pool2d.py | 36 | CODE | |
| LOW | timm/layers/attention_pool2d.py | 200 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 116 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 373 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 292 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 530 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 608 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 746 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 1049 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 1141 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 1392 | CODE | |
| LOW | timm/layers/separable_conv.py | 19 | CODE | |
| LOW | timm/layers/separable_conv.py | 85 | CODE | |
| LOW | timm/layers/gather_excite.py | 29 | CODE | |
| LOW | timm/layers/non_local_attn.py | 153 | CODE | |
| LOW | timm/layers/other_pool.py | 195 | CODE | |
| LOW | timm/layers/other_pool.py | 286 | CODE | |
| LOW | timm/layers/bottleneck_attn.py | 122 | CODE | |
| LOW | timm/layers/bottleneck_attn.py | 185 | CODE | |
| LOW | timm/layers/lambda_layer.py | 73 | CODE | |
| LOW | timm/layers/lambda_layer.py | 171 | CODE | |
| LOW | timm/layers/attention_pool.py | 20 | CODE | |
| LOW | timm/layers/mlp.py | 19 | CODE | |
| LOW | timm/layers/mlp.py | 63 | CODE | |
| LOW | timm/layers/mlp.py | 120 | CODE | |
| LOW | timm/layers/mlp.py | 171 | CODE | |
| LOW | timm/layers/mlp.py | 218 | CODE | |
| LOW | timm/layers/mlp.py | 256 | CODE | |
| LOW | timm/layers/diff_attention.py | 37 | CODE | |
| LOW | timm/layers/hybrid_embed.py | 28 | CODE | |
| LOW | timm/layers/hybrid_embed.py | 231 | CODE | |
| LOW | timm/layers/conv_bn_act.py | 16 | CODE | |
| LOW | timm/layers/halo_attn.py | 142 | CODE | |
| LOW | timm/layers/halo_attn.py | 247 | CODE | |
| LOW | timm/layers/attention2d.py | 27 | CODE | |
| LOW | timm/layers/attention2d.py | 107 | CODE | |
| LOW | timm/layers/attention2d.py | 324 | CODE | |
| LOW | timm/layers/patch_embed.py | 32 | CODE | |
| LOW | timm/layers/patch_embed.py | 153 | CODE | |
| LOW | timm/layers/eca.py | 61 | CODE | |
| LOW | timm/layers/eca.py | 135 | CODE | |
| LOW | timm/layers/global_context.py | 23 | CODE | |
| LOW | timm/layers/split_attn.py | 38 | CODE | |
| LOW | timm/layers/selective_kernel.py | 63 | CODE | |
| LOW | timm/layers/cbam.py | 24 | CODE | |
| 418 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | train.py | 633 | def _set_loader_epoch(loader, epoch: int) -> None: | CODE |
| LOW | timm/layers/attention.py | 12 | __all__ = ['Attention', 'AttentionRope', 'maybe_add_mask', 'resolve_self_attn_mask'] | CODE |
| LOW | timm/layers/config.py | 9 | __all__ = [ | CODE |
| LOW | timm/layers/pos_embed_sincos.py | 670 | def update_feat_shape(self, feat_shape: List[int]) -> None: | CODE |
| LOW | timm/layers/pos_embed_sincos.py | 787 | def _update_cached_embed(self, feat_shape: List[int], bands: torch.Tensor) -> None: | CODE |
| LOW | timm/layers/pos_embed_sincos.py | 852 | def _update_cached_embed(self, feat_shape: List[int], bands: torch.Tensor) -> None: | CODE |
| LOW | timm/layers/pos_embed_rel.py | 344 | def set_window_size(self, window_size: Tuple[int, int]) -> None: | CODE |
| LOW | timm/layers/pos_embed_rel.py | 503 | def set_window_size(self, window_size: Tuple[int, int]) -> None: | CODE |
| LOW | timm/layers/pos_embed_rel.py | 654 | def set_window_size(self, window_size: Tuple[int, int]) -> None: | CODE |
| LOW | timm/layers/_fx.py | 15 | __all__ = [ | CODE |
| LOW | timm/layers/typing.py | 7 | __all__ = ["LayerType", "PadType", "nullwrap", "disable_compiler"] | CODE |
| LOW | timm/scheduler/scheduler.py | 91 | def update_groups(self, values: Union[float, List[float]]) -> None: | CODE |
| LOW | timm/optim/_types.py | 29 | __all__ = ['ParamsT', 'OptimType', 'OptimizerCallable'] | CODE |
| LOW | timm/optim/sgdw.py | 23 | __all__ = ['SGDW', 'sgdw'] | CODE |
| LOW | timm/optim/adopt.py | 27 | __all__ = ["Adopt", "adopt"] | CODE |
| LOW | timm/models/repvit.py | 29 | __all__ = ['RepVit'] | CODE |
| LOW | timm/models/tiny_vit.py | 9 | __all__ = ['TinyVit'] | CODE |
| LOW | timm/models/deit.py | 25 | __all__ = ['VisionTransformerDistilled'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/ghostnet.py | 35 | __all__ = ['GhostNet'] | CODE |
| LOW | timm/models/volo.py | 37 | __all__ = ['VOLO'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/volo.py | 923 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/davit.py | 33 | __all__ = ['DaVit'] | CODE |
| LOW | timm/models/efficientvit_mit.py | 9 | __all__ = ['EfficientVit', 'EfficientVitLarge'] | CODE |
| LOW | timm/models/gemma4_vit.py | 40 | __all__ = ['Gemma4VitEncoder', 'Gemma4VitClassifier'] | CODE |
| LOW | timm/models/gemma4_vit.py | 808 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/gemma4_vit.py | 812 | def set_clamp_enabled(self, enabled: bool = True) -> None: | CODE |
| LOW | timm/models/gemma4_vit.py | 1145 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/gemma4_vit.py | 1149 | def set_clamp_enabled(self, enabled: bool = True) -> None: | CODE |
| LOW | timm/models/_efficientnet_blocks.py | 26 | __all__ = [ | CODE |
| LOW | timm/models/selecsls.py | 25 | __all__ = ['SelecSls'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/rexnet.py | 31 | __all__ = ['RexNet'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/rexnet.py | 338 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/inception_resnet_v2.py | 20 | __all__ = ['InceptionResnetV2'] | CODE |
| LOW | timm/models/edgenext.py | 38 | __all__ = ['EdgeNeXt'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/hrnet.py | 28 | __all__ = ['HighResolutionNet', 'HighResolutionNetFeatures'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/hieradet_sam2.py | 466 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/vgg.py | 23 | __all__ = ['VGG'] | CODE |
| LOW | timm/models/vgg.py | 198 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/byoanet.py | 27 | __all__ = [] | CODE |
| LOW | timm/models/convmixer.py | 17 | __all__ = ['ConvMixer'] | CODE |
| LOW | timm/models/swiftformer.py | 28 | __all__ = ['SwiftFormer'] | CODE |
| LOW | timm/models/nest.py | 49 | __all__ = ['Nest'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/cspnet.py | 30 | __all__ = ['CspNet'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/hardcorenas.py | 18 | __all__ = [] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/beit.py | 77 | __all__ = ['Beit'] | CODE |
| LOW | timm/models/beit.py | 283 | def set_window_size(self, window_size: Tuple[int, int]) -> None: | CODE |
| LOW | timm/models/beit.py | 476 | def set_window_size(self, window_size: Tuple[int, int]) -> None: | CODE |
| LOW | timm/models/vision_transformer_relpos.py | 46 | __all__ = ['VisionTransformerRelPos'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/xcit.py | 30 | __all__ = ['Xcit'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/regnet.py | 45 | __all__ = ['RegNet', 'RegNetCfg'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/regnet.py | 717 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/sequencer.py | 24 | __all__ = ['Sequencer2d'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/qwen3_vit.py | 56 | __all__ = ['Qwen3VitEncoder', 'Qwen3VitClassifier'] | CODE |
| LOW | timm/models/qwen3_vit.py | 275 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/qwen3_vit.py | 482 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/cpubone.py | 29 | __all__ = ['CPUBone'] | CODE |
| LOW | timm/models/mvitv2.py | 36 | __all__ = ['MultiScaleVit', 'MultiScaleVitCfg'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/resnetv2.py | 51 | __all__ = ['ResNetV2'] # model_registry will add each entrypoint fn to this | CODE |
| LOW | timm/models/resnetv2.py | 672 | def set_grad_checkpointing(self, enable: bool = True) -> None: | CODE |
| LOW | timm/models/vision_transformer.py | 117 | __all__ = ['VisionTransformer'] # model_registry will add each entrypoint fn to this | CODE |
| 117 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | legacy_train.py | 428 | CODE | |
| LOW | legacy_train.py | 1076 | CODE | |
| LOW | legacy_train.py | 1287 | CODE | |
| LOW | benchmark.py | 170 | CODE | |
| LOW | benchmark.py | 573 | CODE | |
| LOW | benchmark.py | 629 | CODE | |
| LOW | benchmark.py | 314 | CODE | |
| LOW | validate.py | 195 | CODE | |
| LOW | validate.py | 485 | CODE | |
| LOW | validate.py | 514 | CODE | |
| LOW | train.py | 588 | CODE | |
| LOW | train.py | 642 | CODE | |
| LOW | train.py | 1419 | CODE | |
| LOW | train.py | 1643 | CODE | |
| LOW | bulk_runner.py | 96 | CODE | |
| LOW | bulk_runner.py | 141 | CODE | |
| LOW | inference.py | 158 | CODE | |
| LOW | inference.py | 376 | CODE | |
| LOW | tests/test_task.py | 86 | CODE | |
| LOW | tests/test_layers_pos_embed.py | 820 | CODE | |
| LOW | tests/test_reader_wds.py | 23 | CODE | |
| LOW | tests/test_models.py | 266 | CODE | |
| LOW | results/generate_csv_results.py | 20 | CODE | |
| LOW | timm/layers/classifier.py | 315 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 116 | CODE | |
| LOW | timm/layers/pos_embed_sincos.py | 1611 | CODE | |
| LOW | timm/layers/gather_excite.py | 29 | CODE | |
| LOW | timm/layers/non_local_attn.py | 71 | CODE | |
| LOW | timm/layers/pos_embed_rel.py | 157 | CODE | |
| LOW | timm/layers/adaptive_avgmax_pool.py | 42 | CODE | |
| LOW | timm/layers/adaptive_avgmax_pool.py | 127 | CODE | |
| LOW | timm/layers/inplace_abn.py | 43 | CODE | |
| LOW | timm/layers/hybrid_embed.py | 93 | CODE | |
| LOW | timm/layers/pool1d.py | 4 | CODE | |
| LOW | timm/layers/create_attn.py | 22 | CODE | |
| LOW | timm/layers/weight_init.py | 110 | CODE | |
| LOW | timm/layers/norm_act.py | 278 | CODE | |
| LOW | timm/layers/norm_act.py | 322 | CODE | |
| LOW | timm/loss/class_weights.py | 94 | CODE | |
| LOW | timm/scheduler/scheduler_factory.py | 66 | CODE | |
| LOW | timm/optim/_param_groups.py | 19 | CODE | |
| LOW | timm/optim/sgdw.py | 199 | CODE | |
| LOW | timm/optim/sgdw.py | 246 | CODE | |
| LOW | timm/optim/_optim_factory.py | 177 | CODE | |
| LOW | timm/optim/adafactor.py | 141 | CODE | |
| LOW | timm/optim/adafactor_bv.py | 206 | CODE | |
| LOW | timm/optim/adafactor_bv.py | 122 | CODE | |
| LOW | timm/optim/nvnovograd.py | 91 | CODE | |
| LOW | timm/optim/adamp.py | 90 | CODE | |
| LOW | timm/optim/adabelief.py | 267 | CODE | |
| LOW | timm/optim/adabelief.py | 122 | CODE | |
| LOW | timm/optim/adamw.py | 117 | CODE | |
| LOW | timm/optim/kron.py | 413 | CODE | |
| LOW | timm/optim/kron.py | 228 | CODE | |
| LOW | timm/optim/muon.py | 535 | CODE | |
| LOW | timm/optim/muon.py | 792 | CODE | |
| LOW | timm/optim/rmsprop_tf.py | 227 | CODE | |
| LOW | timm/optim/rmsprop_tf.py | 113 | CODE | |
| LOW | timm/optim/sgdp.py | 50 | CODE | |
| LOW | timm/optim/_helpers.py | 15 | CODE | |
| 108 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_layers_pos_embed.py | 33 | # --------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_layers_pos_embed.py | 35 | # --------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_layers_pos_embed.py | 324 | # --------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tests/test_layers_pos_embed.py | 326 | # --------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_layers_pos_embed.py | 754 | # --------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tests/test_layers_pos_embed.py | 756 | # --------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | timm/optim/lion.py | 22 | # ============================================================================== | COMMENT |
| MEDIUM | timm/models/beit.py | 33 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/twins.py | 8 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/twins.py | 13 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/swin_transformer_v2.py | 9 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/swin_transformer_v2.py | 14 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/swin_transformer.py | 13 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/swin_transformer.py | 18 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/focalnet.py | 15 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/focalnet.py | 20 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/hiera.py | 15 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/hiera.py | 28 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 24 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 29 | # -------------------------------------------------------- | COMMENT |
| MEDIUM | timm/data/tf_preprocessing.py | 23 | # ============================================================================== | COMMENT |
| MEDIUM | hfdocs/generate_model_docs.py | 899 | # -------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | hfdocs/generate_model_docs.py | 1005 | # -------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | hfdocs/generate_model_docs.py | 1093 | # -------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | hfdocs/generate_model_docs.py | 1138 | # -------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | hfdocs/generate_model_docs.py | 1388 | # -------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | hfdocs/generate_model_docs.py | 1588 | # -------------------------------------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | hfdocs/generate_model_docs.py | 1838 | # -------------------------------------------------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | legacy_train.py | 1056 | except KeyboardInterrupt: | CODE |
| HIGH | benchmark.py | 665 | except KeyboardInterrupt as e: | CODE |
| HIGH | benchmark.py | 367 | except RuntimeError as e: | CODE |
| HIGH | validate.py | 561 | except KeyboardInterrupt as e: | CODE |
| HIGH | train.py | 1398 | except KeyboardInterrupt: | CODE |
| HIGH | bulk_runner.py | 209 | except KeyboardInterrupt as e: | CODE |
| HIGH | tests/test_models.py | 204 | except Exception: | CODE |
| HIGH | tests/test_models.py | 684 | except Exception: | CODE |
| HIGH | timm/optim/__init__.py | 30 | except ImportError: | CODE |
| HIGH | timm/optim/_helpers.py | 302 | except AttributeError: | CODE |
| HIGH | timm/utils/jit.py | 33 | except Exception: | CODE |
| HIGH | timm/utils/jit.py | 42 | except Exception: | CODE |
| HIGH | timm/utils/summary.py | 10 | except ImportError: | CODE |
| HIGH | timm/models/_hub.py | 264 | except EntryNotFoundError: | CODE |
| HIGH | hfdocs/generate_model_docs.py | 1259 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | timm/optim/_optim_factory.py | 161 | Get the OptimInfo for an optimizer. Args: name: Name of the optimizer Returns: | STRING |
| HIGH | timm/optim/_optim_factory.py | 182 | Get the optimizer class with any default arguments applied. This allows direct instantiation of optimizers with | STRING |
| HIGH | timm/optim/_optim_factory.py | 245 | Create an optimizer instance. Args: model_or_params: Model or parameters to optimize op | STRING |
| HIGH | timm/optim/_optim_factory.py | 1142 | List available optimizer names, optionally filtered. List all registered optimizers, with optional filtering using | STRING |
| HIGH | timm/optim/_optim_factory.py | 1183 | Get the OptimInfo for an optimizer. Args: name: Name of the optimizer Returns: OptimInfo confi | STRING |
| HIGH | timm/optim/_optim_factory.py | 1201 | Get optimizer class by name with option to bind default arguments. Retrieves the optimizer class or a partial funct | STRING |
| HIGH | timm/optim/_optim_factory.py | 1250 | Create an optimizer instance via timm registry. Creates and configures an optimizer with appropriate parameter grou | STRING |
| HIGH | timm/optim/muon.py | 271 | Check if a parameter is suitable for Muon optimization. Args: param: Parameter tensor min_dim_size: | STRING |
| HIGH | timm/models/_efficientnet_builder.py | 82 | Decode block definition string Gets a list of block arg (dicts) through a string notation of arguments. E.g. i | STRING |
| HIGH | timm/models/_factory.py | 29 | Parse source and name from potentially prefixed model name. Everything after a recognized source prefix is treated | STRING |
| HIGH | timm/models/_registry.py | 410 | Get a copy of the pretrained cfg for a model name, the default tag is used if none specified. Args: model_ | STRING |
| HIGH | timm/models/_manipulate.py | 290 | Adapt pretrained input convolution weights to a different channel count. Args: in_chans: Number of input ch | STRING |
| HIGH | timm/data/auto_augment.py | 587 | Create a AutoAugment transform Args: config_str: String defining configuration of auto augmentation. Consi | STRING |
| HIGH | timm/data/auto_augment.py | 768 | Create a RandAugment transform Args: config_str (str): String defining configuration of random augmentatio | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | timm/models/hieradet_sam2.py | 433 | self.head.fc.weight.data.mul_(head_init_scale) | CODE |
| CRITICAL | timm/models/hieradet_sam2.py | 434 | self.head.fc.bias.data.mul_(head_init_scale) | CODE |
| CRITICAL | timm/models/hiera.py | 636 | self.head.fc.weight.data.mul_(head_init_scale) | CODE |
| CRITICAL | timm/models/hiera.py | 637 | self.head.fc.bias.data.mul_(head_init_scale) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | avg_checkpoints.py | 85 | print("Error: Output filename ({}) already exists.".format(output)) | CODE |
| MEDIUM | avg_checkpoints.py | 113 | print('Error: No checkpoints found to average.') | CODE |
| MEDIUM | avg_checkpoints.py | 121 | print(f"Error: Checkpoint ({c}) doesn't exist") | CODE |
| LOW | bulk_runner.py | 203 | except Exception as e: | CODE |
| MEDIUM | clean_checkpoint.py | 42 | print("Error: Output filename ({}) already exists.".format(args.output)) | CODE |
| MEDIUM | clean_checkpoint.py | 110 | print("Error: Checkpoint ({}) doesn't exist".format(checkpoint)) | CODE |
| LOW | tests/test_models.py | 204 | except Exception: | CODE |
| LOW | tests/test_models.py | 684 | except Exception: | CODE |
| LOW | timm/layers/blur_pool.py | 118 | except Exception: | CODE |
| LOW | timm/optim/lamb.py | 377 | except Exception: | CODE |
| LOW | timm/optim/_helpers.py | 121 | except Exception: | CODE |
| LOW | timm/optim/_helpers.py | 249 | except Exception: | CODE |
| LOW | timm/utils/jit.py | 33 | except Exception: | CODE |
| LOW | timm/utils/jit.py | 42 | except Exception: | CODE |
| LOW | timm/utils/checkpoint_saver.py | 122 | except Exception as e: | CODE |
| LOW | timm/utils/checkpoint_saver.py | 197 | except Exception as e: | CODE |
| LOW | timm/models/eva.py | 1362 | except Exception as e: | CODE |
| LOW | timm/models/_hub.py | 666 | except Exception as _: | CODE |
| LOW⚡ | timm/models/_helpers.py | 36 | except Exception: | CODE |
| LOW | timm/data/naflex_dataset.py | 545 | except Exception as e: | CODE |
| LOW | timm/data/readers/reader_wds.py | 60 | except Exception as e: | CODE |
| LOW | hfdocs/generate_model_docs.py | 1212 | except Exception: | CODE |
| LOW | hfdocs/generate_model_docs.py | 1259 | except Exception: | CODE |
| LOW | hfdocs/generate_model_docs.py | 1273 | except Exception as e: | CODE |
| LOW | hfdocs/generate_model_docs.py | 1319 | except Exception: | CODE |
| LOW | hfdocs/generate_model_docs.py | 1332 | except Exception: | CODE |
| LOW | hfdocs/generate_model_docs.py | 1439 | except Exception: | CODE |
| LOW | hfdocs/generate_model_docs.py | 1533 | except Exception as e: | CODE |
| MEDIUM | hfdocs/generate_model_docs.py | 1326 | def _dynamic_img_size(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | timm/layers/pos_embed_rel.py | 41 | num_relative_distance = (2 * q_size[0] - 1) * (2 * q_size[1] - 1) | COMMENT |
| LOW | timm/layers/patch_embed.py | 661 | else: | COMMENT |
| LOW | timm/layers/patch_embed.py | 681 | # """ | COMMENT |
| LOW | timm/layers/patch_embed.py | 701 | # | COMMENT |
| LOW | timm/layers/patch_embed.py | 721 | # x = x.flatten(2).transpose(1, 2) # BCHW -> BNC | COMMENT |
| LOW | timm/layers/cond_conv2d.py | 121 | COMMENT | |
| LOW | timm/optim/lion.py | 1 | """ Lion Optimizer | COMMENT |
| LOW | timm/optim/lamb.py | 21 | # Copyright (c) 2021, Habana Labs Ltd. All rights reserved. | COMMENT |
| LOW | timm/optim/lamb.py | 41 | # Permission is hereby granted, free of charge, to any person obtaining a copy | COMMENT |
| LOW | timm/optim/adan.py | 1 | """ Adan Optimizer | COMMENT |
| LOW | timm/utils/distributed.py | 121 | dist_backend = dist_backends.get(device_type, 'gloo') | COMMENT |
| LOW | timm/models/volo.py | 1 | """ Vision OutLOoker (VOLO) implementation | COMMENT |
| LOW | timm/models/efficientvit_mit.py | 1181 | # # hf_hub_id='timm/', | COMMENT |
| LOW | timm/models/efficientvit_mit.py | 1281 | # def efficientvit_l1_sam(pretrained=False, **kwargs): | COMMENT |
| LOW | timm/models/resnetv2.py | 21 | # Copyright 2020 Google LLC | COMMENT |
| LOW | timm/models/efficientvit_msra.py | 741 | return x | COMMENT |
| LOW | timm/models/efficientvit_msra.py | 761 | # tmp_dict[k] = v | COMMENT |
| LOW | timm/models/shvit.py | 481 | # downsample_mapping = {} | COMMENT |
| LOW | timm/models/fasternet.py | 401 | # if 'avgpool_pre_head' in state_dict: | COMMENT |
| LOW | timm/models/twins.py | 101 | x = x[:, :H, :W, :].contiguous() | COMMENT |
| LOW | timm/models/twins.py | 121 | # x = x.reshape(B, _h, self.ws, _w, self.ws, C).transpose(2, 3) # B, _h, _w, ws, ws, C | COMMENT |
| LOW | timm/models/metaformer.py | 21 | # Licensed under the Apache License, Version 2.0 (the "License"); | COMMENT |
| LOW | timm/models/visformer.py | 541 | # def visformer_net2(pretrained=False, **kwargs): | COMMENT |
| LOW | timm/models/visformer.py | 561 | # init_channels=32, embed_dim=384, depth=12, num_heads=6, mlp_ratio=4., attn_stage='111', | COMMENT |
| LOW | timm/models/visformer.py | 581 | # model.default_cfg = _cfg() | COMMENT |
| LOW | timm/data/tf_preprocessing.py | 1 | """ Tensorflow Preprocessing Adapter | COMMENT |
| LOW | timm/data/readers/reader_hfids.py | 161 | # will shuffle the list of shards and use a shuffle buffer | COMMENT |
| LOW | .github/workflows/trufflehog.yml | 21 | # Pin the scanner image, the action otherwise runs ghcr.io/trufflesecurity/trufflehog:latest | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | legacy_train.py | 689 | # Check if we should use the NaFlex scheduled loader | COMMENT |
| LOW | legacy_train.py | 753 | # Check if we have model's patch size for NaFlex mode | COMMENT |
| LOW | train.py | 850 | # Check if we should use the NaFlex scheduled loader | COMMENT |
| LOW | train.py | 930 | # Check if we have model's patch size for NaFlex mode | COMMENT |
| LOW | timm/layers/blur_pool.py | 143 | # Check if aa_layer is a partial and already has device/dtype set | COMMENT |
| LOW | timm/optim/muon.py | 580 | # Increment step | COMMENT |
| LOW | timm/models/vision_transformer.py | 3242 | # Check if we should use NaFlexVit instead | COMMENT |
| LOW | timm/models/fastvit.py | 106 | # Check if SE-ReLU is requested | COMMENT |
| LOW | timm/models/naflexvit.py | 303 | # Check if we need EVA block features | COMMENT |
| LOW | timm/models/naflexvit.py | 2050 | # Check if it's a perfect square for a standard grid | COMMENT |
| LOW | timm/models/eva.py | 1439 | # Check if we should use NaFlexVit implementation | COMMENT |
| LOW | timm/models/_hub.py | 512 | # Check if README file already exist in repo | COMMENT |
| LOW | timm/models/_helpers.py | 150 | # Check if safetensors or not and load weights accordingly | COMMENT |
| LOW | timm/data/naflex_dataset.py | 120 | # Check if patches are flattened or unflattened | COMMENT |
| LOW | convert/convert_gemma4_vit.py | 97 | # Check if this is a vision key (vision_tower or vision_model) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | timm/models/_factory.py | 203 | >>> # Create a MobileNetV3-Large model with no pretrained weights. | STRING |
| MEDIUM⚡ | timm/models/_factory.py | 206 | >>> # Create a MobileNetV3-Large model with pretrained weights. | STRING |
| MEDIUM⚡ | timm/models/_factory.py | 211 | >>> # Create a MobileNetV3-Large model with pretrained weights and a new head with 10 classes. | STRING |
| MEDIUM⚡ | timm/models/_factory.py | 216 | >>> # Create a Dinov2 small model with pretrained weights and save weights in a custom directory. | STRING |
| MEDIUM | timm/models/naflexvit.py | 1069 | # Create the float mask and apply masking using additive mask convention | COMMENT |
| MEDIUM | timm/models/hiera.py | 159 | # Create a view of the tensor with the patch stride as separate dims | COMMENT |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 105 | r"""This class implements window-based Multi-Head-Attention with log-spaced continuous position bias. | CODE |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 260 | r"""This class implements the Swin transformer block. | CODE |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 617 | r"""This class implements a stage of the Swin transformer including multiple layers. | CODE |
| MEDIUM | timm/data/naflex_loader.py | 444 | # Create the collator | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | timm/layers/norm_act.py | 156 | # but ONLY when used in conjunction with the timm conversion function below. | STRING |
| MEDIUM | timm/models/gemma4_vit.py | 1401 | # so the test harness' size-clamp doesn't land at 128 and blow the | COMMENT |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 704 | """ Updates the resolution to utilize and the window size and so the pair-wise relative positions. | STRING |
| MEDIUM | timm/data/imagenet_info.py | 41 | # which will be more robust than a guess based on num_classes | COMMENT |
| LOW | timm/data/naflex_dataset.py | 62 | # If no divisor specified, just use integer division | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | timm/models/naflexvit.py | 1688 | spatial reshape is undefined); with ``output_dict=True`` the result also carries 'patch_valid' | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | timm/models/xception.py | 288 | # The resize parameter of the validation transform should be 333, and make sure to center crop at 299x299 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | timm/data/naflex_transforms.py | 261 | # Step 1: Get the maximum allowed dimensions from sequence length constraint | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | timm/data/naflex_transforms.py | 261 | # Step 1: Get the maximum allowed dimensions from sequence length constraint | COMMENT |