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
1509 matches across 14 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/test_models.py | 0 | run a single forward pass with each model in feature extraction mode |
| HIGH | tests/test_models.py | 0 | run a single forward pass with each model in feature extraction mode |
| HIGH | tests/test_models.py | 0 | run a single forward pass with each model in feature extraction mode |
| HIGH | timm/layers/activations.py | 0 | applies the gaussian error linear units function (w/ dummy inplace arg) |
| HIGH | timm/layers/activations.py | 0 | applies the gaussian error linear units function (w/ dummy inplace arg) |
| HIGH | timm/layers/activations.py | 0 | applies the gaussian error linear units function (w/ dummy inplace arg) |
| HIGH | timm/layers/norm_act.py | 0 | rmsnorm + activation for '2d' nchw tensors note: it's currently (2025-05-10) faster to use an eager 2d kernel that does |
| HIGH | timm/layers/norm_act.py | 0 | rmsnorm + activation for '2d' nchw tensors note: it's currently (2025-05-10) faster to use an eager 2d kernel that does |
| HIGH | timm/layers/norm_act.py | 0 | rmsnorm + activation for '2d' nchw tensors note: it's currently (2025-05-10) faster to use an eager 2d kernel that does |
| HIGH | timm/layers/norm_act.py | 0 | rmsnorm + activation for '2d' nchw tensors note: it's currently (2025-05-10) faster to use an eager 2d kernel that does |
| HIGH | timm/optim/mars.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/lamb.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/adafactor.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/nvnovograd.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/adabelief.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/adamw.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/laprop.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/nadam.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/rmsprop_tf.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/madgrad.py | 0 | performs a single optimization step. arguments: closure (callable, optional): a closure that reevaluates the model and r |
| HIGH | timm/optim/sgdw.py | 0 | performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return |
| HIGH | timm/optim/lars.py | 0 | performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return |
| HIGH | timm/optim/nadamw.py | 0 | performs a single optimization step. args: closure (callable, optional): a closure that reevaluates the model and return |
| HIGH | timm/models/repvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/tiny_vit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/ghostnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/davit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/efficientvit_mit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/efficientvit_mit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/rexnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/edgenext.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/swiftformer.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/nest.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/regnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/resnetv2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/efficientvit_msra.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/shvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/tresnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/fastvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/fasternet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/efficientformer.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/levit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/vovnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/inception_v4.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/maxxvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/metaformer.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/repghost.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/swin_transformer_v2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/pvt_v2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/mambaout.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/gcvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/starnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/inception_next.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/focalnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/pit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| 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 int, all if none |
| HIGH | timm/models/efficientformer_v2.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/nextvit.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/hgnet.py | 0 | forward features that returns intermediates. args: x: input image tensor indices: take last n blocks if int, all if none |
| HIGH | timm/models/repvit.py | 0 | prune layers not required for specified intermediates. |
| 183 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | legacy_train.py | 53 | |
| LOW | train.py | 60 | |
| LOW | inference.py | 9 | |
| LOW | clean_checkpoint.py | 15 | |
| LOW | tests/test_scheduler.py | 18 | |
| LOW | tests/test_models.py | 30 | |
| LOW | timm/__init__.py | 1 | |
| LOW | timm/__init__.py | 2 | |
| LOW | timm/__init__.py | 2 | |
| LOW | timm/__init__.py | 2 | |
| LOW | timm/__init__.py | 2 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/__init__.py | 8 | |
| LOW | timm/layers/squeeze_excite.py | 13 | |
| LOW | timm/layers/classifier.py | 11 | |
| LOW | timm/layers/create_act.py | 4 | |
| LOW | timm/layers/create_act.py | 4 | |
| LOW | timm/layers/create_act.py | 6 | |
| LOW | timm/layers/create_act.py | 7 | |
| LOW | timm/layers/create_norm.py | 9 | |
| LOW | timm/layers/separable_conv.py | 8 | |
| LOW | timm/layers/trace_utils.py | 2 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 1 | |
| LOW | timm/layers/__init__.py | 11 | |
| LOW | timm/layers/__init__.py | 12 | |
| LOW | timm/layers/__init__.py | 12 | |
| LOW | timm/layers/__init__.py | 12 | |
| LOW | timm/layers/__init__.py | 12 | |
| LOW | timm/layers/__init__.py | 18 | |
| LOW | timm/layers/__init__.py | 18 | |
| LOW | timm/layers/__init__.py | 18 | |
| LOW | timm/layers/__init__.py | 18 | |
| LOW | timm/layers/__init__.py | 19 | |
| LOW | timm/layers/__init__.py | 19 | |
| LOW | timm/layers/__init__.py | 19 | |
| LOW | timm/layers/__init__.py | 20 | |
| LOW | timm/layers/__init__.py | 20 | |
| LOW | timm/layers/__init__.py | 21 | |
| LOW | timm/layers/__init__.py | 21 | |
| LOW | timm/layers/__init__.py | 22 | |
| LOW | timm/layers/__init__.py | 22 | |
| LOW | timm/layers/__init__.py | 23 | |
| LOW | timm/layers/__init__.py | 23 | |
| LOW | timm/layers/__init__.py | 23 | |
| LOW | timm/layers/__init__.py | 23 | |
| LOW | timm/layers/__init__.py | 24 | |
| 713 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_utils.py | 66 | def test_activation_stats_hook_validation(): |
| LOW | tests/test_utils.py | 99 | def test_freeze_unfreeze_bn_root(): |
| LOW | tests/test_utils.py | 116 | def test_activation_stats_functions(): |
| LOW | tests/test_utils.py | 135 | def test_reparameterize_model(): |
| LOW | tests/test_utils.py | 164 | def test_get_state_dict_custom_unwrap(): |
| LOW | tests/test_utils.py | 182 | def test_freeze_unfreeze_string_input(): |
| LOW | tests/test_task.py | 64 | def _param_group_weight_decay(optimizer): |
| LOW | tests/test_task.py | 72 | def test_task_checkpoint_omits_empty_task_state_and_keeps_legacy_paths(tmp_path): |
| LOW | tests/test_task.py | 103 | def test_feature_distillation_checkpoint_keeps_projection_in_task_state(tmp_path): |
| LOW | tests/test_task.py | 141 | def test_feature_distillation_trainable_module_optimizer_grouping(): |
| LOW | tests/test_task.py | 167 | def test_base_eval_model_preserves_trainable_wrapper_for_use(): |
| LOW | tests/test_task.py | 177 | def test_compiled_ema_eval_model_reflects_update(): |
| LOW | tests/test_task.py | 202 | def test_compiled_eval_checkpoint_load_uses_unwrapped_state_dict_target(): |
| LOW | tests/test_layers.py | 81 | def test_get_act_layer_empty_string(): |
| LOW | tests/test_layers.py | 86 | def test_create_act_layer_inplace_error(): |
| LOW | tests/test_layers.py | 98 | def test_create_act_layer_edge_cases(): |
| LOW | tests/test_optim.py | 29 | def _test_basic_cases_template(weight, bias, input, constructor, scheduler_constructors): |
| LOW | tests/test_optim.py | 289 | def _build_params_dict_single(weight, bias, **kwargs): |
| LOW | tests/test_optim.py | 563 | def test_param_groups_layer_decay_with_min(): |
| LOW | tests/test_optim.py | 586 | def test_param_groups_layer_decay_with_matcher(): |
| LOW | tests/test_optim.py | 612 | def test_param_groups_weight_decay(): |
| LOW | tests/test_scheduler.py | 70 | def test_plateau_scheduler_step(self): |
| LOW | tests/test_scheduler.py | 122 | def test_warmup_prefix_reaches_target_lr(self, scheduler_cls, kwargs): |
| LOW | tests/test_scheduler.py | 347 | def test_state_dict_save_load(self, scheduler_cls, kwargs): |
| LOW | tests/test_scheduler.py | 368 | def test_plateau_state_dict_save_load(self): |
| LOW | tests/test_scheduler.py | 400 | def test_step_update_with_t_in_epochs_false(self, scheduler_cls, kwargs): |
| LOW | tests/test_scheduler.py | 430 | def test_multiple_param_groups(self, scheduler_cls, kwargs): |
| LOW | tests/test_models.py | 341 | def test_model_default_cfgs_non_std(model_name, batch_size): |
| LOW | tests/test_models.py | 412 | def test_model_load_pretrained(model_name, batch_size): |
| LOW | tests/test_models.py | 421 | def test_model_features_pretrained(model_name, batch_size): |
| LOW | tests/test_models.py | 431 | def test_model_forward_torchscript(model_name, batch_size): |
| LOW | tests/test_models.py | 461 | def test_model_forward_features(model_name, batch_size): |
| LOW | tests/test_models.py | 492 | def test_model_forward_intermediates_features(model_name, batch_size): |
| LOW | tests/test_models.py | 523 | def test_model_forward_intermediates(model_name, batch_size): |
| LOW | tests/test_models.py | 712 | def test_model_forward_fx_torchscript(model_name, batch_size): |
| LOW | tests/test_models.py | 737 | def test_model_forward_torchscript_with_features_fx(model_name, batch_size): |
| LOW | tests/test_checkpoint_loading.py | 23 | def test_weights_only_allows_argparse_namespace(tmp_path): |
| LOW | tests/test_checkpoint_loading.py | 36 | def test_weights_only_blocks_non_allowlisted_globals(tmp_path): |
| LOW | tests/test_checkpoint_loading.py | 52 | def test_resume_checkpoint_default_weights_only_namespace(tmp_path): |
| LOW | tests/test_checkpoint_loading.py | 82 | def test_resume_checkpoint_blocks_non_allowlisted_globals(tmp_path): |
| LOW | tests/test_checkpoint_loading.py | 95 | def test_resume_checkpoint_weights_only_false_allows_custom_globals(tmp_path): |
| LOW | tests/test_layers_drop.py | 125 | def test_deprecated_args_accepted(self): |
| LOW | tests/test_layers_drop.py | 156 | def test_couple_channels_parameter(self): |
| LOW | tests/test_layers_drop.py | 186 | def test_no_drop_when_prob_zero(self): |
| LOW | tests/test_layers_drop.py | 192 | def test_no_drop_when_not_training(self): |
| LOW | tests/test_layers_drop.py | 214 | def test_drop_path_no_scaling(self): |
| LOW | tests/test_layers_pool.py | 78 | def test_attention_pool_latent_basic(self): |
| LOW | tests/test_layers_pool.py | 85 | def test_attention_pool_latent_multi_latent(self): |
| LOW | tests/test_layers_pool.py | 231 | def test_attention_pool_prr_basic(self): |
| LOW | tests/test_layers_pool.py | 238 | def test_attention_pool_prr_avg_pool(self): |
| LOW | tests/test_layers_pool.py | 245 | def test_attention_pool_prr_parameter_free(self): |
| LOW | tests/test_layers_pool.py | 251 | def test_attention_pool_prr_with_norms(self): |
| LOW | tests/test_layers_pool.py | 274 | def test_attention_pool_latent_out_features(self, out_features, embed_dim, expected_out): |
| LOW | tests/test_layers_pool.py | 322 | def test_lse_high_r_approximates_max(self): |
| LOW | tests/test_layers_pool.py | 330 | def test_lse_low_r_approximates_avg(self): |
| LOW | tests/test_layers_pool.py | 338 | def test_lse_learnable_r_gradient(self): |
| LOW | tests/test_layers_pool.py | 460 | def test_different_spatial_sizes(self, pool_cls, kwargs, input_shape): |
| LOW | timm/layers/pos_embed_sincos.py | 200 | def init_non_persistent_buffers(self) -> None: |
| LOW | timm/layers/pos_embed_sincos.py | 496 | def init_non_persistent_buffers(self) -> None: |
| LOW | timm/layers/pos_embed_sincos.py | 630 | def init_non_persistent_buffers(self) -> None: |
| 170 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | legacy_train.py | 428 | |
| LOW | legacy_train.py | 1076 | |
| LOW | legacy_train.py | 1288 | |
| LOW | benchmark.py | 163 | |
| LOW | benchmark.py | 564 | |
| LOW | benchmark.py | 620 | |
| LOW | benchmark.py | 305 | |
| LOW | validate.py | 175 | |
| LOW | validate.py | 462 | |
| LOW | validate.py | 491 | |
| LOW | train.py | 460 | |
| LOW | train.py | 1176 | |
| LOW | train.py | 1392 | |
| LOW | bulk_runner.py | 96 | |
| LOW | bulk_runner.py | 141 | |
| LOW | inference.py | 150 | |
| LOW | inference.py | 353 | |
| LOW | results/generate_csv_results.py | 20 | |
| LOW | timm/layers/classifier.py | 282 | |
| LOW | timm/layers/pos_embed_sincos.py | 1235 | |
| LOW | timm/layers/gather_excite.py | 29 | |
| LOW | timm/layers/non_local_attn.py | 71 | |
| LOW | timm/layers/adaptive_avgmax_pool.py | 42 | |
| LOW | timm/layers/adaptive_avgmax_pool.py | 127 | |
| LOW | timm/layers/inplace_abn.py | 43 | |
| LOW | timm/layers/pool1d.py | 4 | |
| LOW | timm/layers/create_attn.py | 22 | |
| LOW | timm/layers/weight_init.py | 110 | |
| LOW | timm/layers/norm_act.py | 278 | |
| LOW | timm/layers/norm_act.py | 322 | |
| LOW | timm/scheduler/scheduler_factory.py | 63 | |
| LOW | timm/optim/_param_groups.py | 19 | |
| LOW | timm/optim/sgdw.py | 195 | |
| LOW | timm/optim/sgdw.py | 241 | |
| LOW | timm/optim/_optim_factory.py | 177 | |
| LOW | timm/optim/lamb.py | 153 | |
| LOW | timm/optim/adafactor.py | 128 | |
| LOW | timm/optim/adafactor_bv.py | 210 | |
| LOW | timm/optim/adafactor_bv.py | 123 | |
| LOW | timm/optim/lars.py | 76 | |
| LOW | timm/optim/nvnovograd.py | 67 | |
| LOW | timm/optim/adamp.py | 90 | |
| LOW | timm/optim/adabelief.py | 107 | |
| LOW | timm/optim/adamw.py | 103 | |
| LOW | timm/optim/kron.py | 400 | |
| LOW | timm/optim/kron.py | 218 | |
| LOW | timm/optim/radam.py | 38 | |
| LOW | timm/optim/laprop.py | 80 | |
| LOW | timm/optim/muon.py | 531 | |
| LOW | timm/optim/muon.py | 783 | |
| LOW | timm/optim/rmsprop_tf.py | 100 | |
| LOW | timm/optim/sgdp.py | 50 | |
| LOW | timm/optim/madgrad.py | 91 | |
| LOW | timm/utils/model.py | 111 | |
| LOW | timm/utils/model.py | 233 | |
| LOW | timm/utils/model.py | 237 | |
| LOW | timm/models/davit.py | 470 | |
| LOW | timm/models/inception_resnet_v2.py | 299 | |
| LOW | timm/models/inception_resnet_v2.py | 303 | |
| LOW | timm/models/hrnet.py | 439 | |
| 89 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | timm/optim/_optim_factory.py | 161 | Get the OptimInfo for an optimizer. Args: name: Name of the optimizer Returns: |
| HIGH | timm/optim/_optim_factory.py | 182 | Get the optimizer class with any default arguments applied. This allows direct instantiation of optimizers with |
| HIGH | timm/optim/_optim_factory.py | 245 | Create an optimizer instance. Args: model_or_params: Model or parameters to optimize op |
| HIGH | timm/optim/_optim_factory.py | 1107 | List available optimizer names, optionally filtered. List all registered optimizers, with optional filtering using |
| HIGH | timm/optim/_optim_factory.py | 1148 | Get the OptimInfo for an optimizer. Args: name: Name of the optimizer Returns: OptimInfo confi |
| HIGH | timm/optim/_optim_factory.py | 1166 | Get optimizer class by name with option to bind default arguments. Retrieves the optimizer class or a partial funct |
| HIGH | timm/optim/_optim_factory.py | 1215 | Create an optimizer instance via timm registry. Creates and configures an optimizer with appropriate parameter grou |
| HIGH | timm/optim/muon.py | 267 | Check if a parameter is suitable for Muon optimization. Args: param: Parameter tensor min_dim_size: |
| 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 |
| HIGH | timm/data/auto_augment.py | 587 | Create a AutoAugment transform Args: config_str: String defining configuration of auto augmentation. Consi |
| HIGH | timm/data/auto_augment.py | 767 | Create a RandAugment transform Args: config_str (str): String defining configuration of random augmentatio |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | timm/optim/lion.py | 22 | # ============================================================================== |
| MEDIUM | timm/models/beit.py | 29 | # -------------------------------------------------------- |
| MEDIUM | timm/models/twins.py | 8 | # -------------------------------------------------------- |
| MEDIUM | timm/models/twins.py | 13 | # -------------------------------------------------------- |
| MEDIUM | timm/models/swin_transformer_v2.py | 9 | # -------------------------------------------------------- |
| MEDIUM | timm/models/swin_transformer_v2.py | 14 | # -------------------------------------------------------- |
| MEDIUM | timm/models/swin_transformer.py | 12 | # -------------------------------------------------------- |
| MEDIUM | timm/models/swin_transformer.py | 17 | # -------------------------------------------------------- |
| MEDIUM | timm/models/focalnet.py | 14 | # -------------------------------------------------------- |
| MEDIUM | timm/models/focalnet.py | 19 | # -------------------------------------------------------- |
| MEDIUM | timm/models/hiera.py | 11 | # -------------------------------------------------------- |
| MEDIUM | timm/models/hiera.py | 24 | # -------------------------------------------------------- |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 24 | # -------------------------------------------------------- |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 29 | # -------------------------------------------------------- |
| MEDIUM | timm/data/tf_preprocessing.py | 23 | # ============================================================================== |
| Severity | File | Line | Snippet |
|---|---|---|---|
| CRITICAL | timm/models/hieradet_sam2.py | 426 | self.head.fc.weight.data.mul_(head_init_scale) |
| CRITICAL | timm/models/hieradet_sam2.py | 427 | self.head.fc.bias.data.mul_(head_init_scale) |
| CRITICAL | timm/models/hiera.py | 631 | self.head.fc.weight.data.mul_(head_init_scale) |
| CRITICAL | timm/models/hiera.py | 632 | self.head.fc.bias.data.mul_(head_init_scale) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_optim.py | 341 | # _test_basic_cases( |
| LOW | timm/layers/pos_embed_rel.py | 41 | |
| LOW | timm/layers/patch_embed.py | 601 | # |
| LOW | timm/layers/patch_embed.py | 621 | # self.patch_size = to_2tuple(patch_size) |
| LOW | timm/layers/patch_embed.py | 641 | # else: |
| LOW | timm/layers/cond_conv2d.py | 121 | |
| LOW | timm/optim/lion.py | 1 | """ Lion Optimizer |
| LOW | timm/optim/lamb.py | 21 | # Copyright (c) 2021, Habana Labs Ltd. All rights reserved. |
| LOW | timm/optim/lamb.py | 41 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| LOW | timm/optim/adan.py | 1 | """ Adan Optimizer |
| LOW | timm/utils/distributed.py | 121 | dist_backend = dist_backends.get(device_type, 'gloo') |
| LOW | timm/models/volo.py | 1 | """ Vision OutLOoker (VOLO) implementation |
| LOW | timm/models/efficientvit_mit.py | 1161 | hf_hub_id='timm/', |
| LOW | timm/models/efficientvit_mit.py | 1261 | # def efficientvit_l0_sam(pretrained=False, **kwargs): |
| LOW | timm/models/beit.py | 21 | primaryClass={cs.CV} |
| LOW | timm/models/efficientvit_msra.py | 661 | |
| LOW | timm/models/efficientvit_msra.py | 681 | # for k, v in tmp_dict.items(): |
| LOW | timm/models/shvit.py | 461 | |
| LOW | timm/models/shvit.py | 481 | # downsample_mapping[f'^stages\\.{i}\\.blocks\\.{j}\\.'] = f'stages.{i}.blocks.{j - 3}.' |
| LOW | timm/models/fasternet.py | 401 | # } |
| LOW | timm/models/twins.py | 101 | x = x[:, :H, :W, :].contiguous() |
| 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 |
| LOW | timm/models/visformer.py | 521 | attn_stage='011', spatial_conv='100', norm_layer=nn.BatchNorm2d, conv_init=True, |
| LOW | timm/models/visformer.py | 541 | # model.default_cfg = _cfg() |
| LOW | timm/models/visformer.py | 561 | # |
| LOW | timm/models/visformer.py | 581 | # @register_model |
| LOW | timm/models/hiera.py | 1 | """ An PyTorch implementation of Hiera |
| LOW | timm/data/tf_preprocessing.py | 1 | """ Tensorflow Preprocessing Adapter |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | avg_checkpoints.py | 85 | print("Error: Output filename ({}) already exists.".format(output)) |
| MEDIUM | avg_checkpoints.py | 113 | print('Error: No checkpoints found to average.') |
| MEDIUM | avg_checkpoints.py | 121 | print(f"Error: Checkpoint ({c}) doesn't exist") |
| LOW | bulk_runner.py | 203 | except Exception as e: |
| MEDIUM | clean_checkpoint.py | 42 | print("Error: Output filename ({}) already exists.".format(args.output)) |
| MEDIUM | clean_checkpoint.py | 110 | print("Error: Checkpoint ({}) doesn't exist".format(checkpoint)) |
| LOW | tests/test_models.py | 199 | except Exception: |
| LOW | tests/test_models.py | 560 | except Exception: |
| LOW | timm/layers/blur_pool.py | 118 | except Exception: |
| LOW | timm/optim/lion.py | 159 | except Exception: |
| LOW | timm/optim/adan.py | 127 | except Exception: |
| MEDIUM | timm/optim/adan.py | 34 | def __init__(self, chunk_size): |
| LOW | timm/optim/adamw.py | 216 | except Exception: |
| LOW | timm/optim/nadamw.py | 196 | except Exception: |
| LOW | timm/utils/jit.py | 33 | except Exception: |
| LOW | timm/utils/jit.py | 42 | except Exception: |
| LOW | timm/utils/checkpoint_saver.py | 122 | except Exception as e: |
| LOW | timm/utils/checkpoint_saver.py | 178 | except Exception as e: |
| LOW | timm/models/eva.py | 1228 | except Exception as e: |
| LOW | timm/models/_hub.py | 572 | except Exception as _: |
| LOW | timm/models/_helpers.py | 36 | except Exception: |
| LOW | timm/data/naflex_dataset.py | 549 | except Exception as e: |
| LOW | timm/data/readers/reader_wds.py | 57 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | legacy_train.py | 689 | # Check if we should use the NaFlex scheduled loader |
| LOW | legacy_train.py | 753 | # Check if we have model's patch size for NaFlex mode |
| LOW | train.py | 671 | # Check if we should use the NaFlex scheduled loader |
| LOW | train.py | 735 | # Check if we have model's patch size for NaFlex mode |
| LOW | timm/layers/pos_embed_sincos.py | 682 | # Check if we have pre-computed bands |
| LOW | timm/layers/blur_pool.py | 143 | # Check if aa_layer is a partial and already has device/dtype set |
| LOW | timm/optim/muon.py | 576 | # Increment step |
| LOW | timm/models/vision_transformer.py | 3072 | # Check if we should use NaFlexVit instead |
| LOW | timm/models/fastvit.py | 96 | # Check if SE-ReLU is requested |
| LOW | timm/models/naflexvit.py | 281 | # Check if we need EVA block features |
| LOW | timm/models/naflexvit.py | 1937 | # Check if it's a perfect square for a standard grid |
| LOW | timm/models/eva.py | 1297 | # Check if we should use NaFlexVit implementation |
| LOW | timm/models/_hub.py | 419 | # Check if README file already exist in repo |
| LOW | timm/models/_helpers.py | 111 | # Check if safetensors or not and load weights accordingly |
| LOW | timm/data/naflex_dataset.py | 119 | # Check if patches are flattened or unflattened |
| LOW | convert/convert_gemma4_vit.py | 97 | # Check if this is a vision key (vision_tower or vision_model) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | timm/models/_factory.py | 85 | >>> # Create a MobileNetV3-Large model with no pretrained weights. |
| MEDIUM | timm/models/_factory.py | 88 | >>> # Create a MobileNetV3-Large model with pretrained weights. |
| MEDIUM | timm/models/_factory.py | 93 | >>> # Create a MobileNetV3-Large model with pretrained weights and a new head with 10 classes. |
| MEDIUM | timm/models/_factory.py | 98 | >>> # Create a Dinov2 small model with pretrained weights and save weights in a custom directory. |
| MEDIUM | timm/models/naflexvit.py | 1024 | # Create the float mask and apply masking using additive mask convention |
| MEDIUM | timm/models/hiera.py | 154 | # Create a view of the tensor with the patch stride as separate dims |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 98 | r"""This class implements window-based Multi-Head-Attention with log-spaced continuous position bias. |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 246 | r"""This class implements the Swin transformer block. |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 594 | r"""This class implements a stage of the Swin transformer including multiple layers. |
| MEDIUM | timm/data/naflex_loader.py | 422 | # Create the collator |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | timm/layers/norm_act.py | 156 | # but ONLY when used in conjunction with the timm conversion function below. |
| MEDIUM | timm/models/gemma4_vit.py | 1364 | # so the test harness' size-clamp doesn't land at 128 and blow the |
| MEDIUM | timm/models/swin_transformer_v2_cr.py | 681 | """ Updates the resolution to utilize and the window size and so the pair-wise relative positions. |
| MEDIUM | timm/data/imagenet_info.py | 41 | # which will be more robust than a guess based on num_classes |
| LOW | timm/data/naflex_dataset.py | 61 | # If no divisor specified, just use integer division |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | timm/models/xception.py | 286 | # The resize parameter of the validation transform should be 333, and make sure to center crop at 299x299 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | timm/data/naflex_transforms.py | 261 | # Step 1: Get the maximum allowed dimensions from sequence length constraint |