AI Slop Code RIsk Monitor

huggingface/pytorch-image-models

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

9.2 Moderate pattern signal View on GitHub

Maintenance and Governance Review

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.

9.2
Adjusted Signal
9.2
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
37.2K
Stars
Python
Language
361.2K
Lines of Code
397
Files
2.5K
Pattern Hits
2026-10-12
Scan Date
0.60
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 16.9/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 1283 finding(s).

Hallucinated Dependency & Supply Chain Risk 7.9/100 · LOW

Are imports declared and package/API names verified? 812 finding(s).

Agent Over-Engineering Ratio 28.4/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 1493 finding(s).

PR Review Velocity Impact 41.3/100 · MEDIUM

Which changes need focused human review? 2548 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 4HIGH 234MEDIUM 48LOW 2262

Directory Score Breakdown

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.

Pattern Findings

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.

Cross-File Repetition204 hits · 1020 pts
SeverityFileLineSnippetContext
HIGHtimm/optim/mars.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/lamb.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/adafactor.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/nvnovograd.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/adabelief.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/adamw.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/laprop.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/nadam.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/rmsprop_tf.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/madgrad.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/sgdw.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/lars.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/nadamw.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/optim/adopt.py0perform a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and returnsSTRING
HIGHtimm/models/repvit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/tiny_vit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/ghostnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/davit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/efficientvit_mit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/rexnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/edgenext.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/swiftformer.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/nest.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/regnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/resnetv2.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/efficientvit_msra.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/shvit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/tresnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/fastvit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/fasternet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/efficientformer.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/levit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/vovnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/inception_v4.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/maxxvit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/metaformer.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/repghost.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/swin_transformer_v2.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/pvt_v2.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/lcnetv2.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/mambaout.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/gcvit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/starnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/inception_next.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/focalnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/pit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/swin_transformer_v2_cr.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/efficientformer_v2.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/nextvit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/hgnet.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/volo.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/xcit.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/mvitv2.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/twins.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/vision_transformer_sam.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/hiera.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/hieradet_sam2.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/vision_transformer_relpos.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/cpubone.py0forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if an int, if is a STRING
HIGHtimm/models/byobnet.py0forward 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…
Unused Imports807 hits · 555 pts
SeverityFileLineSnippetContext
LOWlegacy_train.py53CODE
LOWtrain.py70CODE
LOWinference.py9CODE
LOWclean_checkpoint.py15CODE
LOWtests/test_scheduler.py20CODE
LOWtests/test_models.py33CODE
LOWtimm/__init__.py1CODE
LOWtimm/__init__.py2CODE
LOWtimm/__init__.py2CODE
LOWtimm/__init__.py2CODE
LOWtimm/__init__.py2CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/__init__.py8CODE
LOWtimm/layers/squeeze_excite.py13CODE
LOWtimm/layers/classifier.py11CODE
LOWtimm/layers/create_act.py4CODE
LOWtimm/layers/create_act.py4CODE
LOWtimm/layers/create_act.py6CODE
LOWtimm/layers/create_act.py7CODE
LOWtimm/layers/create_norm.py9CODE
LOWtimm/layers/separable_conv.py8CODE
LOWtimm/layers/trace_utils.py2CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py1CODE
LOWtimm/layers/__init__.py11CODE
LOWtimm/layers/__init__.py12CODE
LOWtimm/layers/__init__.py12CODE
LOWtimm/layers/__init__.py12CODE
LOWtimm/layers/__init__.py12CODE
LOWtimm/layers/__init__.py18CODE
LOWtimm/layers/__init__.py18CODE
LOWtimm/layers/__init__.py18CODE
LOWtimm/layers/__init__.py18CODE
LOWtimm/layers/__init__.py19CODE
LOWtimm/layers/__init__.py19CODE
LOWtimm/layers/__init__.py19CODE
LOWtimm/layers/__init__.py20CODE
LOWtimm/layers/__init__.py20CODE
LOWtimm/layers/__init__.py21CODE
LOWtimm/layers/__init__.py21CODE
LOWtimm/layers/__init__.py22CODE
LOWtimm/layers/__init__.py22CODE
LOWtimm/layers/__init__.py23CODE
LOWtimm/layers/__init__.py23CODE
LOWtimm/layers/__init__.py23CODE
LOWtimm/layers/__init__.py23CODE
LOWtimm/layers/__init__.py24CODE
747 more matches not shown…
Hyper-Verbose Identifiers562 hits · 539 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py19def test_average_meter_zero_count():CODE
LOWtests/test_utils.py77def test_activation_stats_hook_validation():CODE
LOWtests/test_utils.py110def test_freeze_unfreeze_bn_root():CODE
LOWtests/test_utils.py127def test_activation_stats_functions():CODE
LOWtests/test_utils.py146def test_reparameterize_model():CODE
LOWtests/test_utils.py175def test_get_state_dict_custom_unwrap():CODE
LOWtests/test_utils.py193def test_freeze_unfreeze_string_input():CODE
LOWtests/test_utils.py212def test_parse_kwargs_literal_values():CODE
LOWtests/test_utils.py220def test_parse_kwargs_value_with_equals():CODE
LOWtests/test_utils.py231def test_parse_kwargs_non_literal_falls_back_to_string():CODE
LOWtests/conftest.py8def isolate_cli_backend_flags(monkeypatch):CODE
LOW⚡tests/test_task.py68def _param_group_weight_decay(optimizer):CODE
LOW⚡tests/test_task.py76def _create_tiny_distilled_student():CODE
LOW⚡tests/test_task.py86def test_distillation_train_keeps_teacher_in_eval(task_cls):CODE
LOWtests/test_task.py122def test_token_distillation_reuses_teacher_wrapper(compiled):CODE
LOWtests/test_task.py147def test_token_distillation_named_teacher_checkpoint(tmp_path):CODE
LOWtests/test_task.py171def test_task_checkpoint_omits_empty_task_state_and_keeps_legacy_paths(tmp_path):CODE
LOWtests/test_task.py202def test_feature_distillation_checkpoint_keeps_projection_in_task_state(tmp_path):CODE
LOWtests/test_task.py240def test_feature_distillation_trainable_module_optimizer_grouping():CODE
LOWtests/test_task.py266def test_base_eval_model_preserves_trainable_wrapper_for_use():CODE
LOWtests/test_task.py276def test_compiled_ema_eval_model_reflects_update():CODE
LOWtests/test_task.py301def test_compiled_eval_checkpoint_load_uses_unwrapped_state_dict_target():CODE
LOWtests/test_naflex_dataset.py42def test_naflex_epoch_batches_are_prepared_when_iteration_starts():CODE
LOWtests/test_naflex_dataset.py64def test_naflex_persistent_workers_read_shared_epoch():CODE
LOWtests/test_naflex_dataset.py88def test_naflex_persistent_workers_disable_mixup_at_configured_epoch():CODE
LOWtests/test_naflex_dataset.py117def test_naflex_epoch_prep_warnings_only_emitted_by_worker_zero(monkeypatch):CODE
LOW⚡tests/test_hub.py27def test_load_state_dict_from_path_prefers_preferred_file(tmp_path):CODE
LOW⚡tests/test_hub.py35def test_load_state_dict_from_path_ext_priority(tmp_path):CODE
LOW⚡tests/test_hub.py45def test_load_state_dict_from_path_multiple_same_ext_warns(tmp_path, caplog):CODE
LOW⚡tests/test_hub.py55def test_load_state_dict_from_path_accepts_str(tmp_path):CODE
LOW⚡tests/test_hub.py60def test_load_state_dict_from_path_no_checkpoint(tmp_path):CODE
LOWtests/test_input_conv.py29def test_adapt_non_rgb_input_conv(source, target, dtype):CODE
LOWtests/test_input_conv.py42def test_space_to_depth_grayscale_preserves_spatial_groups(base_channels):CODE
LOW⚡tests/test_input_conv.py55def test_default_rgb_conversion_is_preserved(target):CODE
LOW⚡tests/test_input_conv.py65def test_matching_channel_count_preserves_double_precision():CODE
LOW⚡tests/test_input_conv.py74def test_channel_counts_must_be_positive(target, source):CODE
LOWtests/test_input_conv.py123def test_load_pretrained_uses_source_channel_metadata(source_channels, target_channels, second_stem):CODE
LOW⚡tests/test_input_conv.py135def test_temporal_stacking_preserves_response_to_repeated_frames(frames):CODE
LOW⚡tests/test_input_conv.py145def test_grayscale_matches_repeating_one_band_for_every_pretrained_channel():CODE
LOW⚡tests/test_input_conv.py152def test_missing_source_metadata_retains_rgb_default():CODE
LOW⚡tests/test_input_conv.py157def test_unsupported_non_rgb_linear_stem_keeps_existing_fallback():CODE
LOW⚡tests/test_input_conv.py163def test_non_grayscale_space_to_depth_conversion_remains_explicitly_unsupported():CODE
LOW⚡tests/test_input_conv.py169def test_create_model_transfers_multispectral_checkpoint(frames):CODE
LOWtests/test_prune.py10def test_pruned_feature_info_matches_forward(model_name):CODE
LOW⚡tests/test_layers_pos_embed.py37def _legacy_build_fourier_pos_embed(CODE
LOW⚡tests/test_layers_pos_embed.py315def test_build_grid_xy_swaps_channels():CODE
LOW⚡tests/test_layers_pos_embed.py1045def test_rope_aug_invalid_config(kind, name, value):CODE
LOW⚡tests/test_layers_pos_embed.py1053def test_rope_aug_invalid_functional_config(name, value):CODE
LOW⚡tests/test_layers_pos_embed.py1062def test_rope_aug_output_dtype(kind, cached, dtype, rope_device):CODE
LOWtests/test_layers_pos_embed.py101def _legacy_build_rotary_pos_embed(CODE
LOWtests/test_layers_pos_embed.py255def test_build_fourier_pos_embed_matches_legacy(CODE
LOWtests/test_layers_pos_embed.py280def test_build_rotary_pos_embed_matches_legacy(CODE
LOWtests/test_layers_pos_embed.py339def test_rotary_module_matches_functional(cls, kwargs, rotate_half):CODE
LOWtests/test_layers_pos_embed.py366def test_rotary_cat_get_batch_embeds_matches_get_embed(kwargs, seq_len):CODE
LOWtests/test_layers_pos_embed.py489def test_rotary_init_after_to_empty(cls, feat_shape):CODE
LOWtests/test_layers_pos_embed.py508def test_rotary_module_forward_nchw(cls, feat_shape, rotate_half):CODE
LOWtests/test_layers_pos_embed.py529def test_mixed_rope_low_precision_cast():CODE
LOWtests/test_layers_pos_embed.py591def test_mrope_reference_precision_and_meta_init(rope_device, low_dtype, dim, sections):CODE
LOWtests/test_layers_pos_embed.py638def test_rope_batch_padding_dtype_and_gradients(kind):CODE
LOWtests/test_layers_pos_embed.py666def test_mixed_rope_forward_per_block(feat_shape, block_index):CODE
502 more matches not shown…
AI Structural Patterns478 hits · 476 pts
SeverityFileLineSnippetContext
LOWlegacy_train.py1076CODE
LOWbenchmark.py215CODE
LOWtrain.py1419CODE
LOWtests/test_layers_pos_embed.py98CODE
LOWtests/test_layers_pos_embed.py37CODE
LOWtests/test_layers_pos_embed.py101CODE
LOWtimm/layers/std_conv.py35CODE
LOWtimm/layers/std_conv.py76CODE
LOWtimm/layers/std_conv.py121CODE
LOWtimm/layers/std_conv.py182CODE
LOWtimm/layers/squeeze_excite.py30CODE
LOWtimm/layers/squeeze_excite.py109CODE
LOWtimm/layers/attention.py53CODE
LOWtimm/layers/attention.py159CODE
LOWtimm/layers/classifier.py249CODE
LOWtimm/layers/attention_pool2d.py36CODE
LOWtimm/layers/attention_pool2d.py200CODE
LOWtimm/layers/pos_embed_sincos.py116CODE
LOWtimm/layers/pos_embed_sincos.py373CODE
LOWtimm/layers/pos_embed_sincos.py292CODE
LOWtimm/layers/pos_embed_sincos.py530CODE
LOWtimm/layers/pos_embed_sincos.py608CODE
LOWtimm/layers/pos_embed_sincos.py746CODE
LOWtimm/layers/pos_embed_sincos.py1049CODE
LOWtimm/layers/pos_embed_sincos.py1141CODE
LOWtimm/layers/pos_embed_sincos.py1392CODE
LOWtimm/layers/separable_conv.py19CODE
LOWtimm/layers/separable_conv.py85CODE
LOWtimm/layers/gather_excite.py29CODE
LOWtimm/layers/non_local_attn.py153CODE
LOWtimm/layers/other_pool.py195CODE
LOWtimm/layers/other_pool.py286CODE
LOWtimm/layers/bottleneck_attn.py122CODE
LOWtimm/layers/bottleneck_attn.py185CODE
LOWtimm/layers/lambda_layer.py73CODE
LOWtimm/layers/lambda_layer.py171CODE
LOWtimm/layers/attention_pool.py20CODE
LOWtimm/layers/mlp.py19CODE
LOWtimm/layers/mlp.py63CODE
LOWtimm/layers/mlp.py120CODE
LOWtimm/layers/mlp.py171CODE
LOWtimm/layers/mlp.py218CODE
LOWtimm/layers/mlp.py256CODE
LOWtimm/layers/diff_attention.py37CODE
LOWtimm/layers/hybrid_embed.py28CODE
LOWtimm/layers/hybrid_embed.py231CODE
LOWtimm/layers/conv_bn_act.py16CODE
LOWtimm/layers/halo_attn.py142CODE
LOWtimm/layers/halo_attn.py247CODE
LOWtimm/layers/attention2d.py27CODE
LOWtimm/layers/attention2d.py107CODE
LOWtimm/layers/attention2d.py324CODE
LOWtimm/layers/patch_embed.py32CODE
LOWtimm/layers/patch_embed.py153CODE
LOWtimm/layers/eca.py61CODE
LOWtimm/layers/eca.py135CODE
LOWtimm/layers/global_context.py23CODE
LOWtimm/layers/split_attn.py38CODE
LOWtimm/layers/selective_kernel.py63CODE
LOWtimm/layers/cbam.py24CODE
418 more matches not shown…
Modern Structural Boilerplate177 hits · 178 pts
SeverityFileLineSnippetContext
LOWtrain.py633def _set_loader_epoch(loader, epoch: int) -> None:CODE
LOWtimm/layers/attention.py12__all__ = ['Attention', 'AttentionRope', 'maybe_add_mask', 'resolve_self_attn_mask']CODE
LOWtimm/layers/config.py9__all__ = [CODE
LOWtimm/layers/pos_embed_sincos.py670 def update_feat_shape(self, feat_shape: List[int]) -> None:CODE
LOWtimm/layers/pos_embed_sincos.py787 def _update_cached_embed(self, feat_shape: List[int], bands: torch.Tensor) -> None:CODE
LOWtimm/layers/pos_embed_sincos.py852 def _update_cached_embed(self, feat_shape: List[int], bands: torch.Tensor) -> None:CODE
LOWtimm/layers/pos_embed_rel.py344 def set_window_size(self, window_size: Tuple[int, int]) -> None:CODE
LOWtimm/layers/pos_embed_rel.py503 def set_window_size(self, window_size: Tuple[int, int]) -> None:CODE
LOWtimm/layers/pos_embed_rel.py654 def set_window_size(self, window_size: Tuple[int, int]) -> None:CODE
LOWtimm/layers/_fx.py15__all__ = [CODE
LOWtimm/layers/typing.py7__all__ = ["LayerType", "PadType", "nullwrap", "disable_compiler"]CODE
LOWtimm/scheduler/scheduler.py91 def update_groups(self, values: Union[float, List[float]]) -> None:CODE
LOWtimm/optim/_types.py29__all__ = ['ParamsT', 'OptimType', 'OptimizerCallable']CODE
LOWtimm/optim/sgdw.py23__all__ = ['SGDW', 'sgdw']CODE
LOWtimm/optim/adopt.py27__all__ = ["Adopt", "adopt"]CODE
LOWtimm/models/repvit.py29__all__ = ['RepVit']CODE
LOWtimm/models/tiny_vit.py9__all__ = ['TinyVit']CODE
LOWtimm/models/deit.py25__all__ = ['VisionTransformerDistilled'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/ghostnet.py35__all__ = ['GhostNet']CODE
LOWtimm/models/volo.py37__all__ = ['VOLO'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/volo.py923 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/davit.py33__all__ = ['DaVit']CODE
LOWtimm/models/efficientvit_mit.py9__all__ = ['EfficientVit', 'EfficientVitLarge']CODE
LOWtimm/models/gemma4_vit.py40__all__ = ['Gemma4VitEncoder', 'Gemma4VitClassifier']CODE
LOWtimm/models/gemma4_vit.py808 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/gemma4_vit.py812 def set_clamp_enabled(self, enabled: bool = True) -> None:CODE
LOWtimm/models/gemma4_vit.py1145 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/gemma4_vit.py1149 def set_clamp_enabled(self, enabled: bool = True) -> None:CODE
LOWtimm/models/_efficientnet_blocks.py26__all__ = [CODE
LOWtimm/models/selecsls.py25__all__ = ['SelecSls'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/rexnet.py31__all__ = ['RexNet'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/rexnet.py338 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/inception_resnet_v2.py20__all__ = ['InceptionResnetV2']CODE
LOWtimm/models/edgenext.py38__all__ = ['EdgeNeXt'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/hrnet.py28__all__ = ['HighResolutionNet', 'HighResolutionNetFeatures'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/hieradet_sam2.py466 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/vgg.py23__all__ = ['VGG']CODE
LOWtimm/models/vgg.py198 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/byoanet.py27__all__ = []CODE
LOWtimm/models/convmixer.py17__all__ = ['ConvMixer']CODE
LOWtimm/models/swiftformer.py28__all__ = ['SwiftFormer']CODE
LOWtimm/models/nest.py49__all__ = ['Nest'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/cspnet.py30__all__ = ['CspNet'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/hardcorenas.py18__all__ = [] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/beit.py77__all__ = ['Beit']CODE
LOWtimm/models/beit.py283 def set_window_size(self, window_size: Tuple[int, int]) -> None:CODE
LOWtimm/models/beit.py476 def set_window_size(self, window_size: Tuple[int, int]) -> None:CODE
LOWtimm/models/vision_transformer_relpos.py46__all__ = ['VisionTransformerRelPos'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/xcit.py30__all__ = ['Xcit'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/regnet.py45__all__ = ['RegNet', 'RegNetCfg'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/regnet.py717 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/sequencer.py24__all__ = ['Sequencer2d'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/qwen3_vit.py56__all__ = ['Qwen3VitEncoder', 'Qwen3VitClassifier']CODE
LOWtimm/models/qwen3_vit.py275 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/qwen3_vit.py482 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/cpubone.py29__all__ = ['CPUBone']CODE
LOWtimm/models/mvitv2.py36__all__ = ['MultiScaleVit', 'MultiScaleVitCfg'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/resnetv2.py51__all__ = ['ResNetV2'] # model_registry will add each entrypoint fn to thisCODE
LOWtimm/models/resnetv2.py672 def set_grad_checkpointing(self, enable: bool = True) -> None:CODE
LOWtimm/models/vision_transformer.py117__all__ = ['VisionTransformer'] # model_registry will add each entrypoint fn to thisCODE
117 more matches not shown…
Deep Nesting168 hits · 165 pts
SeverityFileLineSnippetContext
LOWlegacy_train.py428CODE
LOWlegacy_train.py1076CODE
LOWlegacy_train.py1287CODE
LOWbenchmark.py170CODE
LOWbenchmark.py573CODE
LOWbenchmark.py629CODE
LOWbenchmark.py314CODE
LOWvalidate.py195CODE
LOWvalidate.py485CODE
LOWvalidate.py514CODE
LOWtrain.py588CODE
LOWtrain.py642CODE
LOWtrain.py1419CODE
LOWtrain.py1643CODE
LOWbulk_runner.py96CODE
LOWbulk_runner.py141CODE
LOWinference.py158CODE
LOWinference.py376CODE
LOWtests/test_task.py86CODE
LOWtests/test_layers_pos_embed.py820CODE
LOWtests/test_reader_wds.py23CODE
LOWtests/test_models.py266CODE
LOWresults/generate_csv_results.py20CODE
LOWtimm/layers/classifier.py315CODE
LOWtimm/layers/pos_embed_sincos.py116CODE
LOWtimm/layers/pos_embed_sincos.py1611CODE
LOWtimm/layers/gather_excite.py29CODE
LOWtimm/layers/non_local_attn.py71CODE
LOWtimm/layers/pos_embed_rel.py157CODE
LOWtimm/layers/adaptive_avgmax_pool.py42CODE
LOWtimm/layers/adaptive_avgmax_pool.py127CODE
LOWtimm/layers/inplace_abn.py43CODE
LOWtimm/layers/hybrid_embed.py93CODE
LOWtimm/layers/pool1d.py4CODE
LOWtimm/layers/create_attn.py22CODE
LOWtimm/layers/weight_init.py110CODE
LOWtimm/layers/norm_act.py278CODE
LOWtimm/layers/norm_act.py322CODE
LOWtimm/loss/class_weights.py94CODE
LOWtimm/scheduler/scheduler_factory.py66CODE
LOWtimm/optim/_param_groups.py19CODE
LOWtimm/optim/sgdw.py199CODE
LOWtimm/optim/sgdw.py246CODE
LOWtimm/optim/_optim_factory.py177CODE
LOWtimm/optim/adafactor.py141CODE
LOWtimm/optim/adafactor_bv.py206CODE
LOWtimm/optim/adafactor_bv.py122CODE
LOWtimm/optim/nvnovograd.py91CODE
LOWtimm/optim/adamp.py90CODE
LOWtimm/optim/adabelief.py267CODE
LOWtimm/optim/adabelief.py122CODE
LOWtimm/optim/adamw.py117CODE
LOWtimm/optim/kron.py413CODE
LOWtimm/optim/kron.py228CODE
LOWtimm/optim/muon.py535CODE
LOWtimm/optim/muon.py792CODE
LOWtimm/optim/rmsprop_tf.py227CODE
LOWtimm/optim/rmsprop_tf.py113CODE
LOWtimm/optim/sgdp.py50CODE
LOWtimm/optim/_helpers.py15CODE
108 more matches not shown…
Decorative Section Separators28 hits · 90 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_layers_pos_embed.py33# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_layers_pos_embed.py35# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_layers_pos_embed.py324# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_layers_pos_embed.py326# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_layers_pos_embed.py754# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtests/test_layers_pos_embed.py756# ---------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtimm/optim/lion.py22# ==============================================================================COMMENT
MEDIUMtimm/models/beit.py33# --------------------------------------------------------COMMENT
MEDIUMtimm/models/twins.py8# --------------------------------------------------------COMMENT
MEDIUMtimm/models/twins.py13# --------------------------------------------------------COMMENT
MEDIUMtimm/models/swin_transformer_v2.py9# --------------------------------------------------------COMMENT
MEDIUMtimm/models/swin_transformer_v2.py14# --------------------------------------------------------COMMENT
MEDIUMtimm/models/swin_transformer.py13# --------------------------------------------------------COMMENT
MEDIUMtimm/models/swin_transformer.py18# --------------------------------------------------------COMMENT
MEDIUMtimm/models/focalnet.py15# --------------------------------------------------------COMMENT
MEDIUMtimm/models/focalnet.py20# --------------------------------------------------------COMMENT
MEDIUMtimm/models/hiera.py15# --------------------------------------------------------COMMENT
MEDIUMtimm/models/hiera.py28# --------------------------------------------------------COMMENT
MEDIUMtimm/models/swin_transformer_v2_cr.py24# --------------------------------------------------------COMMENT
MEDIUMtimm/models/swin_transformer_v2_cr.py29# --------------------------------------------------------COMMENT
MEDIUMtimm/data/tf_preprocessing.py23# ==============================================================================COMMENT
MEDIUMhfdocs/generate_model_docs.py899# --------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMhfdocs/generate_model_docs.py1005# --------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMhfdocs/generate_model_docs.py1093# --------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMhfdocs/generate_model_docs.py1138# --------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMhfdocs/generate_model_docs.py1388# --------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMhfdocs/generate_model_docs.py1588# --------------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMhfdocs/generate_model_docs.py1838# --------------------------------------------------------------------------------------------------------------------COMMENT
Empty Error Handlers15 hits · 75 pts
SeverityFileLineSnippetContext
HIGHlegacy_train.py1056except KeyboardInterrupt:CODE
HIGHbenchmark.py665except KeyboardInterrupt as e:CODE
HIGHbenchmark.py367except RuntimeError as e:CODE
HIGHvalidate.py561except KeyboardInterrupt as e:CODE
HIGHtrain.py1398except KeyboardInterrupt:CODE
HIGHbulk_runner.py209except KeyboardInterrupt as e:CODE
HIGHtests/test_models.py204except Exception:CODE
HIGHtests/test_models.py684except Exception:CODE
HIGHtimm/optim/__init__.py30except ImportError:CODE
HIGHtimm/optim/_helpers.py302except AttributeError:CODE
HIGHtimm/utils/jit.py33except Exception:CODE
HIGHtimm/utils/jit.py42except Exception:CODE
HIGHtimm/utils/summary.py10except ImportError:CODE
HIGHtimm/models/_hub.py264except EntryNotFoundError:CODE
HIGHhfdocs/generate_model_docs.py1259except Exception:CODE
Docstring Block Structure14 hits · 70 pts
SeverityFileLineSnippetContext
HIGHtimm/optim/_optim_factory.py161Get the OptimInfo for an optimizer. Args: name: Name of the optimizer Returns: STRING
HIGHtimm/optim/_optim_factory.py182Get the optimizer class with any default arguments applied. This allows direct instantiation of optimizers withSTRING
HIGHtimm/optim/_optim_factory.py245Create an optimizer instance. Args: model_or_params: Model or parameters to optimize opSTRING
HIGHtimm/optim/_optim_factory.py1142List available optimizer names, optionally filtered. List all registered optimizers, with optional filtering using STRING
HIGHtimm/optim/_optim_factory.py1183Get the OptimInfo for an optimizer. Args: name: Name of the optimizer Returns: OptimInfo confiSTRING
HIGHtimm/optim/_optim_factory.py1201Get optimizer class by name with option to bind default arguments. Retrieves the optimizer class or a partial functSTRING
HIGHtimm/optim/_optim_factory.py1250Create an optimizer instance via timm registry. Creates and configures an optimizer with appropriate parameter grouSTRING
HIGHtimm/optim/muon.py271Check if a parameter is suitable for Muon optimization. Args: param: Parameter tensor min_dim_size:STRING
HIGHtimm/models/_efficientnet_builder.py82 Decode block definition string Gets a list of block arg (dicts) through a string notation of arguments. E.g. iSTRING
HIGHtimm/models/_factory.py29Parse source and name from potentially prefixed model name. Everything after a recognized source prefix is treated STRING
HIGHtimm/models/_registry.py410 Get a copy of the pretrained cfg for a model name, the default tag is used if none specified. Args: model_STRING
HIGHtimm/models/_manipulate.py290Adapt pretrained input convolution weights to a different channel count. Args: in_chans: Number of input chSTRING
HIGHtimm/data/auto_augment.py587 Create a AutoAugment transform Args: config_str: String defining configuration of auto augmentation. ConsiSTRING
HIGHtimm/data/auto_augment.py768 Create a RandAugment transform Args: config_str (str): String defining configuration of random augmentatioSTRING
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippetContext
CRITICALtimm/models/hieradet_sam2.py433 self.head.fc.weight.data.mul_(head_init_scale)CODE
CRITICALtimm/models/hieradet_sam2.py434 self.head.fc.bias.data.mul_(head_init_scale)CODE
CRITICALtimm/models/hiera.py636 self.head.fc.weight.data.mul_(head_init_scale)CODE
CRITICALtimm/models/hiera.py637 self.head.fc.bias.data.mul_(head_init_scale)CODE
Excessive Try-Catch Wrapping29 hits · 36 pts
SeverityFileLineSnippetContext
MEDIUMavg_checkpoints.py85 print("Error: Output filename ({}) already exists.".format(output))CODE
MEDIUMavg_checkpoints.py113 print('Error: No checkpoints found to average.')CODE
MEDIUMavg_checkpoints.py121 print(f"Error: Checkpoint ({c}) doesn't exist")CODE
LOWbulk_runner.py203 except Exception as e:CODE
MEDIUMclean_checkpoint.py42 print("Error: Output filename ({}) already exists.".format(args.output))CODE
MEDIUMclean_checkpoint.py110 print("Error: Checkpoint ({}) doesn't exist".format(checkpoint))CODE
LOWtests/test_models.py204 except Exception:CODE
LOWtests/test_models.py684 except Exception:CODE
LOWtimm/layers/blur_pool.py118 except Exception:CODE
LOWtimm/optim/lamb.py377except Exception:CODE
LOWtimm/optim/_helpers.py121except Exception:CODE
LOWtimm/optim/_helpers.py249except Exception:CODE
LOWtimm/utils/jit.py33 except Exception:CODE
LOWtimm/utils/jit.py42 except Exception:CODE
LOWtimm/utils/checkpoint_saver.py122 except Exception as e:CODE
LOWtimm/utils/checkpoint_saver.py197 except Exception as e:CODE
LOWtimm/models/eva.py1362 except Exception as e:CODE
LOWtimm/models/_hub.py666 except Exception as _:CODE
LOW⚡timm/models/_helpers.py36 except Exception:CODE
LOWtimm/data/naflex_dataset.py545 except Exception as e:CODE
LOWtimm/data/readers/reader_wds.py60 except Exception as e:CODE
LOWhfdocs/generate_model_docs.py1212 except Exception:CODE
LOWhfdocs/generate_model_docs.py1259 except Exception:CODE
LOWhfdocs/generate_model_docs.py1273 except Exception as e:CODE
LOWhfdocs/generate_model_docs.py1319 except Exception:CODE
LOWhfdocs/generate_model_docs.py1332 except Exception:CODE
LOWhfdocs/generate_model_docs.py1439 except Exception:CODE
LOWhfdocs/generate_model_docs.py1533 except Exception as e:CODE
MEDIUMhfdocs/generate_model_docs.py1326def _dynamic_img_size():CODE
Over-Commented Block28 hits · 28 pts
SeverityFileLineSnippetContext
LOWtimm/layers/pos_embed_rel.py41 num_relative_distance = (2 * q_size[0] - 1) * (2 * q_size[1] - 1)COMMENT
LOWtimm/layers/patch_embed.py661 else:COMMENT
LOWtimm/layers/patch_embed.py681# """COMMENT
LOWtimm/layers/patch_embed.py701#COMMENT
LOWtimm/layers/patch_embed.py721# x = x.flatten(2).transpose(1, 2) # BCHW -> BNCCOMMENT
LOWtimm/layers/cond_conv2d.py121COMMENT
LOWtimm/optim/lion.py1""" Lion OptimizerCOMMENT
LOWtimm/optim/lamb.py21# Copyright (c) 2021, Habana Labs Ltd. All rights reserved.COMMENT
LOWtimm/optim/lamb.py41# Permission is hereby granted, free of charge, to any person obtaining a copyCOMMENT
LOWtimm/optim/adan.py1""" Adan OptimizerCOMMENT
LOWtimm/utils/distributed.py121 dist_backend = dist_backends.get(device_type, 'gloo')COMMENT
LOWtimm/models/volo.py1""" Vision OutLOoker (VOLO) implementationCOMMENT
LOWtimm/models/efficientvit_mit.py1181 # # hf_hub_id='timm/',COMMENT
LOWtimm/models/efficientvit_mit.py1281# def efficientvit_l1_sam(pretrained=False, **kwargs):COMMENT
LOWtimm/models/resnetv2.py21# Copyright 2020 Google LLCCOMMENT
LOWtimm/models/efficientvit_msra.py741 return xCOMMENT
LOWtimm/models/efficientvit_msra.py761# tmp_dict[k] = vCOMMENT
LOWtimm/models/shvit.py481 # downsample_mapping = {}COMMENT
LOWtimm/models/fasternet.py401 # if 'avgpool_pre_head' in state_dict:COMMENT
LOWtimm/models/twins.py101 x = x[:, :H, :W, :].contiguous()COMMENT
LOWtimm/models/twins.py121 # x = x.reshape(B, _h, self.ws, _w, self.ws, C).transpose(2, 3) # B, _h, _w, ws, ws, CCOMMENT
LOWtimm/models/metaformer.py21# Licensed under the Apache License, Version 2.0 (the "License");COMMENT
LOWtimm/models/visformer.py541# def visformer_net2(pretrained=False, **kwargs):COMMENT
LOWtimm/models/visformer.py561# init_channels=32, embed_dim=384, depth=12, num_heads=6, mlp_ratio=4., attn_stage='111',COMMENT
LOWtimm/models/visformer.py581# model.default_cfg = _cfg()COMMENT
LOWtimm/data/tf_preprocessing.py1""" Tensorflow Preprocessing AdapterCOMMENT
LOWtimm/data/readers/reader_hfids.py161 # will shuffle the list of shards and use a shuffle bufferCOMMENT
LOW.github/workflows/trufflehog.yml21 # Pin the scanner image, the action otherwise runs ghcr.io/trufflesecurity/trufflehog:latestCOMMENT
Redundant / Tautological Comments15 hits · 22 pts
SeverityFileLineSnippetContext
LOWlegacy_train.py689 # Check if we should use the NaFlex scheduled loaderCOMMENT
LOWlegacy_train.py753 # Check if we have model's patch size for NaFlex modeCOMMENT
LOWtrain.py850 # Check if we should use the NaFlex scheduled loaderCOMMENT
LOWtrain.py930 # Check if we have model's patch size for NaFlex modeCOMMENT
LOWtimm/layers/blur_pool.py143 # Check if aa_layer is a partial and already has device/dtype setCOMMENT
LOWtimm/optim/muon.py580 # Increment stepCOMMENT
LOWtimm/models/vision_transformer.py3242 # Check if we should use NaFlexVit insteadCOMMENT
LOWtimm/models/fastvit.py106 # Check if SE-ReLU is requestedCOMMENT
LOWtimm/models/naflexvit.py303 # Check if we need EVA block featuresCOMMENT
LOWtimm/models/naflexvit.py2050 # Check if it's a perfect square for a standard gridCOMMENT
LOWtimm/models/eva.py1439 # Check if we should use NaFlexVit implementationCOMMENT
LOWtimm/models/_hub.py512 # Check if README file already exist in repoCOMMENT
LOWtimm/models/_helpers.py150 # Check if safetensors or not and load weights accordinglyCOMMENT
LOWtimm/data/naflex_dataset.py120 # Check if patches are flattened or unflattenedCOMMENT
LOWconvert/convert_gemma4_vit.py97 # Check if this is a vision key (vision_tower or vision_model)COMMENT
Self-Referential Comments10 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUM⚡timm/models/_factory.py203 >>> # Create a MobileNetV3-Large model with no pretrained weights.STRING
MEDIUM⚡timm/models/_factory.py206 >>> # Create a MobileNetV3-Large model with pretrained weights.STRING
MEDIUM⚡timm/models/_factory.py211 >>> # Create a MobileNetV3-Large model with pretrained weights and a new head with 10 classes.STRING
MEDIUM⚡timm/models/_factory.py216 >>> # Create a Dinov2 small model with pretrained weights and save weights in a custom directory.STRING
MEDIUMtimm/models/naflexvit.py1069 # Create the float mask and apply masking using additive mask conventionCOMMENT
MEDIUMtimm/models/hiera.py159 # Create a view of the tensor with the patch stride as separate dimsCOMMENT
MEDIUMtimm/models/swin_transformer_v2_cr.py105 r"""This class implements window-based Multi-Head-Attention with log-spaced continuous position bias.CODE
MEDIUMtimm/models/swin_transformer_v2_cr.py260 r"""This class implements the Swin transformer block.CODE
MEDIUMtimm/models/swin_transformer_v2_cr.py617 r"""This class implements a stage of the Swin transformer including multiple layers.CODE
MEDIUMtimm/data/naflex_loader.py444 # Create the collatorCOMMENT
AI Slop Vocabulary5 hits · 10 pts
SeverityFileLineSnippetContext
MEDIUMtimm/layers/norm_act.py156 # but ONLY when used in conjunction with the timm conversion function below.STRING
MEDIUMtimm/models/gemma4_vit.py1401 # so the test harness' size-clamp doesn't land at 128 and blow theCOMMENT
MEDIUMtimm/models/swin_transformer_v2_cr.py704 """ Updates the resolution to utilize and the window size and so the pair-wise relative positions.STRING
MEDIUMtimm/data/imagenet_info.py41 # which will be more robust than a guess based on num_classesCOMMENT
LOWtimm/data/naflex_dataset.py62 # If no divisor specified, just use integer divisionCOMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHtimm/models/naflexvit.py1688 spatial reshape is undefined); with ``output_dict=True`` the result also carries 'patch_valid'STRING
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtimm/models/xception.py288 # The resize parameter of the validation transform should be 333, and make sure to center crop at 299x299COMMENT
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtimm/data/naflex_transforms.py261 # Step 1: Get the maximum allowed dimensions from sequence length constraintCOMMENT
Structural Annotation Overuse1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtimm/data/naflex_transforms.py261 # Step 1: Get the maximum allowed dimensions from sequence length constraintCOMMENT