SYMBOL INDEX (6238 symbols across 279 files) FILE: avg_checkpoints.py function checkpoint_metric (line 47) | def checkpoint_metric(checkpoint_path): function main (line 62) | def main(): FILE: benchmark.py function timestamp (line 149) | def timestamp(sync=False): function cuda_timestamp (line 153) | def cuda_timestamp(sync=False, device=None): function count_params (line 159) | def count_params(model: nn.Module): function resolve_precision (line 163) | def resolve_precision(precision: str): function profile_deepspeed (line 181) | def profile_deepspeed(model, input_size=(3, 224, 224), batch_size=1, det... function profile_fvcore (line 194) | def profile_fvcore(model, input_size=(3, 224, 224), batch_size=1, detail... class BenchmarkRunner (line 207) | class BenchmarkRunner: method __init__ (line 208) | def __init__( method _init_input (line 286) | def _init_input(self): class InferenceBenchmarkRunner (line 293) | class InferenceBenchmarkRunner(BenchmarkRunner): method __init__ (line 295) | def __init__( method run (line 305) | def run(self): class TrainBenchmarkRunner (line 368) | class TrainBenchmarkRunner(BenchmarkRunner): method __init__ (line 370) | def __init__( method _gen_target (line 391) | def _gen_target(self, batch_size): method run (line 395) | def run(self): class ProfileRunner (line 494) | class ProfileRunner(BenchmarkRunner): method __init__ (line 496) | def __init__(self, model_name, device='cuda', profiler='', **kwargs): method run (line 507) | def run(self): function _try_run (line 534) | def _try_run( function benchmark (line 564) | def benchmark(args): function main (line 620) | def main(): function write_results (line 675) | def write_results(results_file, results, format='csv'): FILE: bulk_runner.py function cmd_from_args (line 73) | def cmd_from_args(args) -> Tuple[Union[Callable, str], List[str]]: function _get_model_cfgs (line 96) | def _get_model_cfgs( function main (line 141) | def main(): function write_results (line 234) | def write_results(results_file, results): FILE: clean_checkpoint.py function main (line 38) | def main(): function clean_checkpoint (line 55) | def clean_checkpoint( FILE: convert/convert_from_mxnet.py function convert (line 15) | def convert(mxnet_name, torch_name): function map_mx_to_torch_model (line 74) | def map_mx_to_torch_model(mx_name): function main (line 93) | def main(): FILE: convert/convert_nest_flax.py function convert_nest (line 21) | def convert_nest(checkpoint_path, arch): FILE: inference.py function main (line 150) | def main(): function save_results (line 353) | def save_results(df, results_filename, results_format='csv', filename_co... FILE: onnx_export.py function main (line 65) | def main(): FILE: onnx_validate.py function main (line 43) | def main(): function accuracy_np (line 102) | def accuracy_np(output, target): FILE: results/generate_csv_results.py function diff (line 20) | def diff(base_df, test_csv): FILE: tests/test_checkpoint_loading.py class _CustomPayload (line 14) | class _CustomPayload: method __init__ (line 15) | def __init__(self, value: int = 1): function test_weights_only_allows_argparse_namespace (line 23) | def test_weights_only_allows_argparse_namespace(tmp_path): function test_weights_only_blocks_non_allowlisted_globals (line 36) | def test_weights_only_blocks_non_allowlisted_globals(tmp_path): function test_resume_checkpoint_default_weights_only_namespace (line 52) | def test_resume_checkpoint_default_weights_only_namespace(tmp_path): function test_resume_checkpoint_blocks_non_allowlisted_globals (line 82) | def test_resume_checkpoint_blocks_non_allowlisted_globals(tmp_path): function test_resume_checkpoint_weights_only_false_allows_custom_globals (line 95) | def test_resume_checkpoint_weights_only_false_allows_custom_globals(tmp_... FILE: tests/test_layers.py class MLP (line 15) | class MLP(nn.Module): method __init__ (line 16) | def __init__(self, act_layer="relu", inplace=True): method forward (line 22) | def forward(self, x): function _run_act_layer_grad (line 29) | def _run_act_layer_grad(act_type, inplace=True): function test_swish_grad (line 57) | def test_swish_grad(): function test_mish_grad (line 62) | def test_mish_grad(): function test_hard_sigmoid_grad (line 67) | def test_hard_sigmoid_grad(): function test_hard_swish_grad (line 72) | def test_hard_swish_grad(): function test_hard_mish_grad (line 77) | def test_hard_mish_grad(): function test_get_act_layer_empty_string (line 81) | def test_get_act_layer_empty_string(): function test_create_act_layer_inplace_error (line 86) | def test_create_act_layer_inplace_error(): function test_create_act_layer_edge_cases (line 98) | def test_create_act_layer_edge_cases(): function test_get_act_fn_callable (line 113) | def test_get_act_fn_callable(): function test_get_act_fn_none (line 119) | def test_get_act_fn_none(): function test_mqa_v2 (line 127) | def test_mqa_v2(dim, dim_out, use_m): function test_attn2d (line 145) | def test_attn2d(bias, expand_first, head_first, attn_mask): FILE: tests/test_layers_drop.py class TestDropBlock2d (line 8) | class TestDropBlock2d: method test_drop_block_2d_output_shape (line 11) | def test_drop_block_2d_output_shape(self): method test_drop_block_2d_no_drop_when_prob_zero (line 18) | def test_drop_block_2d_no_drop_when_prob_zero(self): method test_drop_block_2d_approximate_keep_ratio (line 24) | def test_drop_block_2d_approximate_keep_ratio(self): method test_drop_block_2d_inplace (line 43) | def test_drop_block_2d_inplace(self): method test_drop_block_2d_couple_channels_true (line 51) | def test_drop_block_2d_couple_channels_true(self): method test_drop_block_2d_couple_channels_false (line 64) | def test_drop_block_2d_couple_channels_false(self): method test_drop_block_2d_with_noise (line 77) | def test_drop_block_2d_with_noise(self): method test_drop_block_2d_even_block_size (line 88) | def test_drop_block_2d_even_block_size(self): method test_drop_block_2d_asymmetric_input (line 95) | def test_drop_block_2d_asymmetric_input(self): method test_drop_block_2d_scale_by_keep (line 102) | def test_drop_block_2d_scale_by_keep(self): class TestDropBlock2dModule (line 122) | class TestDropBlock2dModule: method test_deprecated_args_accepted (line 125) | def test_deprecated_args_accepted(self): method test_unknown_args_warned (line 135) | def test_unknown_args_warned(self): method test_training_mode (line 140) | def test_training_mode(self): method test_couple_channels_parameter (line 156) | def test_couple_channels_parameter(self): class TestDropPath (line 183) | class TestDropPath: method test_no_drop_when_prob_zero (line 186) | def test_no_drop_when_prob_zero(self): method test_no_drop_when_not_training (line 192) | def test_no_drop_when_not_training(self): method test_drop_path_scaling (line 198) | def test_drop_path_scaling(self): method test_drop_path_no_scaling (line 214) | def test_drop_path_no_scaling(self): class TestDropPathModule (line 227) | class TestDropPathModule: method test_training_mode (line 230) | def test_training_mode(self): method test_extra_repr (line 247) | def test_extra_repr(self): FILE: tests/test_layers_pool.py class TestAdaptiveAvgMaxPool (line 17) | class TestAdaptiveAvgMaxPool: method test_adaptive_avgmax_pool2d (line 20) | def test_adaptive_avgmax_pool2d(self): method test_select_adaptive_pool2d (line 29) | def test_select_adaptive_pool2d(self): method test_adaptive_avgmax_pool2d_module (line 41) | def test_adaptive_avgmax_pool2d_module(self): method test_select_adaptive_pool2d_module (line 48) | def test_select_adaptive_pool2d_module(self): method test_select_adaptive_pool2d_fast (line 60) | def test_select_adaptive_pool2d_fast(self): class TestAttentionPool (line 75) | class TestAttentionPool: method test_attention_pool_latent_basic (line 78) | def test_attention_pool_latent_basic(self): method test_attention_pool_latent_multi_latent (line 85) | def test_attention_pool_latent_multi_latent(self): method test_attention_pool2d_basic (line 97) | def test_attention_pool2d_basic(self): method test_attention_pool2d_different_feat_size (line 104) | def test_attention_pool2d_different_feat_size(self): method test_rot_attention_pool2d_basic (line 113) | def test_rot_attention_pool2d_basic(self): method test_rot_attention_pool2d_different_sizes (line 120) | def test_rot_attention_pool2d_different_sizes(self): method test_rot_attention_pool2d_rope_types (line 128) | def test_rot_attention_pool2d_rope_types(self): method test_attention_pool2d_out_features (line 152) | def test_attention_pool2d_out_features( method test_attention_pool2d_reset (line 178) | def test_attention_pool2d_reset( method test_attention_pool2d_pre_logits (line 199) | def test_attention_pool2d_pre_logits(self, pool_cls, base_kwargs, inpu... method test_attention_pool2d_qkv_separate (line 211) | def test_attention_pool2d_qkv_separate(self, pool_cls, base_kwargs, in... method test_attention_pool2d_class_token (line 223) | def test_attention_pool2d_class_token(self, pool_cls, base_kwargs, inp... method test_attention_pool_prr_basic (line 231) | def test_attention_pool_prr_basic(self): method test_attention_pool_prr_avg_pool (line 238) | def test_attention_pool_prr_avg_pool(self): method test_attention_pool_prr_parameter_free (line 245) | def test_attention_pool_prr_parameter_free(self): method test_attention_pool_prr_with_norms (line 251) | def test_attention_pool_prr_with_norms(self): method test_attention_pool_latent_out_features (line 274) | def test_attention_pool_latent_out_features(self, out_features, embed_... class TestLsePool (line 297) | class TestLsePool: method test_lse_plus_2d_basic (line 300) | def test_lse_plus_2d_basic(self): method test_lse_plus_2d_no_flatten (line 308) | def test_lse_plus_2d_no_flatten(self): method test_lse_plus_1d_basic (line 315) | def test_lse_plus_1d_basic(self): method test_lse_high_r_approximates_max (line 322) | def test_lse_high_r_approximates_max(self): method test_lse_low_r_approximates_avg (line 330) | def test_lse_low_r_approximates_avg(self): method test_lse_learnable_r_gradient (line 338) | def test_lse_learnable_r_gradient(self): class TestSimPool (line 350) | class TestSimPool: method test_simpool_2d_basic (line 353) | def test_simpool_2d_basic(self): method test_simpool_1d_basic (line 360) | def test_simpool_1d_basic(self): method test_simpool_multi_head (line 367) | def test_simpool_multi_head(self): method test_simpool_with_gamma (line 375) | def test_simpool_with_gamma(self): method test_simpool_qk_norm (line 383) | def test_simpool_qk_norm(self): class TestPoolingCommon (line 393) | class TestPoolingCommon: method test_gradient_flow (line 407) | def test_gradient_flow(self, pool_cls, kwargs, input_shape): method test_torchscript (line 426) | def test_torchscript(self, pool_cls, kwargs, input_shape): method test_eval_deterministic (line 445) | def test_eval_deterministic(self, pool_cls, kwargs, input_shape): method test_different_spatial_sizes (line 460) | def test_different_spatial_sizes(self, pool_cls, kwargs, input_shape): class TestBlurPool (line 473) | class TestBlurPool: method test_blur_pool_2d_basic (line 476) | def test_blur_pool_2d_basic(self): method test_blur_pool_2d_stride (line 483) | def test_blur_pool_2d_stride(self): class TestPool1d (line 493) | class TestPool1d: method test_global_pool_nlc (line 496) | def test_global_pool_nlc(self): FILE: tests/test_models.py function _get_input_size (line 101) | def _get_input_size(model=None, model_name='', target=None): function test_model_inference (line 130) | def test_model_inference(model_name, batch_size): function test_model_forward (line 174) | def test_model_forward(model_name, batch_size): function test_model_backward (line 207) | def test_model_backward(model_name, batch_size): function test_model_default_cfgs (line 257) | def test_model_default_cfgs(model_name, batch_size): function test_model_default_cfgs_non_std (line 335) | def test_model_default_cfgs_non_std(model_name, batch_size): function test_model_load_pretrained (line 406) | def test_model_load_pretrained(model_name, batch_size): function test_model_features_pretrained (line 415) | def test_model_features_pretrained(model_name, batch_size): function test_model_forward_torchscript (line 425) | def test_model_forward_torchscript(model_name, batch_size): function test_model_forward_features (line 455) | def test_model_forward_features(model_name, batch_size): function test_model_forward_intermediates_features (line 486) | def test_model_forward_intermediates_features(model_name, batch_size): function test_model_forward_intermediates (line 517) | def test_model_forward_intermediates(model_name, batch_size): function _create_fx_model (line 566) | def _create_fx_model(model, train=False): function test_model_forward_fx (line 621) | def test_model_forward_fx(model_name, batch_size): function test_model_backward_fx (line 656) | def test_model_backward_fx(model_name, batch_size): function test_model_forward_fx_torchscript (line 701) | def test_model_forward_fx_torchscript(model_name, batch_size): function test_model_forward_torchscript_with_features_fx (line 726) | def test_model_forward_torchscript_with_features_fx(model_name, batch_si... FILE: tests/test_optim.py function _test_basic_cases_template (line 29) | def _test_basic_cases_template(weight, bias, input, constructor, schedul... function _test_state_dict (line 63) | def _test_state_dict(weight, bias, input, constructor): function _test_basic_cases (line 138) | def _test_basic_cases(constructor, scheduler_constructors=None): function _test_model (line 177) | def _test_model(optimizer, params, device=torch.device('cpu'), after_ste... function rosenbrock (line 214) | def rosenbrock(tensor): function drosenbrock (line 219) | def drosenbrock(tensor): function _test_rosenbrock (line 224) | def _test_rosenbrock(constructor, scheduler_constructors=None): function _build_params_dict (line 285) | def _build_params_dict(weight, bias, **kwargs): function _build_params_dict_single (line 289) | def _build_params_dict_single(weight, bias, **kwargs): function test_optim_factory (line 294) | def test_optim_factory(optimizer): function test_sgd (line 340) | def test_sgd(optimizer): function test_adam (line 382) | def test_adam(optimizer): function test_kron (line 390) | def test_kron(optimizer): function test_muon (line 398) | def test_muon(optimizer): function test_adamuon (line 406) | def test_adamuon(optimizer): function test_adopt (line 414) | def test_adopt(optimizer): function test_adan (line 422) | def test_adan(optimizer): function test_adabelief (line 430) | def test_adabelief(optimizer): function test_rectified (line 441) | def test_rectified(optimizer): function test_adaother (line 449) | def test_adaother(optimizer): function test_adafactor (line 460) | def test_adafactor(optimizer): function test_lamb (line 471) | def test_lamb(optimizer): function test_laprop (line 479) | def test_laprop(optimizer): function test_lars (line 487) | def test_lars(optimizer): function test_madgrad (line 495) | def test_madgrad(optimizer): function test_mars (line 503) | def test_mars(optimizer): function test_novograd (line 511) | def test_novograd(optimizer): function test_rmsprop (line 519) | def test_rmsprop(optimizer): function test_adamp (line 527) | def test_adamp(optimizer): function test_sgdp (line 535) | def test_sgdp(optimizer): function test_lookahead_sgd (line 543) | def test_lookahead_sgd(optimizer): function test_lookahead_adam (line 550) | def test_lookahead_adam(optimizer): function test_lookahead_radam (line 557) | def test_lookahead_radam(optimizer): function test_param_groups_layer_decay_with_min (line 563) | def test_param_groups_layer_decay_with_min(): function test_param_groups_layer_decay_with_matcher (line 586) | def test_param_groups_layer_decay_with_matcher(): function test_param_groups_weight_decay (line 612) | def test_param_groups_weight_decay(): function test_cadamp (line 642) | def test_cadamp(optimizer): function test_csgdp (line 649) | def test_csgdp(optimizer): function test_csgdw (line 656) | def test_csgdw(optimizer): FILE: tests/test_scheduler.py function _create_optimizer (line 21) | def _create_optimizer(lr: float = 0.1, num_groups: int = 1) -> torch.opt... class TestSchedulerBasics (line 31) | class TestSchedulerBasics: method test_scheduler_init (line 42) | def test_scheduler_init(self, scheduler_cls, kwargs): method test_scheduler_step (line 56) | def test_scheduler_step(self, scheduler_cls, kwargs): method test_plateau_scheduler_step (line 70) | def test_plateau_scheduler_step(self): class TestWarmup (line 80) | class TestWarmup: method test_warmup_lr_increases (line 90) | def test_warmup_lr_increases(self, scheduler_cls, kwargs): method test_warmup_prefix_reaches_target_lr (line 122) | def test_warmup_prefix_reaches_target_lr(self, scheduler_cls, kwargs): class TestCosineScheduler (line 149) | class TestCosineScheduler: method test_cosine_decay (line 152) | def test_cosine_decay(self): method test_cosine_cycles (line 178) | def test_cosine_cycles(self): method test_get_cycle_length (line 204) | def test_get_cycle_length(self): class TestStepScheduler (line 223) | class TestStepScheduler: method test_step_decay (line 226) | def test_step_decay(self): class TestMultiStepScheduler (line 252) | class TestMultiStepScheduler: method test_multistep_decay (line 255) | def test_multistep_decay(self): class TestPolyScheduler (line 285) | class TestPolyScheduler: method test_poly_decay (line 288) | def test_poly_decay(self): class TestTanhScheduler (line 311) | class TestTanhScheduler: method test_tanh_decay (line 314) | def test_tanh_decay(self): class TestStateDict (line 337) | class TestStateDict: method test_state_dict_save_load (line 347) | def test_state_dict_save_load(self, scheduler_cls, kwargs): method test_plateau_state_dict_save_load (line 368) | def test_plateau_state_dict_save_load(self): class TestStepUpdate (line 390) | class TestStepUpdate: method test_step_update_with_t_in_epochs_false (line 400) | def test_step_update_with_t_in_epochs_false(self, scheduler_cls, kwargs): class TestMultipleParamGroups (line 420) | class TestMultipleParamGroups: method test_multiple_param_groups (line 430) | def test_multiple_param_groups(self, scheduler_cls, kwargs): class TestNoise (line 447) | class TestNoise: method test_noise_range (line 456) | def test_noise_range(self, scheduler_cls, kwargs): class TestKDecay (line 494) | class TestKDecay: method test_cosine_k_decay (line 497) | def test_cosine_k_decay(self): method test_poly_k_decay (line 517) | def test_poly_k_decay(self): FILE: tests/test_utils.py function test_freeze_unfreeze (line 15) | def test_freeze_unfreeze(): function test_activation_stats_hook_validation (line 66) | def test_activation_stats_hook_validation(): function test_extract_spp_stats (line 81) | def test_extract_spp_stats(): function test_freeze_unfreeze_bn_root (line 99) | def test_freeze_unfreeze_bn_root(): function test_activation_stats_functions (line 116) | def test_activation_stats_functions(): function test_reparameterize_model (line 135) | def test_reparameterize_model(): function test_get_state_dict_custom_unwrap (line 164) | def test_get_state_dict_custom_unwrap(): function test_freeze_unfreeze_string_input (line 182) | def test_freeze_unfreeze_string_input(): FILE: timm/data/auto_augment.py function _interpolation (line 53) | def _interpolation(kwargs): function _check_args_tf (line 60) | def _check_args_tf(kwargs): function shear_x (line 66) | def shear_x(img, factor, **kwargs): function shear_y (line 71) | def shear_y(img, factor, **kwargs): function translate_x_rel (line 76) | def translate_x_rel(img, pct, **kwargs): function translate_y_rel (line 82) | def translate_y_rel(img, pct, **kwargs): function translate_x_abs (line 88) | def translate_x_abs(img, pixels, **kwargs): function translate_y_abs (line 93) | def translate_y_abs(img, pixels, **kwargs): function rotate (line 98) | def rotate(img, degrees, **kwargs): function auto_contrast (line 129) | def auto_contrast(img, **__): function invert (line 133) | def invert(img, **__): function equalize (line 137) | def equalize(img, **__): function solarize (line 141) | def solarize(img, thresh, **__): function solarize_add (line 145) | def solarize_add(img, add, thresh=128, **__): function posterize (line 161) | def posterize(img, bits_to_keep, **__): function contrast (line 167) | def contrast(img, factor, **__): function color (line 171) | def color(img, factor, **__): function brightness (line 175) | def brightness(img, factor, **__): function sharpness (line 179) | def sharpness(img, factor, **__): function gaussian_blur (line 183) | def gaussian_blur(img, factor, **__): function gaussian_blur_rand (line 188) | def gaussian_blur_rand(img, factor, **__): function desaturate (line 195) | def desaturate(img, factor, **_): function _randomly_negate (line 201) | def _randomly_negate(v): function _rotate_level_to_arg (line 206) | def _rotate_level_to_arg(level, _hparams): function _enhance_level_to_arg (line 213) | def _enhance_level_to_arg(level, _hparams): function _enhance_increasing_level_to_arg (line 218) | def _enhance_increasing_level_to_arg(level, _hparams): function _minmax_level_to_arg (line 226) | def _minmax_level_to_arg(level, _hparams, min_val=0., max_val=1.0, clamp... function _shear_level_to_arg (line 234) | def _shear_level_to_arg(level, _hparams): function _translate_abs_level_to_arg (line 241) | def _translate_abs_level_to_arg(level, hparams): function _translate_rel_level_to_arg (line 248) | def _translate_rel_level_to_arg(level, hparams): function _posterize_level_to_arg (line 256) | def _posterize_level_to_arg(level, _hparams): function _posterize_increasing_level_to_arg (line 263) | def _posterize_increasing_level_to_arg(level, hparams): function _posterize_original_level_to_arg (line 270) | def _posterize_original_level_to_arg(level, _hparams): function _solarize_level_to_arg (line 277) | def _solarize_level_to_arg(level, _hparams): function _solarize_increasing_level_to_arg (line 283) | def _solarize_increasing_level_to_arg(level, _hparams): function _solarize_add_level_to_arg (line 289) | def _solarize_add_level_to_arg(level, _hparams): class AugmentOp (line 357) | class AugmentOp: method __init__ (line 359) | def __init__(self, name, prob=0.5, magnitude=10, hparams=None): method __call__ (line 380) | def __call__(self, img): method __repr__ (line 398) | def __repr__(self): function auto_augment_policy_v0 (line 407) | def auto_augment_policy_v0(hparams): function auto_augment_policy_v0r (line 440) | def auto_augment_policy_v0r(hparams): function auto_augment_policy_original (line 474) | def auto_augment_policy_original(hparams): function auto_augment_policy_originalr (line 507) | def auto_augment_policy_originalr(hparams): function auto_augment_policy_3a (line 540) | def auto_augment_policy_3a(hparams): function auto_augment_policy (line 550) | def auto_augment_policy(name='v0', hparams=None): class AutoAugment (line 565) | class AutoAugment: method __init__ (line 567) | def __init__(self, policy): method __call__ (line 570) | def __call__(self, img): method __repr__ (line 576) | def __repr__(self): function auto_augment_transform (line 586) | def auto_augment_transform(config_str: str, hparams: Optional[Dict] = No... function _get_weighted_transforms (line 707) | def _get_weighted_transforms(transforms: Dict): function rand_augment_choices (line 714) | def rand_augment_choices(name: str, increasing=True): function rand_augment_ops (line 724) | def rand_augment_ops( class RandAugment (line 736) | class RandAugment: method __init__ (line 737) | def __init__(self, ops, num_layers=2, choice_weights=None): method __call__ (line 742) | def __call__(self, img): method __repr__ (line 754) | def __repr__(self): function rand_augment_transform (line 762) | def rand_augment_transform( function augmix_ops (line 863) | def augmix_ops( class AugMixAugment (line 878) | class AugMixAugment: method __init__ (line 884) | def __init__(self, ops, alpha=1., width=3, depth=-1, blended=False): method _calc_blended_weights (line 891) | def _calc_blended_weights(self, ws, m): method _apply_blended (line 901) | def _apply_blended(self, img, mixing_weights, m): method _apply_basic (line 917) | def _apply_basic(self, img, mixing_weights, m): method __call__ (line 934) | def __call__(self, img): method __repr__ (line 943) | def __repr__(self): function augment_and_mix_transform (line 951) | def augment_and_mix_transform(config_str: str, hparams: Optional[Dict] =... FILE: timm/data/config.py function resolve_data_config (line 8) | def resolve_data_config( function resolve_model_data_config (line 103) | def resolve_model_data_config( FILE: timm/data/dataset.py class ImageDataset (line 21) | class ImageDataset(data.Dataset): method __init__ (line 23) | def __init__( method __getitem__ (line 53) | def __getitem__(self, index): method __len__ (line 80) | def __len__(self): method filename (line 83) | def filename(self, index, basename=False, absolute=False): method filenames (line 86) | def filenames(self, basename=False, absolute=False): class IterableImageDataset (line 90) | class IterableImageDataset(data.IterableDataset): method __init__ (line 92) | def __init__( method __iter__ (line 136) | def __iter__(self): method __len__ (line 144) | def __len__(self): method set_epoch (line 150) | def set_epoch(self, count): method set_loader_cfg (line 155) | def set_loader_cfg( method filename (line 163) | def filename(self, index, basename=False, absolute=False): method filenames (line 166) | def filenames(self, basename=False, absolute=False): class AugMixDataset (line 170) | class AugMixDataset(torch.utils.data.Dataset): method __init__ (line 173) | def __init__(self, dataset, num_splits=2): method _set_transforms (line 181) | def _set_transforms(self, x): method transform (line 188) | def transform(self): method transform (line 192) | def transform(self, x): method _normalize (line 195) | def _normalize(self, x): method __getitem__ (line 198) | def __getitem__(self, i): method __len__ (line 206) | def __len__(self): FILE: timm/data/dataset_factory.py function _search_split (line 43) | def _search_split(root, split): function create_dataset (line 63) | def create_dataset( FILE: timm/data/dataset_info.py class DatasetInfo (line 5) | class DatasetInfo(ABC): method __init__ (line 7) | def __init__(self): method num_classes (line 11) | def num_classes(self): method label_names (line 15) | def label_names(self): method label_descriptions (line 19) | def label_descriptions(self, detailed: bool = False, as_dict: bool = F... method index_to_label_name (line 23) | def index_to_label_name(self, index) -> str: method index_to_description (line 27) | def index_to_description(self, index: int, detailed: bool = False) -> ... method label_name_to_description (line 31) | def label_name_to_description(self, label: str, detailed: bool = False... class CustomDatasetInfo (line 35) | class CustomDatasetInfo(DatasetInfo): method __init__ (line 38) | def __init__( method num_classes (line 53) | def num_classes(self): method label_names (line 56) | def label_names(self): method label_descriptions (line 59) | def label_descriptions(self, detailed: bool = False, as_dict: bool = F... method label_name_to_description (line 62) | def label_name_to_description(self, label: str, detailed: bool = False... method index_to_label_name (line 67) | def index_to_label_name(self, index) -> str: method index_to_description (line 71) | def index_to_description(self, index: int, detailed: bool = False) -> ... FILE: timm/data/distributed_sampler.py class OrderedDistributedSampler (line 7) | class OrderedDistributedSampler(Sampler): method __init__ (line 22) | def __init__(self, dataset, num_replicas=None, rank=None): method __iter__ (line 37) | def __iter__(self): method __len__ (line 50) | def __len__(self): class RepeatAugSampler (line 54) | class RepeatAugSampler(Sampler): method __init__ (line 65) | def __init__( method __iter__ (line 101) | def __iter__(self): method __len__ (line 131) | def __len__(self): method set_epoch (line 134) | def set_epoch(self, epoch): FILE: timm/data/imagenet_info.py function infer_imagenet_subset (line 33) | def infer_imagenet_subset(model_or_cfg) -> Optional[str]: class ImageNetInfo (line 48) | class ImageNetInfo(DatasetInfo): method __init__ (line 50) | def __init__(self, subset: str = 'imagenet-1k'): method num_classes (line 69) | def num_classes(self): method label_names (line 72) | def label_names(self): method label_descriptions (line 75) | def label_descriptions(self, detailed: bool = False, as_dict: bool = F... method index_to_label_name (line 81) | def index_to_label_name(self, index) -> str: method index_to_description (line 86) | def index_to_description(self, index: int, detailed: bool = False) -> ... method label_name_to_description (line 90) | def label_name_to_description(self, label: str, detailed: bool = False... FILE: timm/data/loader.py function fast_collate (line 29) | def fast_collate(batch): function adapt_to_chs (line 68) | def adapt_to_chs(x, n): class PrefetchLoader (line 80) | class PrefetchLoader: method __init__ (line 82) | def __init__( method __iter__ (line 123) | def __iter__(self): method __len__ (line 160) | def __len__(self): method sampler (line 164) | def sampler(self): method dataset (line 168) | def dataset(self): method mixup_enabled (line 172) | def mixup_enabled(self): method mixup_enabled (line 179) | def mixup_enabled(self, x): function _worker_init (line 184) | def _worker_init(worker_id, worker_seeding='all'): function create_loader (line 200) | def create_loader( class MultiEpochsDataLoader (line 381) | class MultiEpochsDataLoader(torch.utils.data.DataLoader): method __init__ (line 383) | def __init__(self, *args, **kwargs): method __len__ (line 393) | def __len__(self): method __iter__ (line 396) | def __iter__(self): class _RepeatSampler (line 401) | class _RepeatSampler(object): method __init__ (line 408) | def __init__(self, sampler): method __iter__ (line 411) | def __iter__(self): FILE: timm/data/mixup.py function one_hot (line 17) | def one_hot(x, num_classes, on_value=1., off_value=0.): function mixup_target (line 22) | def mixup_target(target, num_classes, lam=1., smoothing=0.0): function rand_bbox (line 30) | def rand_bbox(img_shape, lam, margin=0., count=None): function rand_bbox_minmax (line 54) | def rand_bbox_minmax(img_shape, minmax, count=None): function cutmix_bbox_and_lam (line 77) | def cutmix_bbox_and_lam(img_shape, lam, ratio_minmax=None, correct_lam=T... class Mixup (line 90) | class Mixup: method __init__ (line 104) | def __init__(self, mixup_alpha=1., cutmix_alpha=0., cutmix_minmax=None... method _params_per_elem (line 121) | def _params_per_elem(self, batch_size): method _params_per_batch (line 141) | def _params_per_batch(self): method _mix_elem (line 159) | def _mix_elem(self, x): method _mix_pair (line 176) | def _mix_pair(self, x): method _mix_batch (line 196) | def _mix_batch(self, x): method __call__ (line 209) | def __call__(self, x, target): class FastCollateMixup (line 221) | class FastCollateMixup(Mixup): method _mix_elem_collate (line 227) | def _mix_elem_collate(self, output, batch, half=False): method _mix_pair_collate (line 262) | def _mix_pair_collate(self, output, batch): method _mix_batch_collate (line 303) | def _mix_batch_collate(self, output, batch): method __call__ (line 332) | def __call__(self, batch, _=None): FILE: timm/data/naflex_dataset.py function calculate_naflex_batch_size (line 30) | def calculate_naflex_batch_size( class NaFlexCollator (line 73) | class NaFlexCollator: method __init__ (line 76) | def __init__( method __call__ (line 87) | def __call__(self, batch: List[Tuple[Dict[str, torch.Tensor], Union[in... function _resolve_patch_cfg (line 154) | def _resolve_patch_cfg( class NaFlexMapDatasetWrapper (line 198) | class NaFlexMapDatasetWrapper(IterableDataset): method __init__ (line 210) | def __init__( method _create_canonical_schedule (line 305) | def _create_canonical_schedule(self): method _prepare_epoch_batches (line 391) | def _prepare_epoch_batches(self, epoch: int): method set_epoch (line 477) | def set_epoch(self, epoch: int) -> None: method __len__ (line 488) | def __len__(self) -> int: method __iter__ (line 496) | def __iter__(self) -> Iterator[Tuple[Dict[str, torch.Tensor], torch.Te... FILE: timm/data/naflex_loader.py class NaFlexPrefetchLoader (line 27) | class NaFlexPrefetchLoader: method __init__ (line 30) | def __init__( method __iter__ (line 86) | def __iter__(self) -> Iterator[Tuple[Dict[str, torch.Tensor], torch.Te... method __len__ (line 164) | def __len__(self) -> int: method sampler (line 173) | def sampler(self): method dataset (line 182) | def dataset(self): function create_naflex_loader (line 191) | def create_naflex_loader( FILE: timm/data/naflex_mixup.py function mix_batch_variable_size (line 23) | def mix_batch_variable_size( function smoothed_sparse_target (line 132) | def smoothed_sparse_target( function pairwise_mixup_target (line 151) | def pairwise_mixup_target( class NaFlexMixup (line 180) | class NaFlexMixup: method __init__ (line 183) | def __init__( method __call__ (line 213) | def __call__( FILE: timm/data/naflex_random_erasing.py class PatchRandomErasing (line 21) | class PatchRandomErasing: method __init__ (line 29) | def __init__( method _get_values (line 87) | def _get_values( method _drop_patches (line 122) | def _drop_patches( method _erase_patches (line 163) | def _erase_patches( method _erase_region (line 209) | def _erase_region( method __call__ (line 282) | def __call__( method __repr__ (line 345) | def __repr__(self) -> str: FILE: timm/data/naflex_transforms.py function get_image_size_for_seq (line 26) | def get_image_size_for_seq( class ResizeToSequence (line 126) | class ResizeToSequence(torch.nn.Module): method __init__ (line 132) | def __init__( method forward (line 163) | def forward(self, img: torch.Tensor) -> torch.Tensor: class ResizeKeepRatioToSequence (line 192) | class ResizeKeepRatioToSequence(torch.nn.Module): method __init__ (line 197) | def __init__( method get_params (line 244) | def get_params( method forward (line 331) | def forward(self, img): method __repr__ (line 356) | def __repr__(self): class CenterCropToSequence (line 365) | class CenterCropToSequence(torch.nn.Module): method __init__ (line 367) | def __init__( method forward (line 383) | def forward(self, img): class RandomCropToSequence (line 397) | class RandomCropToSequence(torch.nn.Module): method __init__ (line 405) | def __init__( method get_params (line 429) | def get_params(img, target_size): method forward (line 448) | def forward(self, img): method __repr__ (line 477) | def __repr__(self) -> str: function _validate_range (line 483) | def _validate_range(value, name, length=2): class RandomResizedCropToSequence (line 496) | class RandomResizedCropToSequence(torch.nn.Module): method __init__ (line 539) | def __init__( method get_params (line 587) | def get_params( method forward (line 703) | def forward(self, img: torch.Tensor) -> torch.Tensor: method __repr__ (line 732) | def __repr__(self) -> str: function patchify_image (line 751) | def patchify_image( class Patchify (line 787) | class Patchify(torch.nn.Module): method __init__ (line 790) | def __init__( method forward (line 799) | def forward(self, img): FILE: timm/data/random_erasing.py function _get_pixels (line 14) | def _get_pixels(per_pixel, rand_color, patch_size, dtype=torch.float32, ... class RandomErasing (line 26) | class RandomErasing: method __init__ (line 46) | def __init__( method _erase (line 78) | def _erase(self, img, chan, img_h, img_w, dtype): method __call__ (line 102) | def __call__(self, input): method __repr__ (line 113) | def __repr__(self): FILE: timm/data/readers/class_map.py function load_class_map (line 5) | def load_class_map(map_or_filename, root=''): FILE: timm/data/readers/img_extensions.py function _set_extensions (line 10) | def _set_extensions(extensions): function _valid_extension (line 18) | def _valid_extension(x: str): function is_img_extension (line 22) | def is_img_extension(ext): function get_img_extensions (line 26) | def get_img_extensions(as_set=False): function set_img_extensions (line 30) | def set_img_extensions(extensions): function add_img_extensions (line 37) | def add_img_extensions(ext): function del_img_extensions (line 46) | def del_img_extensions(ext): FILE: timm/data/readers/reader.py class Reader (line 4) | class Reader: method __init__ (line 5) | def __init__(self): method _filename (line 9) | def _filename(self, index, basename=False, absolute=False): method filename (line 12) | def filename(self, index, basename=False, absolute=False): method filenames (line 15) | def filenames(self, basename=False, absolute=False): FILE: timm/data/readers/reader_factory.py function create_reader (line 8) | def create_reader( FILE: timm/data/readers/reader_hfds.py function get_class_labels (line 22) | def get_class_labels(info, label_key='label'): class ReaderHfds (line 30) | class ReaderHfds(Reader): method __init__ (line 32) | def __init__( method __getitem__ (line 77) | def __getitem__(self, index): method __len__ (line 97) | def __len__(self): method _filename (line 100) | def _filename(self, index, basename=False, absolute=False): FILE: timm/data/readers/reader_hfids.py class ReaderHfids (line 29) | class ReaderHfids(Reader): method __init__ (line 30) | def __init__( method set_epoch (line 112) | def set_epoch(self, count): method set_loader_cfg (line 116) | def set_loader_cfg( method _lazy_init (line 126) | def _lazy_init(self): method _num_samples_per_worker (line 159) | def _num_samples_per_worker(self): method __iter__ (line 168) | def __iter__(self): method __len__ (line 196) | def __len__(self): method _filename (line 200) | def _filename(self, index, basename=False, absolute=False): method filenames (line 203) | def filenames(self, basename=False, absolute=False): FILE: timm/data/readers/reader_image_folder.py function find_images_and_targets (line 18) | def find_images_and_targets( class ReaderImageFolder (line 59) | class ReaderImageFolder(Reader): method __init__ (line 61) | def __init__( method __getitem__ (line 86) | def __getitem__(self, index): method __len__ (line 90) | def __len__(self): method _filename (line 93) | def _filename(self, index, basename=False, absolute=False): FILE: timm/data/readers/reader_image_in_tar.py class TarState (line 31) | class TarState: method __init__ (line 33) | def __init__(self, tf: tarfile.TarFile = None, ti: tarfile.TarInfo = N... method reset (line 38) | def reset(self): function _extract_tarinfo (line 42) | def _extract_tarinfo(tf: tarfile.TarFile, parent_info: Dict, extensions:... function extract_tarinfos (line 63) | def extract_tarinfos( class ReaderImageInTar (line 172) | class ReaderImageInTar(Reader): method __init__ (line 176) | def __init__(self, root, class_map='', cache_tarfiles=True, cache_tari... method __len__ (line 197) | def __len__(self): method __getitem__ (line 200) | def __getitem__(self, index): method _filename (line 225) | def _filename(self, index, basename=False, absolute=False): FILE: timm/data/readers/reader_image_tar.py function extract_tarinfo (line 18) | def extract_tarinfo(tarfile, class_to_idx=None, sort=True): class ReaderImageTar (line 41) | class ReaderImageTar(Reader): method __init__ (line 46) | def __init__(self, root, class_map=''): method __getitem__ (line 60) | def __getitem__(self, index): method __len__ (line 67) | def __len__(self): method _filename (line 70) | def _filename(self, index, basename=False, absolute=False): FILE: timm/data/readers/reader_tfds.py function decode_example (line 49) | def decode_example(serialized_image, feature, dct_method='INTEGER_ACCURA... function even_split_indices (line 57) | def even_split_indices(split, n, num_samples): function get_class_labels (line 62) | def get_class_labels(info): class ReaderTfds (line 70) | class ReaderTfds(Reader): method __init__ (line 94) | def __init__( method set_epoch (line 183) | def set_epoch(self, count): method set_loader_cfg (line 186) | def set_loader_cfg( method _lazy_init (line 196) | def _lazy_init(self): method _num_samples_per_worker (line 278) | def _num_samples_per_worker(self): method __iter__ (line 287) | def __iter__(self): method __len__ (line 331) | def __len__(self): method _filename (line 335) | def _filename(self, index, basename=False, absolute=False): method filenames (line 338) | def filenames(self, basename=False, absolute=False): FILE: timm/data/readers/reader_wds.py function _load_info (line 42) | def _load_info(root, names=('_info.json', 'info.json')): class SplitInfo (line 67) | class SplitInfo: function _parse_split_info (line 75) | def _parse_split_info(split: str, info: Dict): function log_and_continue (line 126) | def log_and_continue(exn): function _decode (line 135) | def _decode( function pytorch_worker_seed (line 171) | def pytorch_worker_seed(): class detshuffle2 (line 184) | class detshuffle2(wds.PipelineStage): method __init__ (line 185) | def __init__( method run (line 197) | def run(self, src): class ResampledShards2 (line 218) | class ResampledShards2(IterableDataset): method __init__ (line 221) | def __init__( method __iter__ (line 243) | def __iter__(self): class ReaderWds (line 262) | class ReaderWds(Reader): method __init__ (line 263) | def __init__( method set_epoch (line 337) | def set_epoch(self, count): method set_loader_cfg (line 340) | def set_loader_cfg( method _lazy_init (line 350) | def _lazy_init(self): method _split_by_node_and_worker (line 403) | def _split_by_node_and_worker(self, src): method _num_samples_per_worker (line 411) | def _num_samples_per_worker(self): method __iter__ (line 419) | def __iter__(self): method __len__ (line 443) | def __len__(self): method _filename (line 447) | def _filename(self, index, basename=False, absolute=False): method filenames (line 450) | def filenames(self, basename=False, absolute=False): FILE: timm/data/readers/shared_count.py class SharedCount (line 4) | class SharedCount: method __init__ (line 5) | def __init__(self, epoch: int = 0): method value (line 9) | def value(self): method value (line 13) | def value(self, epoch): FILE: timm/data/real_labels.py class RealLabelsImagenet (line 13) | class RealLabelsImagenet: method __init__ (line 15) | def __init__(self, filenames, real_json=None, topk=(1, 5)): method add_result (line 30) | def add_result(self, output): method get_accuracy (line 43) | def get_accuracy(self, k=None): FILE: timm/data/tf_preprocessing.py function distorted_bounding_box_crop (line 33) | def distorted_bounding_box_crop(image_bytes, function _at_least_x_are_equal (line 85) | def _at_least_x_are_equal(a, b, x): function _decode_and_random_crop (line 92) | def _decode_and_random_crop(image_bytes, image_size, resize_method): function _decode_and_center_crop (line 114) | def _decode_and_center_crop(image_bytes, image_size, resize_method): function _flip (line 135) | def _flip(image): function preprocess_for_train (line 141) | def preprocess_for_train(image_bytes, use_bfloat16, image_size=IMAGE_SIZ... function preprocess_for_eval (line 162) | def preprocess_for_eval(image_bytes, use_bfloat16, image_size=IMAGE_SIZE... function preprocess_image (line 182) | def preprocess_image(image_bytes, class TfPreprocessTransform (line 205) | class TfPreprocessTransform: method __init__ (line 207) | def __init__(self, is_training=False, size=224, interpolation='bicubic'): method _build_tf_graph (line 215) | def _build_tf_graph(self): method __call__ (line 225) | def __call__(self, image_bytes): FILE: timm/data/transforms.py class ToNumpy (line 25) | class ToNumpy: method __call__ (line 27) | def __call__(self, pil_img): class ToTensor (line 35) | class ToTensor: method __init__ (line 37) | def __init__(self, dtype=torch.float32): method __call__ (line 40) | def __call__(self, pil_img): class MaybeToTensor (line 44) | class MaybeToTensor(transforms.ToTensor): method __init__ (line 48) | def __init__(self) -> None: method __call__ (line 51) | def __call__(self, pic) -> torch.Tensor: method __repr__ (line 63) | def __repr__(self) -> str: class MaybePILToTensor (line 67) | class MaybePILToTensor: method __init__ (line 71) | def __init__(self) -> None: method __call__ (line 74) | def __call__(self, pic): method __repr__ (line 88) | def __repr__(self) -> str: function str_to_pil_interp (line 132) | def str_to_pil_interp(mode_str): function str_to_interp_mode (line 136) | def str_to_interp_mode(mode_str): function interp_mode_to_str (line 143) | def interp_mode_to_str(mode): function _setup_size (line 153) | def _setup_size(size, error_msg="Please provide only two dimensions (h, ... class RandomResizedCropAndInterpolation (line 166) | class RandomResizedCropAndInterpolation: method __init__ (line 181) | def __init__( method get_params (line 203) | def get_params(img, scale, ratio): method __call__ (line 245) | def __call__(self, img): method __repr__ (line 260) | def __repr__(self): function center_crop_or_pad (line 272) | def center_crop_or_pad( class CenterCropOrPad (line 314) | class CenterCropOrPad(torch.nn.Module): method __init__ (line 326) | def __init__( method forward (line 337) | def forward(self, img): method __repr__ (line 347) | def __repr__(self) -> str: function crop_or_pad (line 351) | def crop_or_pad( class RandomCropOrPad (line 379) | class RandomCropOrPad(torch.nn.Module): method __init__ (line 383) | def __init__( method get_params (line 395) | def get_params(img, size): method forward (line 403) | def forward(self, img): method __repr__ (line 422) | def __repr__(self) -> str: class RandomPad (line 426) | class RandomPad: method __init__ (line 427) | def __init__(self, input_size, fill=0): method get_params (line 432) | def get_params(img, input_size): method __call__ (line 442) | def __call__(self, img): class ResizeKeepRatio (line 448) | class ResizeKeepRatio: method __init__ (line 452) | def __init__( method get_params (line 491) | def get_params( method __call__ (line 530) | def __call__(self, img): method __repr__ (line 550) | def __repr__(self): class TrimBorder (line 567) | class TrimBorder(torch.nn.Module): method __init__ (line 569) | def __init__( method forward (line 576) | def forward(self, img): FILE: timm/data/transforms_factory.py function transforms_noaug_train (line 20) | def transforms_noaug_train( function transforms_imagenet_train (line 65) | def transforms_imagenet_train( function transforms_imagenet_eval (line 272) | def transforms_imagenet_eval( function create_transform (line 377) | def create_transform( FILE: timm/layers/_fx.py function register_notrace_module (line 30) | def register_notrace_module(module: Type[nn.Module]): function is_notrace_module (line 38) | def is_notrace_module(module: Type[nn.Module]): function get_notrace_modules (line 42) | def get_notrace_modules(): function register_notrace_function (line 50) | def register_notrace_function(name_or_fn): function is_notrace_function (line 55) | def is_notrace_function(func: Callable): function get_notrace_functions (line 59) | def get_notrace_functions(): function get_graph_node_names (line 63) | def get_graph_node_names(model: nn.Module) -> Tuple[List[str], List[str]]: function create_feature_extractor (line 73) | def create_feature_extractor(model: nn.Module, return_nodes: Union[Dict[... FILE: timm/layers/activations.py function swish (line 14) | def swish(x, inplace: bool = False): class Swish (line 20) | class Swish(nn.Module): method __init__ (line 21) | def __init__(self, inplace: bool = False): method forward (line 25) | def forward(self, x): function mish (line 29) | def mish(x, inplace: bool = False): class Mish (line 36) | class Mish(nn.Module): method __init__ (line 39) | def __init__(self, inplace: bool = False): method forward (line 42) | def forward(self, x): function sigmoid (line 46) | def sigmoid(x, inplace: bool = False): class Sigmoid (line 51) | class Sigmoid(nn.Module): method __init__ (line 52) | def __init__(self, inplace: bool = False): method forward (line 56) | def forward(self, x): function tanh (line 60) | def tanh(x, inplace: bool = False): class Tanh (line 65) | class Tanh(nn.Module): method __init__ (line 66) | def __init__(self, inplace: bool = False): method forward (line 70) | def forward(self, x): function hard_swish (line 74) | def hard_swish(x, inplace: bool = False): class HardSwish (line 79) | class HardSwish(nn.Module): method __init__ (line 80) | def __init__(self, inplace: bool = False): method forward (line 84) | def forward(self, x): function hard_sigmoid (line 88) | def hard_sigmoid(x, inplace: bool = False): class HardSigmoid (line 95) | class HardSigmoid(nn.Module): method __init__ (line 96) | def __init__(self, inplace: bool = False): method forward (line 100) | def forward(self, x): function hard_mish (line 104) | def hard_mish(x, inplace: bool = False): class HardMish (line 115) | class HardMish(nn.Module): method __init__ (line 116) | def __init__(self, inplace: bool = False): method forward (line 120) | def forward(self, x): class PReLU (line 124) | class PReLU(nn.PReLU): method __init__ (line 127) | def __init__(self, num_parameters: int = 1, init: float = 0.25, inplac... method forward (line 130) | def forward(self, input: torch.Tensor) -> torch.Tensor: function gelu (line 134) | def gelu(x: torch.Tensor, inplace: bool = False) -> torch.Tensor: class GELU (line 138) | class GELU(nn.Module): method __init__ (line 141) | def __init__(self, inplace: bool = False): method forward (line 144) | def forward(self, input: torch.Tensor) -> torch.Tensor: function gelu_tanh (line 148) | def gelu_tanh(x: torch.Tensor, inplace: bool = False) -> torch.Tensor: class GELUTanh (line 152) | class GELUTanh(nn.Module): method __init__ (line 155) | def __init__(self, inplace: bool = False): method forward (line 158) | def forward(self, input: torch.Tensor) -> torch.Tensor: function quick_gelu (line 162) | def quick_gelu(x: torch.Tensor, inplace: bool = False) -> torch.Tensor: class QuickGELU (line 166) | class QuickGELU(nn.Module): method __init__ (line 169) | def __init__(self, inplace: bool = False): method forward (line 172) | def forward(self, input: torch.Tensor) -> torch.Tensor: FILE: timm/layers/activations_me.py function swish_fwd (line 17) | def swish_fwd(x): function swish_bwd (line 21) | def swish_bwd(x, grad_output): class SwishAutoFn (line 26) | class SwishAutoFn(torch.autograd.Function): method symbolic (line 32) | def symbolic(g, x): method forward (line 36) | def forward(ctx, x): method backward (line 41) | def backward(ctx, grad_output): function swish_me (line 46) | def swish_me(x, inplace=False): class SwishMe (line 50) | class SwishMe(nn.Module): method __init__ (line 51) | def __init__(self, inplace: bool = False): method forward (line 54) | def forward(self, x): function mish_fwd (line 58) | def mish_fwd(x): function mish_bwd (line 62) | def mish_bwd(x, grad_output): class MishAutoFn (line 68) | class MishAutoFn(torch.autograd.Function): method forward (line 73) | def forward(ctx, x): method backward (line 78) | def backward(ctx, grad_output): function mish_me (line 83) | def mish_me(x, inplace=False): class MishMe (line 87) | class MishMe(nn.Module): method __init__ (line 88) | def __init__(self, inplace: bool = False): method forward (line 91) | def forward(self, x): function hard_sigmoid_fwd (line 95) | def hard_sigmoid_fwd(x, inplace: bool = False): function hard_sigmoid_bwd (line 99) | def hard_sigmoid_bwd(x, grad_output): class HardSigmoidAutoFn (line 104) | class HardSigmoidAutoFn(torch.autograd.Function): method forward (line 106) | def forward(ctx, x): method backward (line 111) | def backward(ctx, grad_output): function hard_sigmoid_me (line 116) | def hard_sigmoid_me(x, inplace: bool = False): class HardSigmoidMe (line 120) | class HardSigmoidMe(nn.Module): method __init__ (line 121) | def __init__(self, inplace: bool = False): method forward (line 124) | def forward(self, x): function hard_swish_fwd (line 128) | def hard_swish_fwd(x): function hard_swish_bwd (line 132) | def hard_swish_bwd(x, grad_output): class HardSwishAutoFn (line 138) | class HardSwishAutoFn(torch.autograd.Function): method forward (line 141) | def forward(ctx, x): method backward (line 146) | def backward(ctx, grad_output): method symbolic (line 151) | def symbolic(g, self): function hard_swish_me (line 158) | def hard_swish_me(x, inplace=False): class HardSwishMe (line 162) | class HardSwishMe(nn.Module): method __init__ (line 163) | def __init__(self, inplace: bool = False): method forward (line 166) | def forward(self, x): function hard_mish_fwd (line 170) | def hard_mish_fwd(x): function hard_mish_bwd (line 174) | def hard_mish_bwd(x, grad_output): class HardMishAutoFn (line 180) | class HardMishAutoFn(torch.autograd.Function): method forward (line 186) | def forward(ctx, x): method backward (line 191) | def backward(ctx, grad_output): function hard_mish_me (line 196) | def hard_mish_me(x, inplace: bool = False): class HardMishMe (line 200) | class HardMishMe(nn.Module): method __init__ (line 201) | def __init__(self, inplace: bool = False): method forward (line 204) | def forward(self, x): FILE: timm/layers/adaptive_avgmax_pool.py function adaptive_pool_feat_mult (line 23) | def adaptive_pool_feat_mult(pool_type='avg'): function adaptive_avgmax_pool2d (line 30) | def adaptive_avgmax_pool2d(x, output_size: _int_tuple_2_t = 1): function adaptive_catavgmax_pool2d (line 36) | def adaptive_catavgmax_pool2d(x, output_size: _int_tuple_2_t = 1): function select_adaptive_pool2d (line 42) | def select_adaptive_pool2d(x, pool_type='avg', output_size: _int_tuple_2... class FastAdaptiveAvgPool (line 58) | class FastAdaptiveAvgPool(nn.Module): method __init__ (line 59) | def __init__(self, flatten: bool = False, input_fmt: F = 'NCHW'): method forward (line 64) | def forward(self, x): class FastAdaptiveMaxPool (line 68) | class FastAdaptiveMaxPool(nn.Module): method __init__ (line 69) | def __init__(self, flatten: bool = False, input_fmt: str = 'NCHW'): method forward (line 74) | def forward(self, x): class FastAdaptiveAvgMaxPool (line 78) | class FastAdaptiveAvgMaxPool(nn.Module): method __init__ (line 79) | def __init__(self, flatten: bool = False, input_fmt: str = 'NCHW'): method forward (line 84) | def forward(self, x): class FastAdaptiveCatAvgMaxPool (line 90) | class FastAdaptiveCatAvgMaxPool(nn.Module): method __init__ (line 91) | def __init__(self, flatten: bool = False, input_fmt: str = 'NCHW'): method forward (line 100) | def forward(self, x): class AdaptiveAvgMaxPool2d (line 106) | class AdaptiveAvgMaxPool2d(nn.Module): method __init__ (line 107) | def __init__(self, output_size: _int_tuple_2_t = 1): method forward (line 111) | def forward(self, x): class AdaptiveCatAvgMaxPool2d (line 115) | class AdaptiveCatAvgMaxPool2d(nn.Module): method __init__ (line 116) | def __init__(self, output_size: _int_tuple_2_t = 1): method forward (line 120) | def forward(self, x): class SelectAdaptivePool2d (line 124) | class SelectAdaptivePool2d(nn.Module): method __init__ (line 127) | def __init__( method is_identity (line 168) | def is_identity(self): method forward (line 171) | def forward(self, x): method feat_mult (line 176) | def feat_mult(self): method __repr__ (line 179) | def __repr__(self): FILE: timm/layers/attention.py function maybe_add_mask (line 17) | def maybe_add_mask(scores: torch.Tensor, attn_mask: Optional[torch.Tenso... function resolve_self_attn_mask (line 23) | def resolve_self_attn_mask( class Attention (line 43) | class Attention(nn.Module): method __init__ (line 53) | def __init__( method forward (line 108) | def forward( class AttentionRope (line 142) | class AttentionRope(nn.Module): method __init__ (line 152) | def __init__( method forward (line 224) | def forward( FILE: timm/layers/attention2d.py class MultiQueryAttentionV2 (line 13) | class MultiQueryAttentionV2(nn.Module): method __init__ (line 27) | def __init__( method reset_parameters (line 57) | def reset_parameters(self): method _reshape_input (line 64) | def _reshape_input(self, t): method forward (line 72) | def forward(self, x, m: Optional[torch.Tensor] = None): class MultiQueryAttention2d (line 94) | class MultiQueryAttention2d(nn.Module): method __init__ (line 107) | def __init__( method init_weights (line 234) | def init_weights(self): method _reshape_input (line 244) | def _reshape_input(self, t: torch.Tensor): method _reshape_projected_query (line 253) | def _reshape_projected_query(self, t: torch.Tensor, num_heads: int, ke... method _reshape_output (line 262) | def _reshape_output(self, t: torch.Tensor, num_heads: int, h_px: int, ... method forward (line 270) | def forward(self, x, attn_mask: Optional[torch.Tensor] = None): class Attention2d (line 320) | class Attention2d(nn.Module): method __init__ (line 324) | def __init__( method forward (line 351) | def forward(self, x, attn_mask: Optional[torch.Tensor] = None): FILE: timm/layers/attention_pool.py class AttentionPoolLatent (line 13) | class AttentionPoolLatent(nn.Module): method __init__ (line 20) | def __init__( method init_weights (line 89) | def init_weights(self): method forward (line 94) | def forward(self, x, attn_mask: Optional[torch.Tensor] = None): class AttentionPoolPrr (line 132) | class AttentionPoolPrr(nn.Module): method __init__ (line 143) | def __init__( method forward (line 172) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: timm/layers/attention_pool2d.py class RotAttentionPool2d (line 22) | class RotAttentionPool2d(nn.Module): method __init__ (line 36) | def __init__( method init_weights (line 103) | def init_weights(self, zero_init_last: bool = False): method reset (line 117) | def reset(self, num_classes: Optional[int] = None, pool_type: Optional... method _pool (line 126) | def _pool(self, x: torch.Tensor, H: int, W: int) -> torch.Tensor: method forward (line 134) | def forward(self, x, pre_logits: bool = False): class AttentionPool2d (line 174) | class AttentionPool2d(nn.Module): method __init__ (line 187) | def __init__( method init_weights (line 247) | def init_weights(self, zero_init_last: bool = False): method reset (line 262) | def reset(self, num_classes: Optional[int] = None, pool_type: Optional... method _pool (line 271) | def _pool(self, x: torch.Tensor, H: int, W: int) -> torch.Tensor: method forward (line 279) | def forward(self, x, pre_logits: bool = False): FILE: timm/layers/blur_pool.py class BlurPool2d (line 20) | class BlurPool2d(nn.Module): method __init__ (line 33) | def __init__( method reset_parameters (line 57) | def reset_parameters(self) -> None: method _init_buffers (line 61) | def _init_buffers(self) -> None: method forward (line 74) | def forward(self, x: torch.Tensor) -> torch.Tensor: method init_non_persistent_buffers (line 84) | def init_non_persistent_buffers(self) -> None: function _normalize_aa_layer (line 89) | def _normalize_aa_layer(aa_layer: LayerType) -> Callable[..., nn.Module]: function _underlying_cls (line 104) | def _underlying_cls(layer_callable: Callable[..., nn.Module]): function _is_blurpool (line 111) | def _is_blurpool(layer_callable: Callable[..., nn.Module]) -> bool: function create_aa (line 122) | def create_aa( FILE: timm/layers/bottleneck_attn.py function rel_logits_1d (line 28) | def rel_logits_1d(q, rel_k, permute_mask: List[int]): class PosEmbedRel (line 56) | class PosEmbedRel(nn.Module): method __init__ (line 61) | def __init__( method reset_parameters (line 80) | def reset_parameters(self): method forward (line 84) | def forward(self, q): class BottleneckAttn (line 100) | class BottleneckAttn(nn.Module): method __init__ (line 122) | def __init__( method reset_parameters (line 158) | def reset_parameters(self): method forward (line 163) | def forward(self, x): FILE: timm/layers/cbam.py class ChannelAttn (line 21) | class ChannelAttn(nn.Module): method __init__ (line 24) | def __init__( method forward (line 45) | def forward(self, x): class LightChannelAttn (line 51) | class LightChannelAttn(ChannelAttn): method __init__ (line 54) | def __init__( method forward (line 69) | def forward(self, x): class SpatialAttn (line 75) | class SpatialAttn(nn.Module): method __init__ (line 78) | def __init__( method forward (line 89) | def forward(self, x): class LightSpatialAttn (line 95) | class LightSpatialAttn(nn.Module): method __init__ (line 98) | def __init__( method forward (line 109) | def forward(self, x): class CbamModule (line 115) | class CbamModule(nn.Module): method __init__ (line 116) | def __init__( method forward (line 143) | def forward(self, x): class LightCbamModule (line 149) | class LightCbamModule(nn.Module): method __init__ (line 150) | def __init__( method forward (line 177) | def forward(self, x): FILE: timm/layers/classifier.py function _create_pool (line 18) | def _create_pool( function _create_fc (line 37) | def _create_fc(num_features, num_classes, use_conv=False, device=None, d... function create_classifier (line 47) | def create_classifier( class ClassifierHead (line 77) | class ClassifierHead(nn.Module): method __init__ (line 80) | def __init__( method reset (line 117) | def reset(self, num_classes: int, pool_type: Optional[str] = None): method forward (line 136) | def forward(self, x, pre_logits: bool = False): class NormMlpClassifierHead (line 145) | class NormMlpClassifierHead(nn.Module): method __init__ (line 148) | def __init__( method reset (line 194) | def reset(self, num_classes: int, pool_type: Optional[str] = None): method forward (line 211) | def forward(self, x, pre_logits: bool = False): class ClNormMlpClassifierHead (line 223) | class ClNormMlpClassifierHead(nn.Module): method __init__ (line 226) | def __init__( method reset (line 273) | def reset(self, num_classes: int, pool_type: Optional[str] = None, res... method _global_pool (line 282) | def _global_pool(self, x): method forward (line 292) | def forward(self, x, pre_logits: bool = False): FILE: timm/layers/cond_conv2d.py function get_condconv_initializer (line 23) | def get_condconv_initializer(initializer, num_experts, expert_shape): class CondConv2d (line 37) | class CondConv2d(nn.Module): method __init__ (line 46) | def __init__( method reset_parameters (line 89) | def reset_parameters(self): method forward (line 100) | def forward(self, x, routing_weights): FILE: timm/layers/config.py function is_no_jit (line 44) | def is_no_jit(): class set_no_jit (line 48) | class set_no_jit: method __init__ (line 49) | def __init__(self, mode: bool) -> None: method __enter__ (line 54) | def __enter__(self) -> None: method __exit__ (line 57) | def __exit__(self, *args: Any) -> bool: function is_exportable (line 63) | def is_exportable(): class set_exportable (line 67) | class set_exportable: method __init__ (line 68) | def __init__(self, mode: bool) -> None: method __enter__ (line 73) | def __enter__(self) -> None: method __exit__ (line 76) | def __exit__(self, *args: Any) -> bool: function is_scriptable (line 82) | def is_scriptable(): class set_scriptable (line 86) | class set_scriptable: method __init__ (line 87) | def __init__(self, mode: bool) -> None: method __enter__ (line 92) | def __enter__(self) -> None: method __exit__ (line 95) | def __exit__(self, *args: Any) -> bool: class set_layer_config (line 101) | class set_layer_config: method __init__ (line 105) | def __init__( method __enter__ (line 125) | def __enter__(self) -> None: method __exit__ (line 128) | def __exit__(self, *args: Any) -> bool: function use_fused_attn (line 137) | def use_fused_attn(experimental: bool = False) -> bool: function set_fused_attn (line 146) | def set_fused_attn(enable: bool = True, experimental: bool = False): function use_reentrant_ckpt (line 159) | def use_reentrant_ckpt() -> bool: function set_reentrant_ckpt (line 163) | def set_reentrant_ckpt(enable: bool = True): FILE: timm/layers/conv2d_same.py function conv2d_same (line 18) | def conv2d_same( class Conv2dSame (line 32) | class Conv2dSame(nn.Conv2d): method __init__ (line 36) | def __init__( method forward (line 62) | def forward(self, x): class Conv2dSameExport (line 74) | class Conv2dSameExport(nn.Conv2d): method __init__ (line 81) | def __init__( method forward (line 109) | def forward(self, x): function create_conv2d_pad (line 128) | def create_conv2d_pad(in_chs, out_chs, kernel_size, **kwargs): FILE: timm/layers/conv_bn_act.py class ConvNormAct (line 15) | class ConvNormAct(nn.Module): method __init__ (line 16) | def __init__( method in_channels (line 85) | def in_channels(self): method out_channels (line 89) | def out_channels(self): method forward (line 92) | def forward(self, x): FILE: timm/layers/coord_attn.py class CoordAttn (line 23) | class CoordAttn(nn.Module): method __init__ (line 24) | def __init__( method forward (line 74) | def forward(self, x): class SimpleCoordAttn (line 101) | class SimpleCoordAttn(nn.Module): method __init__ (line 112) | def __init__( method forward (line 154) | def forward(self, x): class EfficientLocalAttn (line 176) | class EfficientLocalAttn(nn.Module): method __init__ (line 186) | def __init__( method forward (line 241) | def forward(self, x): class StripAttn (line 263) | class StripAttn(nn.Module): method __init__ (line 269) | def __init__( method forward (line 322) | def forward(self, x): FILE: timm/layers/create_act.py function get_act_fn (line 92) | def get_act_fn(name: Optional[LayerType] = 'relu'): function get_act_layer (line 110) | def get_act_layer(name: Optional[LayerType] = 'relu'): function create_act_layer (line 129) | def create_act_layer( FILE: timm/layers/create_attn.py function get_attn (line 22) | def get_attn(attn_type): function create_attn (line 93) | def create_attn(attn_type, channels, **kwargs): FILE: timm/layers/create_conv2d.py function create_conv2d (line 11) | def create_conv2d(in_channels, out_channels, kernel_size, **kwargs): FILE: timm/layers/create_norm.py function create_norm_layer (line 54) | def create_norm_layer(layer_name, num_features, **kwargs): function get_norm_layer (line 60) | def get_norm_layer(norm_layer): FILE: timm/layers/create_norm_act.py function create_norm_act_layer (line 92) | def create_norm_act_layer( function get_norm_act_layer (line 107) | def get_norm_act_layer( FILE: timm/layers/diff_attention.py class DiffAttention (line 21) | class DiffAttention(nn.Module): method __init__ (line 37) | def __init__( method set_lambda_init (line 107) | def set_lambda_init(self, depth: int): method reset_parameters (line 110) | def reset_parameters(self): method _compute_lambda (line 120) | def _compute_lambda(self) -> torch.Tensor: method forward (line 129) | def forward( FILE: timm/layers/drop.py function drop_block_2d (line 24) | def drop_block_2d( class DropBlock2d (line 102) | class DropBlock2d(nn.Module): method __init__ (line 116) | def __init__( method forward (line 143) | def forward(self, x): function drop_path (line 158) | def drop_path(x, drop_prob: float = 0., training: bool = False, scale_by... class DropPath (line 178) | class DropPath(nn.Module): method __init__ (line 181) | def __init__(self, drop_prob: float = 0., scale_by_keep: bool = True): method forward (line 186) | def forward(self, x): method extra_repr (line 189) | def extra_repr(self): function calculate_drop_path_rates (line 193) | def calculate_drop_path_rates( FILE: timm/layers/eca.py class EcaModule (line 46) | class EcaModule(nn.Module): method __init__ (line 61) | def __init__( method forward (line 98) | def forward(self, x): class CecaModule (line 111) | class CecaModule(nn.Module): method __init__ (line 135) | def __init__( method forward (line 161) | def forward(self, x): FILE: timm/layers/evo_norm.py function instance_std (line 36) | def instance_std(x, eps: float = 1e-5): function instance_std_tpu (line 41) | def instance_std_tpu(x, eps: float = 1e-5): function instance_rms (line 47) | def instance_rms(x, eps: float = 1e-5): function manual_var (line 52) | def manual_var(x, dim: Union[int, Sequence[int]], diff_sqm: bool = False): function group_std (line 62) | def group_std(x, groups: int = 32, eps: float = 1e-5, flatten: bool = Fa... function group_std_tpu (line 75) | def group_std_tpu(x, groups: int = 32, eps: float = 1e-5, diff_sqm: bool... function group_rms (line 90) | def group_rms(x, groups: int = 32, eps: float = 1e-5): class EvoNorm2dB0 (line 99) | class EvoNorm2dB0(nn.Module): method __init__ (line 100) | def __init__( method reset_parameters (line 122) | def reset_parameters(self): method forward (line 128) | def forward(self, x): class EvoNorm2dB1 (line 149) | class EvoNorm2dB1(nn.Module): method __init__ (line 150) | def __init__( method reset_parameters (line 171) | def reset_parameters(self): method forward (line 175) | def forward(self, x): class EvoNorm2dB2 (line 195) | class EvoNorm2dB2(nn.Module): method __init__ (line 196) | def __init__( method reset_parameters (line 217) | def reset_parameters(self): method forward (line 221) | def forward(self, x): class EvoNorm2dS0 (line 241) | class EvoNorm2dS0(nn.Module): method __init__ (line 242) | def __init__( method reset_parameters (line 268) | def reset_parameters(self): method forward (line 274) | def forward(self, x): class EvoNorm2dS0a (line 284) | class EvoNorm2dS0a(EvoNorm2dS0): method __init__ (line 285) | def __init__( method forward (line 306) | def forward(self, x): class EvoNorm2dS1 (line 318) | class EvoNorm2dS1(nn.Module): method __init__ (line 319) | def __init__( method reset_parameters (line 351) | def reset_parameters(self): method forward (line 355) | def forward(self, x): class EvoNorm2dS1a (line 364) | class EvoNorm2dS1a(EvoNorm2dS1): method __init__ (line 365) | def __init__( method forward (line 388) | def forward(self, x): class EvoNorm2dS2 (line 396) | class EvoNorm2dS2(nn.Module): method __init__ (line 397) | def __init__( method reset_parameters (line 428) | def reset_parameters(self): method forward (line 432) | def forward(self, x): class EvoNorm2dS2a (line 441) | class EvoNorm2dS2a(EvoNorm2dS2): method __init__ (line 442) | def __init__( method forward (line 465) | def forward(self, x): FILE: timm/layers/fast_norm.py function get_autocast_dtype (line 33) | def get_autocast_dtype(device: str = 'cuda'): function is_autocast_enabled (line 45) | def is_autocast_enabled(device: str = 'cuda'): function is_fast_norm (line 57) | def is_fast_norm(): function set_fast_norm (line 61) | def set_fast_norm(enable=True): function fast_group_norm (line 66) | def fast_group_norm( function fast_layer_norm (line 91) | def fast_layer_norm( function rms_norm (line 119) | def rms_norm( function fast_rms_norm (line 142) | def fast_rms_norm( function rms_norm2d (line 173) | def rms_norm2d( function fast_rms_norm2d (line 188) | def fast_rms_norm2d( function simple_norm (line 218) | def simple_norm( function fast_simple_norm (line 240) | def fast_simple_norm( FILE: timm/layers/filter_response_norm.py function inv_instance_rms (line 16) | def inv_instance_rms(x, eps: float = 1e-5): class FilterResponseNormTlu2d (line 21) | class FilterResponseNormTlu2d(nn.Module): method __init__ (line 22) | def __init__( method reset_parameters (line 43) | def reset_parameters(self): method forward (line 49) | def forward(self, x): class FilterResponseNormAct2d (line 58) | class FilterResponseNormAct2d(nn.Module): method __init__ (line 59) | def __init__( method reset_parameters (line 84) | def reset_parameters(self): method forward (line 88) | def forward(self, x): FILE: timm/layers/format.py class Format (line 7) | class Format(str, Enum): function get_spatial_dim (line 17) | def get_spatial_dim(fmt: FormatT): function get_channel_dim (line 38) | def get_channel_dim(fmt: FormatT): function nchw_to (line 57) | def nchw_to(x: torch.Tensor, fmt: Format): function nhwc_to (line 76) | def nhwc_to(x: torch.Tensor, fmt: Format): FILE: timm/layers/gather_excite.py class GatherExcite (line 26) | class GatherExcite(nn.Module): method __init__ (line 29) | def __init__( method forward (line 85) | def forward(self, x): FILE: timm/layers/global_context.py class GlobalContext (line 21) | class GlobalContext(nn.Module): method __init__ (line 23) | def __init__( method reset_parameters (line 60) | def reset_parameters(self): method forward (line 66) | def forward(self, x): FILE: timm/layers/grid.py function ndgrid (line 6) | def ndgrid(*tensors) -> Tuple[torch.Tensor, ...]: function meshgrid (line 30) | def meshgrid(*tensors) -> Tuple[torch.Tensor, ...]: FILE: timm/layers/grn.py class GlobalResponseNorm (line 18) | class GlobalResponseNorm(nn.Module): method __init__ (line 21) | def __init__( method forward (line 44) | def forward(self, x): FILE: timm/layers/halo_attn.py function rel_logits_1d (line 30) | def rel_logits_1d(q, rel_k, permute_mask: List[int]): class PosEmbedRel (line 61) | class PosEmbedRel(nn.Module): method __init__ (line 67) | def __init__( method reset_parameters (line 94) | def reset_parameters(self): method forward (line 98) | def forward(self, q): class HaloAttn (line 114) | class HaloAttn(nn.Module): method __init__ (line 142) | def __init__( method reset_parameters (line 199) | def reset_parameters(self): method forward (line 206) | def forward(self, x): FILE: timm/layers/helpers.py function _ntuple (line 10) | def _ntuple(n): function make_divisible (line 36) | def make_divisible(v, divisor=8, min_value=None, round_limit=.9): function extend_tuple (line 59) | def extend_tuple(x, n): FILE: timm/layers/hybrid_embed.py class HybridEmbed (line 21) | class HybridEmbed(nn.Module): method __init__ (line 28) | def __init__( method _init_backbone (line 93) | def _init_backbone( method set_input_size (line 131) | def set_input_size( method feat_ratio (line 181) | def feat_ratio(self, as_scalar=True) -> Union[Tuple[int, int], int]: method dynamic_feat_size (line 191) | def dynamic_feat_size(self, img_size: Tuple[int, int]) -> Tuple[int, i... method set_grad_checkpointing (line 201) | def set_grad_checkpointing(self, enable: bool = True): method forward (line 207) | def forward(self, x): class HybridEmbedWithSize (line 224) | class HybridEmbedWithSize(HybridEmbed): method __init__ (line 228) | def __init__( method set_grad_checkpointing (line 257) | def set_grad_checkpointing(self, enable: bool = True): method forward (line 263) | def forward(self, x) -> Tuple[torch.Tensor, List[int]]: FILE: timm/layers/inplace_abn.py function inplace_abn (line 10) | def inplace_abn(x, weight, bias, running_mean, running_var, function inplace_abn_sync (line 15) | def inplace_abn_sync(**kwargs): class InplaceAbn (line 22) | class InplaceAbn(nn.Module): method __init__ (line 43) | def __init__( method reset_parameters (line 86) | def reset_parameters(self): method forward (line 93) | def forward(self, x): FILE: timm/layers/interpolate.py class RegularGridInterpolator (line 10) | class RegularGridInterpolator: method __init__ (line 18) | def __init__(self, points, values): method __call__ (line 34) | def __call__(self, points_to_interp): FILE: timm/layers/lambda_layer.py function rel_pos_indices (line 34) | def rel_pos_indices(size, device=None): class LambdaLayer (line 46) | class LambdaLayer(nn.Module): method __init__ (line 73) | def __init__( method reset_parameters (line 131) | def reset_parameters(self) -> None: method _init_buffers (line 140) | def _init_buffers(self) -> None: method forward (line 147) | def forward(self, x): method init_non_persistent_buffers (line 173) | def init_non_persistent_buffers(self) -> None: FILE: timm/layers/layer_scale.py class LayerScale (line 5) | class LayerScale(nn.Module): method __init__ (line 8) | def __init__( method reset_parameters (line 23) | def reset_parameters(self): method forward (line 26) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerScale2d (line 30) | class LayerScale2d(nn.Module): method __init__ (line 33) | def __init__( method reset_parameters (line 48) | def reset_parameters(self): method forward (line 51) | def forward(self, x): FILE: timm/layers/linear.py class Linear (line 8) | class Linear(nn.Linear): method forward (line 14) | def forward(self, input: torch.Tensor) -> torch.Tensor: FILE: timm/layers/median_pool.py class MedianPool2d (line 9) | class MedianPool2d(nn.Module): method __init__ (line 18) | def __init__(self, kernel_size=3, stride=1, padding=0, same=False): method _padding (line 25) | def _padding(self, x): method forward (line 45) | def forward(self, x): FILE: timm/layers/mixed_conv2d.py function _split_channels (line 15) | def _split_channels(num_chan, num_groups): class MixedConv2d (line 21) | class MixedConv2d(nn.ModuleDict): method __init__ (line 27) | def __init__( method forward (line 64) | def forward(self, x): FILE: timm/layers/ml_decoder.py function add_ml_decoder_head (line 9) | def add_ml_decoder_head(model): class TransformerDecoderLayerOptimal (line 35) | class TransformerDecoderLayerOptimal(nn.Module): method __init__ (line 36) | def __init__(self, d_model, nhead=8, dim_feedforward=2048, dropout=0.1... method __setstate__ (line 56) | def __setstate__(self, state): method forward (line 61) | def forward(self, tgt: Tensor, memory: Tensor, tgt_mask: Optional[Tens... class MLDecoder (line 90) | class MLDecoder(nn.Module): method __init__ (line 91) | def __init__(self, num_classes, num_of_groups=-1, decoder_embedding=76... method forward (line 123) | def forward(self, x): FILE: timm/layers/mlp.py class Mlp (line 14) | class Mlp(nn.Module): method __init__ (line 19) | def __init__( method forward (line 47) | def forward(self, x): class GluMlp (line 57) | class GluMlp(nn.Module): method __init__ (line 63) | def __init__( method init_weights (line 95) | def init_weights(self): method forward (line 101) | def forward(self, x): class SwiGLU (line 115) | class SwiGLU(nn.Module): method __init__ (line 120) | def __init__( method init_weights (line 151) | def init_weights(self): method forward (line 157) | def forward(self, x): class GatedMlp (line 168) | class GatedMlp(nn.Module): method __init__ (line 171) | def __init__( method forward (line 204) | def forward(self, x): class ConvMlp (line 215) | class ConvMlp(nn.Module): method __init__ (line 218) | def __init__( method forward (line 242) | def forward(self, x): class GlobalResponseNormMlp (line 251) | class GlobalResponseNormMlp(nn.Module): method __init__ (line 256) | def __init__( method forward (line 283) | def forward(self, x): FILE: timm/layers/non_local_attn.py class NonLocalAttn (line 19) | class NonLocalAttn(nn.Module): method __init__ (line 26) | def __init__( method forward (line 49) | def forward(self, x): method reset_parameters (line 71) | def reset_parameters(self): class BilinearAttnTransform (line 87) | class BilinearAttnTransform(nn.Module): method __init__ (line 89) | def __init__( method resize_mat (line 109) | def resize_mat(self, x, t: int): method forward (line 122) | def forward(self, x): class BatNonLocalAttn (line 148) | class BatNonLocalAttn(nn.Module): method __init__ (line 153) | def __init__( method forward (line 184) | def forward(self, x): FILE: timm/layers/norm.py class GroupNorm (line 31) | class GroupNorm(nn.GroupNorm): method __init__ (line 34) | def __init__( method forward (line 46) | def forward(self, x): class GroupNorm1 (line 53) | class GroupNorm1(nn.GroupNorm): method __init__ (line 59) | def __init__(self, num_channels: int, **kwargs): method forward (line 63) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerNorm (line 70) | class LayerNorm(nn.LayerNorm): method __init__ (line 75) | def __init__( method forward (line 85) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerNormFp32 (line 93) | class LayerNormFp32(nn.LayerNorm): method __init__ (line 97) | def __init__( method forward (line 106) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerNorm2d (line 113) | class LayerNorm2d(nn.LayerNorm): method __init__ (line 117) | def __init__( method forward (line 127) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerNorm2dFp32 (line 137) | class LayerNorm2dFp32(nn.LayerNorm): method __init__ (line 140) | def __init__( method forward (line 149) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _is_contiguous (line 158) | def _is_contiguous(tensor: torch.Tensor) -> bool: function _layer_norm_cf (line 166) | def _layer_norm_cf(x: torch.Tensor, weight: torch.Tensor, bias: torch.Te... function _layer_norm_cf_sqm (line 173) | def _layer_norm_cf_sqm(x: torch.Tensor, weight: torch.Tensor, bias: torc... class LayerNormExp2d (line 181) | class LayerNormExp2d(nn.LayerNorm): method __init__ (line 190) | def __init__(self, num_channels: int, eps: float = 1e-6): method forward (line 193) | def forward(self, x) -> torch.Tensor: class RmsNorm (line 202) | class RmsNorm(nn.Module): method __init__ (line 211) | def __init__( method reset_parameters (line 237) | def reset_parameters(self) -> None: method forward (line 241) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RmsNormFp32 (line 251) | class RmsNormFp32(nn.Module): method __init__ (line 259) | def __init__( method reset_parameters (line 284) | def reset_parameters(self) -> None: method forward (line 288) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RmsNorm2d (line 294) | class RmsNorm2d(nn.Module): method __init__ (line 307) | def __init__( method reset_parameters (line 333) | def reset_parameters(self) -> None: method forward (line 337) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RmsNorm2dFp32 (line 347) | class RmsNorm2dFp32(nn.Module): method __init__ (line 359) | def __init__( method reset_parameters (line 384) | def reset_parameters(self) -> None: method forward (line 388) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SimpleNorm (line 394) | class SimpleNorm(nn.Module): method __init__ (line 403) | def __init__( method reset_parameters (line 429) | def reset_parameters(self) -> None: method forward (line 433) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SimpleNormFp32 (line 441) | class SimpleNormFp32(nn.Module): method __init__ (line 449) | def __init__( method reset_parameters (line 474) | def reset_parameters(self) -> None: method forward (line 478) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SimpleNorm2d (line 484) | class SimpleNorm2d(nn.Module): method __init__ (line 493) | def __init__( method reset_parameters (line 519) | def reset_parameters(self) -> None: method forward (line 523) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SimpleNorm2dFp32 (line 533) | class SimpleNorm2dFp32(nn.Module): method __init__ (line 541) | def __init__( method reset_parameters (line 566) | def reset_parameters(self) -> None: method forward (line 570) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: timm/layers/norm_act.py function _create_act (line 42) | def _create_act( class BatchNormAct2d (line 57) | class BatchNormAct2d(nn.BatchNorm2d): method __init__ (line 64) | def __init__( method forward (line 101) | def forward(self, x): class SyncBatchNormAct (line 153) | class SyncBatchNormAct(nn.SyncBatchNorm): method forward (line 158) | def forward(self, x: torch.Tensor) -> torch.Tensor: function convert_sync_batchnorm (line 167) | def convert_sync_batchnorm(module, process_group=None): class FrozenBatchNormAct2d (line 211) | class FrozenBatchNormAct2d(torch.nn.Module): method __init__ (line 220) | def __init__( method _load_from_state_dict (line 243) | def _load_from_state_dict( method forward (line 261) | def forward(self, x: torch.Tensor) -> torch.Tensor: method __repr__ (line 274) | def __repr__(self) -> str: function freeze_batch_norm_2d (line 278) | def freeze_batch_norm_2d(module): function unfreeze_batch_norm_2d (line 322) | def unfreeze_batch_norm_2d(module): function _num_groups (line 363) | def _num_groups(num_channels: int, num_groups: int, group_size: int): class GroupNormAct (line 370) | class GroupNormAct(nn.GroupNorm): method __init__ (line 374) | def __init__( method forward (line 402) | def forward(self, x): class GroupNorm1Act (line 412) | class GroupNorm1Act(nn.GroupNorm): method __init__ (line 415) | def __init__( method forward (line 434) | def forward(self, x): class LayerNormAct (line 444) | class LayerNormAct(nn.LayerNorm): method __init__ (line 447) | def __init__( method forward (line 465) | def forward(self, x): class LayerNormActFp32 (line 475) | class LayerNormActFp32(nn.LayerNorm): method __init__ (line 477) | def __init__( method forward (line 493) | def forward(self, x): class LayerNormAct2d (line 502) | class LayerNormAct2d(nn.LayerNorm): method __init__ (line 505) | def __init__( method forward (line 522) | def forward(self, x): class LayerNormAct2dFp32 (line 534) | class LayerNormAct2dFp32(nn.LayerNorm): method __init__ (line 536) | def __init__( method forward (line 552) | def forward(self, x): class RmsNormAct (line 563) | class RmsNormAct(RmsNorm): method __init__ (line 570) | def __init__( method forward (line 587) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RmsNormActFp32 (line 597) | class RmsNormActFp32(RmsNorm): method __init__ (line 604) | def __init__( method forward (line 620) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RmsNormAct2d (line 628) | class RmsNormAct2d(RmsNorm2d): method __init__ (line 635) | def __init__( method forward (line 652) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RmsNormAct2dFp32 (line 662) | class RmsNormAct2dFp32(RmsNorm2d): method __init__ (line 669) | def __init__( method forward (line 685) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: timm/layers/other_pool.py class LsePlus2d (line 24) | class LsePlus2d(nn.Module): method __init__ (line 36) | def __init__( method forward (line 57) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LsePlus1d (line 67) | class LsePlus1d(nn.Module): method __init__ (line 75) | def __init__( method forward (line 93) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SimPool2d (line 102) | class SimPool2d(nn.Module): method __init__ (line 113) | def __init__( method forward (line 154) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SimPool1d (line 198) | class SimPool1d(nn.Module): method __init__ (line 209) | def __init__( method forward (line 249) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: timm/layers/padding.py function get_padding (line 15) | def get_padding(kernel_size: int, stride: int = 1, dilation: int = 1, **... function get_same_padding (line 24) | def get_same_padding(x: int, kernel_size: int, stride: int, dilation: int): function is_static_pad (line 32) | def is_static_pad(kernel_size: int, stride: int = 1, dilation: int = 1, ... function pad_same_arg (line 39) | def pad_same_arg( function pad_same (line 53) | def pad_same( function get_padding_value (line 67) | def get_padding_value(padding, kernel_size, **kwargs) -> Tuple[Tuple, bo... FILE: timm/layers/patch_dropout.py function patch_dropout_forward (line 7) | def patch_dropout_forward( class PatchDropout (line 53) | class PatchDropout(nn.Module): method __init__ (line 59) | def __init__( method forward (line 71) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PatchDropoutWithIndices (line 82) | class PatchDropoutWithIndices(nn.Module): method __init__ (line 88) | def __init__( method forward (line 100) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, Optional[tor... FILE: timm/layers/patch_embed.py class PatchEmbed (line 26) | class PatchEmbed(nn.Module): method __init__ (line 32) | def __init__( method _init_img_size (line 65) | def _init_img_size(self, img_size: Union[int, Tuple[int, int]]): method set_input_size (line 74) | def set_input_size( method feat_ratio (line 102) | def feat_ratio(self, as_scalar=True) -> Union[Tuple[int, int], int]: method dynamic_feat_size (line 108) | def dynamic_feat_size(self, img_size: Tuple[int, int]) -> Tuple[int, i... method forward (line 117) | def forward(self, x): class PatchEmbedWithSize (line 145) | class PatchEmbedWithSize(PatchEmbed): method __init__ (line 150) | def __init__( method forward (line 176) | def forward(self, x) -> Tuple[torch.Tensor, List[int]]: function resample_patch_embed_old (line 193) | def resample_patch_embed_old( function _compute_resize_matrix (line 266) | def _compute_resize_matrix( function _apply_resampling (line 293) | def _apply_resampling( function resample_patch_embed (line 311) | def resample_patch_embed( class PatchEmbedResamplerFixedOrigSize (line 341) | class PatchEmbedResamplerFixedOrigSize(nn.Module): method __init__ (line 346) | def __init__( method _get_or_create_pinv_matrix (line 367) | def _get_or_create_pinv_matrix( method forward (line 397) | def forward(self, patch_embed: torch.Tensor, new_size: List[int]) -> t... class PatchEmbedInterpolator (line 434) | class PatchEmbedInterpolator(nn.Module): method __init__ (line 449) | def __init__( method resample_linear_weight (line 464) | def resample_linear_weight( method resample_conv_weight (line 506) | def resample_conv_weight( method forward (line 534) | def forward( FILE: timm/layers/pool1d.py function global_pool_nlc (line 4) | def global_pool_nlc( FILE: timm/layers/pool2d_same.py function avg_pool2d_same (line 15) | def avg_pool2d_same( class AvgPool2dSame (line 29) | class AvgPool2dSame(nn.AvgPool2d): method __init__ (line 32) | def __init__( method forward (line 44) | def forward(self, x): function max_pool2d_same (line 50) | def max_pool2d_same( class MaxPool2dSame (line 63) | class MaxPool2dSame(nn.MaxPool2d): method __init__ (line 66) | def __init__( method forward (line 79) | def forward(self, x): function create_pool2d (line 84) | def create_pool2d(pool_type, kernel_size, stride=None, **kwargs): FILE: timm/layers/pos_embed.py function resample_abs_pos_embed (line 19) | def resample_abs_pos_embed( function resample_abs_pos_embed_nhwc (line 64) | def resample_abs_pos_embed_nhwc( FILE: timm/layers/pos_embed_rel.py function gen_relative_position_index (line 21) | def gen_relative_position_index( function resize_rel_pos_bias_table_simple (line 77) | def resize_rel_pos_bias_table_simple( function resize_rel_pos_bias_table_levit (line 124) | def resize_rel_pos_bias_table_levit( function resize_rel_pos_bias_table (line 156) | def resize_rel_pos_bias_table( class RelPosBias (line 272) | class RelPosBias(nn.Module): method __init__ (line 277) | def __init__( method reset_parameters (line 305) | def reset_parameters(self) -> None: method _init_buffers (line 310) | def _init_buffers(self) -> None: method get_bias (line 320) | def get_bias(self) -> torch.Tensor: method forward (line 326) | def forward(self, attn, shared_rel_pos: Optional[torch.Tensor] = None): method init_non_persistent_buffers (line 329) | def init_non_persistent_buffers(self) -> None: function gen_relative_log_coords (line 334) | def gen_relative_log_coords( class RelPosMlp (line 365) | class RelPosMlp(nn.Module): method __init__ (line 371) | def __init__( method get_bias (line 426) | def get_bias(self) -> torch.Tensor: method forward (line 439) | def forward(self, attn, shared_rel_pos: Optional[torch.Tensor] = None): method reset_parameters (line 442) | def reset_parameters(self) -> None: method _init_buffers (line 446) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 463) | def init_non_persistent_buffers(self) -> None: function generate_lookup_tensor (line 468) | def generate_lookup_tensor( function reindex_2d_einsum_lookup (line 499) | def reindex_2d_einsum_lookup( class RelPosBiasTf (line 528) | class RelPosBiasTf(nn.Module): method __init__ (line 533) | def __init__( method reset_parameters (line 560) | def reset_parameters(self) -> None: method _init_buffers (line 565) | def _init_buffers(self) -> None: method get_bias (line 572) | def get_bias(self) -> torch.Tensor: method forward (line 582) | def forward(self, attn, shared_rel_pos: Optional[torch.Tensor] = None): method init_non_persistent_buffers (line 585) | def init_non_persistent_buffers(self) -> None: FILE: timm/layers/pos_embed_sincos.py function pixel_freq_bands (line 15) | def pixel_freq_bands( function freq_bands (line 28) | def freq_bands( function build_sincos2d_pos_embed (line 39) | def build_sincos2d_pos_embed( function swap_shape_xy (line 80) | def swap_shape_xy(seq: List[int]) -> List[int]: function build_fourier_pos_embed (line 86) | def build_fourier_pos_embed( class FourierEmbed (line 171) | class FourierEmbed(nn.Module): method __init__ (line 173) | def __init__( method reset_parameters (line 192) | def reset_parameters(self) -> None: method _init_buffers (line 196) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 200) | def init_non_persistent_buffers(self) -> None: method forward (line 204) | def forward(self, x): function rot (line 228) | def rot(x): function rope_rotate_half (line 234) | def rope_rotate_half(x: torch.Tensor) -> torch.Tensor: function apply_rot_embed (line 241) | def apply_rot_embed( function apply_rot_embed_list (line 260) | def apply_rot_embed_list( function apply_rot_embed_cat (line 281) | def apply_rot_embed_cat( function apply_keep_indices_nlc (line 300) | def apply_keep_indices_nlc( function build_rotary_pos_embed (line 337) | def build_rotary_pos_embed( class RotaryEmbedding (line 393) | class RotaryEmbedding(nn.Module): method __init__ (line 404) | def __init__( method reset_parameters (line 451) | def reset_parameters(self) -> None: method _init_buffers (line 455) | def _init_buffers(self) -> None: method _compute_bands (line 464) | def _compute_bands(self, device=None, dtype=None): method _get_pos_embed_values (line 480) | def _get_pos_embed_values(self, feat_shape: List[int], device=None, dt... method init_non_persistent_buffers (line 496) | def init_non_persistent_buffers(self) -> None: method update_feat_shape (line 500) | def update_feat_shape(self, feat_shape: List[int]): method get_embed (line 512) | def get_embed(self, shape: Optional[List[int]] = None): method forward (line 528) | def forward(self, x): class RotaryEmbeddingCat (line 534) | class RotaryEmbeddingCat(nn.Module): method __init__ (line 542) | def __init__( method reset_parameters (line 587) | def reset_parameters(self) -> None: method _init_buffers (line 591) | def _init_buffers(self) -> None: method _compute_bands (line 598) | def _compute_bands(self, device=None, dtype=None): method _get_pos_embed_values (line 614) | def _get_pos_embed_values(self, feat_shape: List[int], device=None, dt... method init_non_persistent_buffers (line 630) | def init_non_persistent_buffers(self) -> None: method update_feat_shape (line 634) | def update_feat_shape(self, feat_shape: List[int]): method get_embed (line 645) | def get_embed(self, shape: Optional[List[int]] = None): method get_batch_embeds (line 662) | def get_batch_embeds( method forward (line 715) | def forward(self, x): function init_random_2d_freqs (line 721) | def init_random_2d_freqs( function get_mixed_grid (line 757) | def get_mixed_grid( function get_mixed_freqs (line 775) | def get_mixed_freqs( class RotaryEmbeddingMixed (line 793) | class RotaryEmbeddingMixed(nn.Module): method __init__ (line 802) | def __init__( method _init_buffers (line 857) | def _init_buffers(self) -> None: method reset_parameters (line 864) | def reset_parameters(self) -> None: method _get_grid_values (line 868) | def _get_grid_values(self, feat_shape: Optional[List[int]]): method update_feat_shape (line 876) | def update_feat_shape(self, feat_shape: Optional[List[int]]): method init_non_persistent_buffers (line 885) | def init_non_persistent_buffers(self) -> None: method get_embed (line 889) | def get_embed(self, shape: Optional[List[int]] = None) -> torch.Tensor: method get_batch_embeds (line 911) | def get_batch_embeds( method forward (line 967) | def forward(self, x): method no_weight_decay (line 972) | def no_weight_decay(self): function make_coords_dinov3 (line 979) | def make_coords_dinov3( class RotaryEmbeddingDinoV3 (line 1027) | class RotaryEmbeddingDinoV3(nn.Module): method __init__ (line 1036) | def __init__( method reset_parameters (line 1091) | def reset_parameters(self) -> None: method _init_buffers (line 1095) | def _init_buffers(self) -> None: method _compute_periods (line 1102) | def _compute_periods(self, device: torch.device = 'cpu', dtype: torch.... method _apply_coord_augs (line 1119) | def _apply_coord_augs(self, coords: torch.Tensor) -> torch.Tensor: method _get_pos_embed_from_coords (line 1153) | def _get_pos_embed_from_coords(self, coords: torch.Tensor) -> Tuple[to... method _create_embed (line 1177) | def _create_embed( method _cache_embed (line 1195) | def _cache_embed(self, feat_shape: List[int]): method update_feat_shape (line 1201) | def update_feat_shape(self, feat_shape: List[int]): method init_non_persistent_buffers (line 1206) | def init_non_persistent_buffers(self) -> None: method get_embed (line 1210) | def get_embed(self, shape: Optional[List[int]] = None) -> torch.Tensor: method forward (line 1228) | def forward(self, x: torch.Tensor) -> torch.Tensor: function create_rope_embed (line 1235) | def create_rope_embed( FILE: timm/layers/selective_kernel.py function _kernel_valid (line 17) | def _kernel_valid(k): class SelectiveKernelAttn (line 24) | class SelectiveKernelAttn(nn.Module): method __init__ (line 25) | def __init__( method forward (line 48) | def forward(self, x): class SelectiveKernel (line 61) | class SelectiveKernel(nn.Module): method __init__ (line 63) | def __init__( method forward (line 139) | def forward(self, x): FILE: timm/layers/separable_conv.py class SeparableConvNormAct (line 16) | class SeparableConvNormAct(nn.Module): method __init__ (line 19) | def __init__( method in_channels (line 65) | def in_channels(self): method out_channels (line 69) | def out_channels(self): method forward (line 72) | def forward(self, x): class SeparableConv2d (line 82) | class SeparableConv2d(nn.Module): method __init__ (line 85) | def __init__( method in_channels (line 123) | def in_channels(self): method out_channels (line 127) | def out_channels(self): method forward (line 130) | def forward(self, x): FILE: timm/layers/space_to_depth.py class SpaceToDepth (line 5) | class SpaceToDepth(nn.Module): method __init__ (line 16) | def __init__(self, block_size: int = 4): method forward (line 21) | def forward(self, x): class DepthToSpace (line 29) | class DepthToSpace(nn.Module): method __init__ (line 39) | def __init__(self, block_size): method forward (line 43) | def forward(self, x): FILE: timm/layers/split_attn.py class RadixSoftmax (line 18) | class RadixSoftmax(nn.Module): method __init__ (line 19) | def __init__(self, radix: int, cardinality: int): method forward (line 24) | def forward(self, x): class SplitAttn (line 35) | class SplitAttn(nn.Module): method __init__ (line 38) | def __init__( method forward (line 89) | def forward(self, x): FILE: timm/layers/split_batchnorm.py class SplitBatchNorm2d (line 18) | class SplitBatchNorm2d(torch.nn.BatchNorm2d): method __init__ (line 20) | def __init__( method forward (line 40) | def forward(self, input: torch.Tensor): function convert_splitbn_model (line 53) | def convert_splitbn_model(module, num_splits=2): FILE: timm/layers/squeeze_excite.py class SEModule (line 21) | class SEModule(nn.Module): method __init__ (line 30) | def __init__( method forward (line 55) | def forward(self, x): class EffectiveSEModule (line 69) | class EffectiveSEModule(nn.Module): method __init__ (line 73) | def __init__( method forward (line 88) | def forward(self, x): class SqueezeExciteCl (line 100) | class SqueezeExciteCl(nn.Module): method __init__ (line 109) | def __init__( method forward (line 130) | def forward(self, x): FILE: timm/layers/std_conv.py class StdConv2d (line 29) | class StdConv2d(nn.Conv2d): method __init__ (line 35) | def __init__( method forward (line 56) | def forward(self, x): class StdConv2dSame (line 70) | class StdConv2dSame(nn.Conv2d): method __init__ (line 76) | def __init__( method forward (line 97) | def forward(self, x): class ScaledStdConv2d (line 112) | class ScaledStdConv2d(nn.Conv2d): method __init__ (line 121) | def __init__( method reset_parameters (line 151) | def reset_parameters(self) -> None: method forward (line 159) | def forward(self, x): class ScaledStdConv2dSame (line 173) | class ScaledStdConv2dSame(nn.Conv2d): method __init__ (line 182) | def __init__( method reset_parameters (line 212) | def reset_parameters(self) -> None: method forward (line 220) | def forward(self, x): FILE: timm/layers/test_time_pool.py class TestTimePoolHead (line 16) | class TestTimePoolHead(nn.Module): method __init__ (line 17) | def __init__(self, base, original_pool=7): method forward (line 31) | def forward(self, x): function apply_test_time_pool (line 39) | def apply_test_time_pool(model, config, use_test_size=False): FILE: timm/layers/trace_utils.py function _assert (line 4) | def _assert(condition: bool, message: str): function _float_to_int (line 8) | def _float_to_int(x: float) -> int: FILE: timm/layers/typing.py function nullwrap (line 17) | def nullwrap(fn: F) -> F: ... # decorator form function nullwrap (line 20) | def nullwrap(fn: None = ...) -> ContextManager: ... # context‑manager form function nullwrap (line 22) | def nullwrap(fn: Optional[F] = None): FILE: timm/layers/weight_init.py function is_meta_device (line 8) | def is_meta_device(device) -> bool: function _trunc_normal_ (line 19) | def _trunc_normal_(tensor, mean, std, a, b): function trunc_normal_ (line 54) | def trunc_normal_(tensor, mean=0., std=1., a=-2., b=2.): function trunc_normal_tf_ (line 81) | def trunc_normal_tf_(tensor, mean=0., std=1., a=-2., b=2.): function variance_scaling_ (line 110) | def variance_scaling_(tensor, scale=1.0, mode='fan_in', distribution='no... function lecun_normal_ (line 135) | def lecun_normal_(tensor): function init_weight_vit (line 139) | def init_weight_vit( function init_weight_jax (line 158) | def init_weight_jax( FILE: timm/loss/asymmetric_loss.py class AsymmetricLossMultiLabel (line 5) | class AsymmetricLossMultiLabel(nn.Module): method __init__ (line 6) | def __init__(self, gamma_neg=4, gamma_pos=1, clip=0.05, eps=1e-8, disa... method forward (line 15) | def forward(self, x, y): class AsymmetricLossSingleLabel (line 53) | class AsymmetricLossSingleLabel(nn.Module): method __init__ (line 54) | def __init__(self, gamma_pos=1, gamma_neg=4, eps: float = 0.1, reducti... method forward (line 64) | def forward(self, inputs, target, reduction=None): FILE: timm/loss/binary_cross_entropy.py class BinaryCrossEntropy (line 12) | class BinaryCrossEntropy(nn.Module): method __init__ (line 16) | def __init__( method forward (line 37) | def forward(self, x: torch.Tensor, target: torch.Tensor) -> torch.Tensor: FILE: timm/loss/cross_entropy.py class LabelSmoothingCrossEntropy (line 11) | class LabelSmoothingCrossEntropy(nn.Module): method __init__ (line 14) | def __init__(self, smoothing=0.1): method forward (line 20) | def forward(self, x: torch.Tensor, target: torch.Tensor) -> torch.Tensor: class SoftTargetCrossEntropy (line 29) | class SoftTargetCrossEntropy(nn.Module): method __init__ (line 31) | def __init__(self): method forward (line 34) | def forward(self, x: torch.Tensor, target: torch.Tensor) -> torch.Tensor: FILE: timm/loss/jsd.py class JsdCrossEntropy (line 8) | class JsdCrossEntropy(nn.Module): method __init__ (line 17) | def __init__(self, num_splits=3, alpha=12, smoothing=0.1): method __call__ (line 26) | def __call__(self, output, target): FILE: timm/models/_builder.py function _resolve_pretrained_source (line 43) | def _resolve_pretrained_source(pretrained_cfg: Dict[str, Any]) -> Tuple[... function set_pretrained_download_progress (line 91) | def set_pretrained_download_progress(enable: bool = True) -> None: function set_pretrained_check_hash (line 97) | def set_pretrained_check_hash(enable: bool = True) -> None: function load_custom_pretrained (line 103) | def load_custom_pretrained( function load_pretrained (line 152) | def load_pretrained( function pretrained_cfg_for_features (line 291) | def pretrained_cfg_for_features(pretrained_cfg: Dict[str, Any]) -> Dict[... function _filter_kwargs (line 300) | def _filter_kwargs(kwargs: Dict[str, Any], names: List[str]) -> None: function _update_default_model_kwargs (line 307) | def _update_default_model_kwargs(pretrained_cfg, kwargs, kwargs_filter) ... function resolve_pretrained_cfg (line 348) | def resolve_pretrained_cfg( function build_model_with_cfg (line 384) | def build_model_with_cfg( FILE: timm/models/_efficientnet_blocks.py function num_groups (line 34) | def num_groups(group_size: Optional[int], channels: int): class SqueezeExcite (line 43) | class SqueezeExcite(nn.Module): method __init__ (line 55) | def __init__( method forward (line 78) | def forward(self, x): class ConvBnAct (line 86) | class ConvBnAct(nn.Module): method __init__ (line 89) | def __init__( method feature_info (line 127) | def feature_info(self, location): method forward (line 133) | def forward(self, x): class DepthwiseSeparableConv (line 143) | class DepthwiseSeparableConv(nn.Module): method __init__ (line 148) | def __init__( method feature_info (line 212) | def feature_info(self, location): method forward (line 218) | def forward(self, x): class InvertedResidual (line 234) | class InvertedResidual(nn.Module): method __init__ (line 244) | def __init__( method feature_info (line 318) | def feature_info(self, location): method forward (line 324) | def forward(self, x): class UniversalInvertedResidual (line 342) | class UniversalInvertedResidual(nn.Module): method __init__ (line 349) | def __init__( method feature_info (line 469) | def feature_info(self, location): method forward (line 475) | def forward(self, x): class MobileAttention (line 489) | class MobileAttention(nn.Module): method __init__ (line 495) | def __init__( method feature_info (line 591) | def feature_info(self, location): method forward (line 597) | def forward(self, x): class CondConvResidual (line 612) | class CondConvResidual(InvertedResidual): method __init__ (line 615) | def __init__( method forward (line 662) | def forward(self, x): class EdgeResidual (line 678) | class EdgeResidual(nn.Module): method __init__ (line 690) | def __init__( method feature_info (line 745) | def feature_info(self, location): method forward (line 751) | def forward(self, x): FILE: timm/models/_efficientnet_builder.py function get_bn_args_tf (line 43) | def get_bn_args_tf(): function resolve_bn_args (line 47) | def resolve_bn_args(kwargs): function resolve_act_layer (line 58) | def resolve_act_layer(kwargs, default='relu'): function round_channels (line 62) | def round_channels(channels, multiplier=1.0, divisor=8, channel_min=None... function _log_info_if (line 69) | def _log_info_if(msg, condition): function _parse_ksize (line 74) | def _parse_ksize(ss): function _decode_block_str (line 81) | def _decode_block_str(block_str): function _scale_stage_depth (line 232) | def _scale_stage_depth(stack_args, repeats, depth_multiplier=1.0, depth_... function decode_arch_def (line 270) | def decode_arch_def( class EfficientNetBuilder (line 316) | class EfficientNetBuilder: method __init__ (line 325) | def __init__( method _make_block (line 369) | def _make_block(self, ba, block_idx, block_count): method __call__ (line 433) | def __call__(self, in_chs, model_block_args): function _init_weight_goog (line 532) | def _init_weight_goog(m, n='', fix_group_fanout=True): function efficientnet_init_weights (line 573) | def efficientnet_init_weights(model: nn.Module, init_fn=None): FILE: timm/models/_factory.py function parse_model_name (line 18) | def parse_model_name(model_name: str) -> Tuple[Optional[str], str]: function safe_model_name (line 35) | def safe_model_name(model_name: str, remove_source: bool = True) -> str: function create_model (line 44) | def create_model( FILE: timm/models/_features.py function feature_take_indices (line 28) | def feature_take_indices( function _out_indices_as_tuple (line 69) | def _out_indices_as_tuple(x: Union[int, Tuple[int, ...]]) -> Tuple[int, ... class FeatureInfo (line 79) | class FeatureInfo: method __init__ (line 81) | def __init__( method from_other (line 98) | def from_other(self, out_indices: OutIndicesT): method get (line 102) | def get(self, key: str, idx: Optional[Union[int, List[int]]] = None): method get_dicts (line 115) | def get_dicts(self, keys: Optional[List[str]] = None, idx: Optional[Un... method channels (line 128) | def channels(self, idx: Optional[Union[int, List[int]]] = None): method reduction (line 133) | def reduction(self, idx: Optional[Union[int, List[int]]] = None): method module_name (line 138) | def module_name(self, idx: Optional[Union[int, List[int]]] = None): method __getitem__ (line 143) | def __getitem__(self, item): method __len__ (line 146) | def __len__(self): class FeatureHooks (line 150) | class FeatureHooks: method __init__ (line 159) | def __init__( method _collect_output_hook (line 186) | def _collect_output_hook(self, hook_id, *args): method get_output (line 192) | def get_output(self, device) -> Dict[str, torch.tensor]: function _module_list (line 198) | def _module_list(module, flatten_sequential=False): function _get_feature_info (line 212) | def _get_feature_info(net, out_indices: OutIndicesT): function _get_return_layers (line 222) | def _get_return_layers(feature_info, out_map): class FeatureDictNet (line 230) | class FeatureDictNet(nn.ModuleDict): method __init__ (line 245) | def __init__( method set_grad_checkpointing (line 286) | def set_grad_checkpointing(self, enable: bool = True): method _collect (line 289) | def _collect(self, x) -> (Dict[str, torch.Tensor]): method forward (line 311) | def forward(self, x) -> Dict[str, torch.Tensor]: class FeatureListNet (line 315) | class FeatureListNet(FeatureDictNet): method __init__ (line 320) | def __init__( method forward (line 344) | def forward(self, x) -> (List[torch.Tensor]): class FeatureHookNet (line 348) | class FeatureHookNet(nn.ModuleDict): method __init__ (line 361) | def __init__( method set_grad_checkpointing (line 418) | def set_grad_checkpointing(self, enable: bool = True): method forward (line 421) | def forward(self, x): class FeatureGetterNet (line 435) | class FeatureGetterNet(nn.ModuleDict): method __init__ (line 441) | def __init__( method forward (line 475) | def forward(self, x): FILE: timm/models/_features_fx.py class FeatureGraphNet (line 38) | class FeatureGraphNet(nn.Module): method __init__ (line 43) | def __init__( method forward (line 60) | def forward(self, x): class GraphExtractNet (line 67) | class GraphExtractNet(nn.Module): method __init__ (line 83) | def __init__( method forward (line 95) | def forward(self, x) -> Union[List[torch.Tensor], torch.Tensor]: FILE: timm/models/_helpers.py function _checkpoint_unsafe_globals (line 31) | def _checkpoint_unsafe_globals(checkpoint_path: str) -> str: function _torch_load (line 41) | def _torch_load( function _remove_prefix (line 72) | def _remove_prefix(text: str, prefix: str) -> str: function clean_state_dict (line 79) | def clean_state_dict(state_dict: Dict[str, Any]) -> Dict[str, Any]: function load_state_dict (line 93) | def load_state_dict( function load_checkpoint (line 136) | def load_checkpoint( function remap_state_dict (line 178) | def remap_state_dict( function resume_checkpoint (line 207) | def resume_checkpoint( FILE: timm/models/_hub.py function get_cache_dir (line 54) | def get_cache_dir(child_dir: str = ''): function download_cached_file (line 69) | def download_cached_file( function check_cached_file (line 95) | def check_cached_file( function has_hf_hub (line 121) | def has_hf_hub(necessary: bool = False): function hf_split (line 129) | def hf_split(hf_id: str): function load_cfg_from_json (line 138) | def load_cfg_from_json(json_file: Union[str, Path]): function download_from_hf (line 144) | def download_from_hf( function _parse_model_cfg (line 158) | def _parse_model_cfg( function load_model_config_from_hf (line 190) | def load_model_config_from_hf( function load_model_config_from_path (line 201) | def load_model_config_from_path( function load_state_dict_from_hf (line 214) | def load_state_dict_from_hf( function load_state_dict_from_path (line 265) | def load_state_dict_from_path( function load_custom_from_hf (line 296) | def load_custom_from_hf( function save_config_for_hf (line 313) | def save_config_for_hf( function save_for_hf (line 362) | def save_for_hf( function push_to_hf_hub (line 390) | def push_to_hf_hub( function generate_readme (line 451) | def generate_readme( function _get_safe_alternatives (line 520) | def _get_safe_alternatives(filename: str) -> Iterable[str]: function _get_license_from_hf_hub (line 535) | def _get_license_from_hf_hub(model_id: Optional[str], hf_hub_id: Optiona... FILE: timm/models/_manipulate.py function model_parameters (line 21) | def model_parameters(model: nn.Module, exclude_head: bool = False): function named_apply (line 29) | def named_apply( function named_modules (line 45) | def named_modules( function named_modules_with_params (line 61) | def named_modules_with_params( function group_with_matcher (line 80) | def group_with_matcher( function group_parameters (line 141) | def group_parameters( function group_modules (line 151) | def group_modules( function flatten_modules (line 161) | def flatten_modules( function checkpoint (line 191) | def checkpoint( function checkpoint_seq (line 213) | def checkpoint_seq( function adapt_input_conv (line 289) | def adapt_input_conv(in_chans: int, conv_weight: Tensor) -> Tensor: function reinit_non_persistent_buffers (line 314) | def reinit_non_persistent_buffers(model: nn.Module) -> List[str]: FILE: timm/models/_pretrained.py class PretrainedCfg (line 11) | class PretrainedCfg: method has_weights (line 58) | def has_weights(self): method to_dict (line 61) | def to_dict(self, remove_source=False, remove_null=True): function filter_pretrained_cfg (line 69) | def filter_pretrained_cfg(cfg, remove_source=False, remove_null=True): class DefaultCfg (line 82) | class DefaultCfg: method default (line 88) | def default(self): method default_with_tag (line 92) | def default_with_tag(self): FILE: timm/models/_prune.py function extract_layer (line 12) | def extract_layer(model, layer): function set_layer (line 39) | def set_layer(model, layer, val): function adapt_model_from_string (line 70) | def adapt_model_from_string(parent_module, model_string): function adapt_model_from_file (line 165) | def adapt_model_from_file(parent_module, model_variant): FILE: timm/models/_registry.py function split_model_name_tag (line 33) | def split_model_name_tag(model_name: str, no_tag: str = '') -> Tuple[str... function get_arch_name (line 39) | def get_arch_name(model_name: str) -> str: function generate_default_cfgs (line 43) | def generate_default_cfgs(cfgs: Dict[str, Union[Dict[str, Any], Pretrain... function register_model (line 75) | def register_model(fn: Callable[..., Any]) -> Callable[..., Any]: function _deprecated_model_shim (line 139) | def _deprecated_model_shim(deprecated_name: str, current_fn: Callable = ... function register_model_deprecations (line 149) | def register_model_deprecations(module_name: str, deprecation_map: Dict[... function _natural_key (line 171) | def _natural_key(string_: str) -> List[Union[int, str]]: function _expand_filter (line 176) | def _expand_filter(filter: str): function list_models (line 185) | def list_models( function list_pretrained (line 268) | def list_pretrained( function get_deprecated_models (line 280) | def get_deprecated_models(module: str = '') -> Dict[str, str]: function is_model (line 285) | def is_model(model_name: str) -> bool: function model_entrypoint (line 292) | def model_entrypoint(model_name: str, module_filter: Optional[str] = Non... function list_modules (line 301) | def list_modules() -> List[str]: function is_model_in_modules (line 308) | def is_model_in_modules( function is_model_pretrained (line 322) | def is_model_pretrained(model_name: str) -> bool: function get_pretrained_cfg (line 326) | def get_pretrained_cfg(model_name: str, allow_unregistered: bool = True)... function get_pretrained_cfg_value (line 339) | def get_pretrained_cfg_value(model_name: str, cfg_key: str) -> Optional[... function get_arch_pretrained_cfgs (line 346) | def get_arch_pretrained_cfgs(model_name: str) -> Dict[str, PretrainedCfg]: FILE: timm/models/beit.py function gen_relative_position_index (line 73) | def gen_relative_position_index(window_size: Tuple[int, int], device=Non... class Attention (line 108) | class Attention(nn.Module): method __init__ (line 116) | def __init__( method _get_rel_pos_bias (line 185) | def _get_rel_pos_bias(self) -> torch.Tensor: method forward (line 198) | def forward(self, x: torch.Tensor, shared_rel_pos_bias: Optional[torch... method reset_parameters (line 254) | def reset_parameters(self) -> None: method _init_buffers (line 263) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 272) | def init_non_persistent_buffers(self) -> None: class Block (line 277) | class Block(nn.Module): method __init__ (line 285) | def __init__( method reset_parameters (line 368) | def reset_parameters(self) -> None: method forward (line 374) | def forward(self, x: torch.Tensor, shared_rel_pos_bias: Optional[torch... class RelativePositionBias (line 393) | class RelativePositionBias(nn.Module): method __init__ (line 400) | def __init__(self, window_size: Tuple[int, int], num_heads: int, devic... method reset_parameters (line 422) | def reset_parameters(self) -> None: method _init_buffers (line 427) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 433) | def init_non_persistent_buffers(self) -> None: method forward (line 437) | def forward(self) -> torch.Tensor: class Beit (line 448) | class Beit(nn.Module): method __init__ (line 456) | def __init__( method init_weights (line 575) | def init_weights(self, needs_reset: bool = True) -> None: method fix_init_weight (line 595) | def fix_init_weight(self) -> None: method _init_weights (line 607) | def _init_weights(self, m: nn.Module, needs_reset: bool = True): method no_weight_decay (line 622) | def no_weight_decay(self) -> Set[str]: method set_grad_checkpointing (line 635) | def set_grad_checkpointing(self, enable: bool = True): method group_matcher (line 644) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method get_classifier (line 660) | def get_classifier(self) -> nn.Module: method reset_classifier (line 668) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 680) | def forward_intermediates( method prune_intermediate_layers (line 752) | def prune_intermediate_layers( method forward_features (line 777) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 801) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 817) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _cfg (line 831) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function checkpoint_filter_fn (line 918) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _create_beit (line 974) | def _create_beit(variant: str, pretrained: bool = False, **kwargs) -> Beit: function beit_base_patch16_224 (line 996) | def beit_base_patch16_224(pretrained: bool = False, **kwargs) -> Beit: function beit_base_patch16_384 (line 1006) | def beit_base_patch16_384(pretrained: bool = False, **kwargs) -> Beit: function beit_large_patch16_224 (line 1016) | def beit_large_patch16_224(pretrained: bool = False, **kwargs) -> Beit: function beit_large_patch16_384 (line 1026) | def beit_large_patch16_384(pretrained: bool = False, **kwargs) -> Beit: function beit_large_patch16_512 (line 1036) | def beit_large_patch16_512(pretrained: bool = False, **kwargs) -> Beit: function beitv2_base_patch16_224 (line 1046) | def beitv2_base_patch16_224(pretrained: bool = False, **kwargs) -> Beit: function beitv2_large_patch16_224 (line 1056) | def beitv2_large_patch16_224(pretrained: bool = False, **kwargs) -> Beit: FILE: timm/models/byoanet.py function _create_byoanet (line 265) | def _create_byoanet(variant: str, cfg_variant: Optional[str] = None, pre... function _cfg (line 285) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function botnet26t_256 (line 371) | def botnet26t_256(pretrained: bool = False, **kwargs) -> ByobNet: function sebotnet33ts_256 (line 379) | def sebotnet33ts_256(pretrained: bool = False, **kwargs) -> ByobNet: function botnet50ts_256 (line 386) | def botnet50ts_256(pretrained: bool = False, **kwargs) -> ByobNet: function eca_botnext26ts_256 (line 394) | def eca_botnext26ts_256(pretrained: bool = False, **kwargs) -> ByobNet: function halonet_h1 (line 402) | def halonet_h1(pretrained: bool = False, **kwargs) -> ByobNet: function halonet26t (line 410) | def halonet26t(pretrained: bool = False, **kwargs) -> ByobNet: function sehalonet33ts (line 417) | def sehalonet33ts(pretrained: bool = False, **kwargs) -> ByobNet: function halonet50ts (line 424) | def halonet50ts(pretrained: bool = False, **kwargs) -> ByobNet: function eca_halonext26ts (line 431) | def eca_halonext26ts(pretrained: bool = False, **kwargs) -> ByobNet: function lambda_resnet26t (line 438) | def lambda_resnet26t(pretrained: bool = False, **kwargs) -> ByobNet: function lambda_resnet50ts (line 445) | def lambda_resnet50ts(pretrained: bool = False, **kwargs) -> ByobNet: function lambda_resnet26rpt_256 (line 452) | def lambda_resnet26rpt_256(pretrained: bool = False, **kwargs) -> ByobNet: function haloregnetz_b (line 460) | def haloregnetz_b(pretrained: bool = False, **kwargs) -> ByobNet: function lamhalobotnet50ts_256 (line 467) | def lamhalobotnet50ts_256(pretrained: bool = False, **kwargs) -> ByobNet: function halo2botnet50ts_256 (line 474) | def halo2botnet50ts_256(pretrained: bool = False, **kwargs) -> ByobNet: FILE: timm/models/byobnet.py class ByoBlockCfg (line 68) | class ByoBlockCfg: class ByoModelCfg (line 89) | class ByoModelCfg: function _rep_vgg_bcfg (line 122) | def _rep_vgg_bcfg(d: Tuple[int, ...] = (4, 6, 16, 1), wf: Tuple[float, .... function _mobileone_bcfg (line 142) | def _mobileone_bcfg( function interleave_blocks (line 179) | def interleave_blocks( function expand_blocks_cfg (line 211) | def expand_blocks_cfg(stage_blocks_cfg: Union[ByoBlockCfg, Sequence[ByoB... function num_groups (line 228) | def num_groups(group_size: Optional[int], channels: int) -> int: class LayerFn (line 247) | class LayerFn: class DownsampleAvg (line 256) | class DownsampleAvg(nn.Module): method __init__ (line 262) | def __init__( method forward (line 294) | def forward(self, x: torch.Tensor) -> torch.Tensor: function create_shortcut (line 306) | def create_shortcut( class BasicBlock (line 341) | class BasicBlock(nn.Module): method __init__ (line 345) | def __init__( method init_weights (line 396) | def init_weights(self, zero_init_last: bool = False): method forward (line 403) | def forward(self, x): class BottleneckBlock (line 415) | class BottleneckBlock(nn.Module): method __init__ (line 419) | def __init__( method init_weights (line 484) | def init_weights(self, zero_init_last: bool = False): method forward (line 491) | def forward(self, x): class DarkBlock (line 505) | class DarkBlock(nn.Module): method __init__ (line 516) | def __init__( method init_weights (line 568) | def init_weights(self, zero_init_last: bool = False): method forward (line 575) | def forward(self, x): class EdgeBlock (line 587) | class EdgeBlock(nn.Module): method __init__ (line 597) | def __init__( method init_weights (line 647) | def init_weights(self, zero_init_last: bool = False): method forward (line 654) | def forward(self, x): class RepVggBlock (line 666) | class RepVggBlock(nn.Module): method __init__ (line 672) | def __init__( method init_weights (line 734) | def init_weights(self, zero_init_last: bool = False): method forward (line 743) | def forward(self, x): method reparameterize (line 757) | def reparameterize(self): method _get_kernel_bias (line 790) | def _get_kernel_bias(self) -> Tuple[torch.Tensor, torch.Tensor]: method _fuse_bn_tensor (line 816) | def _fuse_bn_tensor(self, branch) -> Tuple[torch.Tensor, torch.Tensor]: class MobileOneBlock (line 848) | class MobileOneBlock(nn.Module): method __init__ (line 858) | def __init__( method forward (line 933) | def forward(self, x: torch.Tensor) -> torch.Tensor: method reparameterize (line 959) | def reparameterize(self): method _get_kernel_bias (line 991) | def _get_kernel_bias(self) -> Tuple[torch.Tensor, torch.Tensor]: method _fuse_bn_tensor (line 1022) | def _fuse_bn_tensor(self, branch) -> Tuple[torch.Tensor, torch.Tensor]: class SelfAttnBlock (line 1054) | class SelfAttnBlock(nn.Module): method __init__ (line 1058) | def __init__( method init_weights (line 1119) | def init_weights(self, zero_init_last: bool = False): method forward (line 1125) | def forward(self, x): function register_block (line 1149) | def register_block(block_type: str, block_fn: nn.Module): function create_block (line 1153) | def create_block(block: Union[str, nn.Module], **kwargs): class Stem (line 1160) | class Stem(nn.Sequential): method __init__ (line 1162) | def __init__( method forward_intermediates (line 1232) | def forward_intermediates(self, x) -> Tuple[torch.Tensor, Optional[tor... function create_byob_stem (line 1241) | def create_byob_stem( function reduce_feat_size (line 1291) | def reduce_feat_size(feat_size, stride=2): function override_kwargs (line 1295) | def override_kwargs(block_kwargs, model_kwargs): function update_block_kwargs (line 1307) | def update_block_kwargs(block_kwargs: Dict[str, Any], block_cfg: ByoBloc... function drop_blocks (line 1343) | def drop_blocks( function create_byob_stages (line 1372) | def create_byob_stages( function get_layer_fns (line 1444) | def get_layer_fns(cfg: ByoModelCfg, allow_aa: bool = True): class ByobNet (line 1457) | class ByobNet(nn.Module): method __init__ (line 1466) | def __init__( method group_matcher (line 1616) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 1635) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 1644) | def get_classifier(self) -> nn.Module: method reset_classifier (line 1652) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 1662) | def forward_intermediates( method prune_intermediate_layers (line 1724) | def prune_intermediate_layers( method forward_features (line 1749) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 1766) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 1778) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _init_weights (line 1792) | def _init_weights(module: nn.Module, name: str = '', zero_init_last: boo... function _convert_openai_clip (line 2390) | def _convert_openai_clip( function checkpoint_filter_fn (line 2433) | def checkpoint_filter_fn( function _create_byobnet (line 2442) | def _create_byobnet(variant: str, pretrained: bool = False, **kwargs) ->... function _cfg (line 2462) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _cfgr (line 2482) | def _cfgr(url: str = '', **kwargs) -> Dict[str, Any]: function gernet_l (line 2799) | def gernet_l(pretrained=False, **kwargs) -> ByobNet: function gernet_m (line 2807) | def gernet_m(pretrained=False, **kwargs) -> ByobNet: function gernet_s (line 2815) | def gernet_s(pretrained=False, **kwargs) -> ByobNet: function repvgg_a0 (line 2823) | def repvgg_a0(pretrained=False, **kwargs) -> ByobNet: function repvgg_a1 (line 2831) | def repvgg_a1(pretrained=False, **kwargs) -> ByobNet: function repvgg_a2 (line 2839) | def repvgg_a2(pretrained=False, **kwargs) -> ByobNet: function repvgg_b0 (line 2847) | def repvgg_b0(pretrained=False, **kwargs) -> ByobNet: function repvgg_b1 (line 2855) | def repvgg_b1(pretrained=False, **kwargs) -> ByobNet: function repvgg_b1g4 (line 2863) | def repvgg_b1g4(pretrained=False, **kwargs) -> ByobNet: function repvgg_b2 (line 2871) | def repvgg_b2(pretrained=False, **kwargs) -> ByobNet: function repvgg_b2g4 (line 2879) | def repvgg_b2g4(pretrained=False, **kwargs) -> ByobNet: function repvgg_b3 (line 2887) | def repvgg_b3(pretrained=False, **kwargs) -> ByobNet: function repvgg_b3g4 (line 2895) | def repvgg_b3g4(pretrained=False, **kwargs) -> ByobNet: function repvgg_d2se (line 2903) | def repvgg_d2se(pretrained=False, **kwargs) -> ByobNet: function resnet51q (line 2911) | def resnet51q(pretrained=False, **kwargs) -> ByobNet: function resnet61q (line 2918) | def resnet61q(pretrained=False, **kwargs) -> ByobNet: function resnext26ts (line 2925) | def resnext26ts(pretrained=False, **kwargs) -> ByobNet: function gcresnext26ts (line 2932) | def gcresnext26ts(pretrained=False, **kwargs) -> ByobNet: function seresnext26ts (line 2939) | def seresnext26ts(pretrained=False, **kwargs) -> ByobNet: function eca_resnext26ts (line 2946) | def eca_resnext26ts(pretrained=False, **kwargs) -> ByobNet: function bat_resnext26ts (line 2953) | def bat_resnext26ts(pretrained=False, **kwargs) -> ByobNet: function resnet32ts (line 2960) | def resnet32ts(pretrained=False, **kwargs) -> ByobNet: function resnet33ts (line 2967) | def resnet33ts(pretrained=False, **kwargs) -> ByobNet: function gcresnet33ts (line 2974) | def gcresnet33ts(pretrained=False, **kwargs) -> ByobNet: function seresnet33ts (line 2981) | def seresnet33ts(pretrained=False, **kwargs) -> ByobNet: function eca_resnet33ts (line 2988) | def eca_resnet33ts(pretrained=False, **kwargs) -> ByobNet: function gcresnet50t (line 2995) | def gcresnet50t(pretrained=False, **kwargs) -> ByobNet: function gcresnext50ts (line 3002) | def gcresnext50ts(pretrained=False, **kwargs) -> ByobNet: function regnetz_b16 (line 3009) | def regnetz_b16(pretrained=False, **kwargs) -> ByobNet: function regnetz_c16 (line 3016) | def regnetz_c16(pretrained=False, **kwargs) -> ByobNet: function regnetz_d32 (line 3023) | def regnetz_d32(pretrained=False, **kwargs) -> ByobNet: function regnetz_d8 (line 3030) | def regnetz_d8(pretrained=False, **kwargs) -> ByobNet: function regnetz_e8 (line 3037) | def regnetz_e8(pretrained=False, **kwargs) -> ByobNet: function regnetz_b16_evos (line 3044) | def regnetz_b16_evos(pretrained=False, **kwargs) -> ByobNet: function regnetz_c16_evos (line 3051) | def regnetz_c16_evos(pretrained=False, **kwargs) -> ByobNet: function regnetz_d8_evos (line 3058) | def regnetz_d8_evos(pretrained=False, **kwargs) -> ByobNet: function mobileone_s0 (line 3065) | def mobileone_s0(pretrained=False, **kwargs) -> ByobNet: function mobileone_s1 (line 3072) | def mobileone_s1(pretrained=False, **kwargs) -> ByobNet: function mobileone_s2 (line 3079) | def mobileone_s2(pretrained=False, **kwargs) -> ByobNet: function mobileone_s3 (line 3086) | def mobileone_s3(pretrained=False, **kwargs) -> ByobNet: function mobileone_s4 (line 3093) | def mobileone_s4(pretrained=False, **kwargs) -> ByobNet: function resnet50_clip (line 3100) | def resnet50_clip(pretrained=False, **kwargs) -> ByobNet: function resnet101_clip (line 3107) | def resnet101_clip(pretrained=False, **kwargs) -> ByobNet: function resnet50x4_clip (line 3114) | def resnet50x4_clip(pretrained=False, **kwargs) -> ByobNet: function resnet50x16_clip (line 3121) | def resnet50x16_clip(pretrained=False, **kwargs) -> ByobNet: function resnet50x64_clip (line 3128) | def resnet50x64_clip(pretrained=False, **kwargs) -> ByobNet: function resnet50_clip_gap (line 3135) | def resnet50_clip_gap(pretrained=False, **kwargs) -> ByobNet: function resnet101_clip_gap (line 3142) | def resnet101_clip_gap(pretrained=False, **kwargs) -> ByobNet: function resnet50x4_clip_gap (line 3149) | def resnet50x4_clip_gap(pretrained=False, **kwargs) -> ByobNet: function resnet50x16_clip_gap (line 3156) | def resnet50x16_clip_gap(pretrained=False, **kwargs) -> ByobNet: function resnet50x64_clip_gap (line 3163) | def resnet50x64_clip_gap(pretrained=False, **kwargs) -> ByobNet: function resnet50_mlp (line 3170) | def resnet50_mlp(pretrained=False, **kwargs) -> ByobNet: function test_byobnet (line 3177) | def test_byobnet(pretrained=False, **kwargs) -> ByobNet: FILE: timm/models/cait.py class ClassAttn (line 27) | class ClassAttn(nn.Module): method __init__ (line 32) | def __init__( method forward (line 56) | def forward(self, x): class LayerScaleBlockClassAttn (line 81) | class LayerScaleBlockClassAttn(nn.Module): method __init__ (line 84) | def __init__( method forward (line 125) | def forward(self, x, x_cls): class TalkingHeadAttn (line 132) | class TalkingHeadAttn(nn.Module): method __init__ (line 135) | def __init__( method forward (line 164) | def forward(self, x): class LayerScaleBlock (line 184) | class LayerScaleBlock(nn.Module): method __init__ (line 187) | def __init__( method forward (line 228) | def forward(self, x): class Cait (line 234) | class Cait(nn.Module): method __init__ (line 237) | def __init__( method _init_weights (line 333) | def _init_weights(self, m): method no_weight_decay (line 343) | def no_weight_decay(self): method set_grad_checkpointing (line 347) | def set_grad_checkpointing(self, enable=True): method group_matcher (line 351) | def group_matcher(self, coarse=False): method get_classifier (line 368) | def get_classifier(self) -> nn.Module: method reset_classifier (line 371) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 378) | def forward_intermediates( method prune_intermediate_layers (line 439) | def prune_intermediate_layers( method forward_features (line 456) | def forward_features(self, x): method forward_head (line 471) | def forward_head(self, x, pre_logits: bool = False): method forward (line 477) | def forward(self, x): function checkpoint_filter_fn (line 483) | def checkpoint_filter_fn(state_dict, model=None): function _create_cait (line 492) | def _create_cait(variant, pretrained=False, **kwargs): function _cfg (line 505) | def _cfg(url='', **kwargs): function cait_xxs24_224 (line 566) | def cait_xxs24_224(pretrained=False, **kwargs) -> Cait: function cait_xxs24_384 (line 573) | def cait_xxs24_384(pretrained=False, **kwargs) -> Cait: function cait_xxs36_224 (line 580) | def cait_xxs36_224(pretrained=False, **kwargs) -> Cait: function cait_xxs36_384 (line 587) | def cait_xxs36_384(pretrained=False, **kwargs) -> Cait: function cait_xs24_384 (line 594) | def cait_xs24_384(pretrained=False, **kwargs) -> Cait: function cait_s24_224 (line 601) | def cait_s24_224(pretrained=False, **kwargs) -> Cait: function cait_s24_384 (line 608) | def cait_s24_384(pretrained=False, **kwargs) -> Cait: function cait_s36_384 (line 615) | def cait_s36_384(pretrained=False, **kwargs) -> Cait: function cait_m36_384 (line 622) | def cait_m36_384(pretrained=False, **kwargs) -> Cait: function cait_m48_448 (line 629) | def cait_m48_448(pretrained=False, **kwargs) -> Cait: FILE: timm/models/coat.py class ConvRelPosEnc (line 24) | class ConvRelPosEnc(nn.Module): method __init__ (line 26) | def __init__( method forward (line 77) | def forward(self, q, v, size: Tuple[int, int]): class FactorAttnConvRelPosEnc (line 99) | class FactorAttnConvRelPosEnc(nn.Module): method __init__ (line 101) | def __init__( method forward (line 126) | def forward(self, x, size: Tuple[int, int]): class ConvPosEnc (line 152) | class ConvPosEnc(nn.Module): method __init__ (line 156) | def __init__( method forward (line 167) | def forward(self, x, size: Tuple[int, int]): class SerialBlock (line 186) | class SerialBlock(nn.Module): method __init__ (line 189) | def __init__( method forward (line 234) | def forward(self, x, size: Tuple[int, int]): class ParallelBlock (line 249) | class ParallelBlock(nn.Module): method __init__ (line 251) | def __init__( method upsample (line 320) | def upsample(self, x, factor: float, size: Tuple[int, int]): method downsample (line 324) | def downsample(self, x, factor: float, size: Tuple[int, int]): method interpolate (line 328) | def interpolate(self, x, scale_factor: float, size: Tuple[int, int]): method forward (line 351) | def forward(self, x1, x2, x3, x4, sizes: List[Tuple[int, int]]): class CoaT (line 386) | class CoaT(nn.Module): method __init__ (line 388) | def __init__( method _init_weights (line 563) | def _init_weights(self, m): method no_weight_decay (line 573) | def no_weight_decay(self): method set_grad_checkpointing (line 577) | def set_grad_checkpointing(self, enable=True): method group_matcher (line 581) | def group_matcher(self, coarse=False): method get_classifier (line 599) | def get_classifier(self) -> nn.Module: method reset_classifier (line 602) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 609) | def forward_features(self, x0): method forward_head (line 690) | def forward_head(self, x_feat: Union[torch.Tensor, List[torch.Tensor]]... method forward (line 703) | def forward(self, x) -> torch.Tensor: function insert_cls (line 714) | def insert_cls(x, cls_token): function remove_cls (line 721) | def remove_cls(x): function checkpoint_filter_fn (line 726) | def checkpoint_filter_fn(state_dict, model): function _create_coat (line 742) | def _create_coat(variant, pretrained=False, default_cfg=None, **kwargs): function _cfg_coat (line 756) | def _cfg_coat(url='', **kwargs): function coat_tiny (line 784) | def coat_tiny(pretrained=False, **kwargs) -> CoaT: function coat_mini (line 792) | def coat_mini(pretrained=False, **kwargs) -> CoaT: function coat_small (line 800) | def coat_small(pretrained=False, **kwargs) -> CoaT: function coat_lite_tiny (line 808) | def coat_lite_tiny(pretrained=False, **kwargs) -> CoaT: function coat_lite_mini (line 816) | def coat_lite_mini(pretrained=False, **kwargs) -> CoaT: function coat_lite_small (line 824) | def coat_lite_small(pretrained=False, **kwargs) -> CoaT: function coat_lite_medium (line 832) | def coat_lite_medium(pretrained=False, **kwargs) -> CoaT: function coat_lite_medium_384 (line 840) | def coat_lite_medium_384(pretrained=False, **kwargs) -> CoaT: FILE: timm/models/convit.py class GPSA (line 40) | class GPSA(nn.Module): method __init__ (line 41) | def __init__( method forward (line 70) | def forward(self, x): method get_attention (line 81) | def get_attention(self, x): method get_attention_map (line 97) | def get_attention_map(self, x, return_map=False): method local_init (line 106) | def local_init(self): method get_rel_indices (line 120) | def get_rel_indices(self, num_patches: int) -> torch.Tensor: class MHSA (line 138) | class MHSA(nn.Module): method __init__ (line 139) | def __init__( method get_attention_map (line 160) | def get_attention_map(self, x, return_map=False): method forward (line 184) | def forward(self, x): class Block (line 199) | class Block(nn.Module): method __init__ (line 201) | def __init__( method forward (line 251) | def forward(self, x): class ConVit (line 257) | class ConVit(nn.Module): method __init__ (line 261) | def __init__( method _init_weights (line 352) | def _init_weights(self, m): method no_weight_decay (line 362) | def no_weight_decay(self): method group_matcher (line 366) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 373) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 377) | def get_classifier(self) -> nn.Module: method reset_classifier (line 380) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 387) | def forward_features(self, x): method forward_head (line 400) | def forward_head(self, x, pre_logits: bool = False): method forward (line 406) | def forward(self, x): function _create_convit (line 412) | def _create_convit(variant, pretrained=False, **kwargs): function _cfg (line 419) | def _cfg(url='', **kwargs): function convit_tiny (line 438) | def convit_tiny(pretrained=False, **kwargs) -> ConVit: function convit_small (line 446) | def convit_small(pretrained=False, **kwargs) -> ConVit: function convit_base (line 454) | def convit_base(pretrained=False, **kwargs) -> ConVit: FILE: timm/models/convmixer.py class Residual (line 18) | class Residual(nn.Module): method __init__ (line 19) | def __init__(self, fn: nn.Module): method forward (line 23) | def forward(self, x): class ConvMixer (line 27) | class ConvMixer(nn.Module): method __init__ (line 28) | def __init__( method group_matcher (line 72) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 77) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 81) | def get_classifier(self) -> nn.Module: method reset_classifier (line 84) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 90) | def forward_features(self, x): method forward_head (line 98) | def forward_head(self, x, pre_logits: bool = False): method forward (line 103) | def forward(self, x): function _create_convmixer (line 109) | def _create_convmixer(variant, pretrained=False, **kwargs): function _cfg (line 116) | def _cfg(url='', **kwargs): function convmixer_1536_20 (line 136) | def convmixer_1536_20(pretrained=False, **kwargs) -> ConvMixer: function convmixer_768_32 (line 142) | def convmixer_768_32(pretrained=False, **kwargs) -> ConvMixer: function convmixer_1024_20_ks9_p14 (line 148) | def convmixer_1024_20_ks9_p14(pretrained=False, **kwargs) -> ConvMixer: FILE: timm/models/convnext.py class Downsample (line 76) | class Downsample(nn.Module): method __init__ (line 79) | def __init__( method forward (line 110) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNeXtBlock (line 117) | class ConvNeXtBlock(nn.Module): method __init__ (line 129) | def __init__( method forward (line 197) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNeXtStage (line 216) | class ConvNeXtStage(nn.Module): method __init__ (line 219) | def __init__( method forward (line 300) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _get_norm_layers (line 320) | def _get_norm_layers(norm_layer: Union[Callable, str], conv_mlp: bool, n... class ConvNeXt (line 338) | class ConvNeXt(nn.Module): method __init__ (line 344) | def __init__( method group_matcher (line 489) | def group_matcher(self, coarse: bool = False) -> Dict[str, Union[str, ... method set_grad_checkpointing (line 508) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 518) | def get_classifier(self) -> nn.Module: method reset_classifier (line 522) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 532) | def forward_intermediates( method prune_intermediate_layers (line 582) | def prune_intermediate_layers( method forward_features (line 606) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 613) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 625) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _init_weights (line 632) | def _init_weights(module: nn.Module, name: Optional[str] = None, head_in... function checkpoint_filter_fn (line 652) | def checkpoint_filter_fn(state_dict, model): function _create_convnext (line 694) | def _create_convnext(variant, pretrained=False, **kwargs): function _cfg (line 708) | def _cfg(url='', **kwargs): function _cfgv2 (line 719) | def _cfgv2(url='', **kwargs): function convnext_zepto_rms (line 1155) | def convnext_zepto_rms(pretrained=False, **kwargs) -> ConvNeXt: function convnext_zepto_rms_ols (line 1163) | def convnext_zepto_rms_ols(pretrained=False, **kwargs) -> ConvNeXt: function convnext_atto (line 1172) | def convnext_atto(pretrained=False, **kwargs) -> ConvNeXt: function convnext_atto_ols (line 1180) | def convnext_atto_ols(pretrained=False, **kwargs) -> ConvNeXt: function convnext_atto_rms (line 1188) | def convnext_atto_rms(pretrained=False, **kwargs) -> ConvNeXt: function convnext_femto (line 1196) | def convnext_femto(pretrained=False, **kwargs) -> ConvNeXt: function convnext_femto_ols (line 1204) | def convnext_femto_ols(pretrained=False, **kwargs) -> ConvNeXt: function convnext_pico (line 1212) | def convnext_pico(pretrained=False, **kwargs) -> ConvNeXt: function convnext_pico_ols (line 1220) | def convnext_pico_ols(pretrained=False, **kwargs) -> ConvNeXt: function convnext_nano (line 1228) | def convnext_nano(pretrained=False, **kwargs) -> ConvNeXt: function convnext_nano_ols (line 1236) | def convnext_nano_ols(pretrained=False, **kwargs) -> ConvNeXt: function convnext_tiny_hnf (line 1244) | def convnext_tiny_hnf(pretrained=False, **kwargs) -> ConvNeXt: function convnext_tiny (line 1252) | def convnext_tiny(pretrained=False, **kwargs) -> ConvNeXt: function convnext_small (line 1259) | def convnext_small(pretrained=False, **kwargs) -> ConvNeXt: function convnext_base (line 1266) | def convnext_base(pretrained=False, **kwargs) -> ConvNeXt: function convnext_large (line 1273) | def convnext_large(pretrained=False, **kwargs) -> ConvNeXt: function convnext_large_mlp (line 1280) | def convnext_large_mlp(pretrained=False, **kwargs) -> ConvNeXt: function convnext_xlarge (line 1287) | def convnext_xlarge(pretrained=False, **kwargs) -> ConvNeXt: function convnext_xxlarge (line 1294) | def convnext_xxlarge(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_atto (line 1301) | def convnextv2_atto(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_femto (line 1310) | def convnextv2_femto(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_pico (line 1319) | def convnextv2_pico(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_nano (line 1328) | def convnextv2_nano(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_tiny (line 1337) | def convnextv2_tiny(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_small (line 1344) | def convnextv2_small(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_base (line 1351) | def convnextv2_base(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_large (line 1358) | def convnextv2_large(pretrained=False, **kwargs) -> ConvNeXt: function convnextv2_huge (line 1365) | def convnextv2_huge(pretrained=False, **kwargs) -> ConvNeXt: function test_convnext (line 1372) | def test_convnext(pretrained=False, **kwargs) -> ConvNeXt: function test_convnext2 (line 1379) | def test_convnext2(pretrained=False, **kwargs) -> ConvNeXt: function test_convnext3 (line 1386) | def test_convnext3(pretrained=False, **kwargs) -> ConvNeXt: FILE: timm/models/crossvit.py class PatchEmbed (line 39) | class PatchEmbed(nn.Module): method __init__ (line 43) | def __init__( method forward (line 81) | def forward(self, x): class CrossAttention (line 92) | class CrossAttention(nn.Module): method __init__ (line 93) | def __init__( method forward (line 117) | def forward(self, x): class CrossAttentionBlock (line 136) | class CrossAttentionBlock(nn.Module): method __init__ (line 138) | def __init__( method forward (line 166) | def forward(self, x): class MultiScaleBlock (line 171) | class MultiScaleBlock(nn.Module): method __init__ (line 173) | def __init__( method forward (line 265) | def forward(self, x: List[torch.Tensor]) -> List[torch.Tensor]: function _compute_num_patches (line 287) | def _compute_num_patches(img_size, patches): function scale_image (line 292) | def scale_image(x, ss: Tuple[int, int], crop_scale: bool = False): # an... class CrossVit (line 312) | class CrossVit(nn.Module): method __init__ (line 316) | def __init__( method _init_weights (line 410) | def _init_weights(self, m): method no_weight_decay (line 420) | def no_weight_decay(self): method group_matcher (line 430) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 437) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 441) | def get_classifier(self) -> nn.Module: method reset_classifier (line 444) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 457) | def forward_features(self, x) -> List[torch.Tensor]: method forward_head (line 480) | def forward_head(self, xs: List[torch.Tensor], pre_logits: bool = Fals... method forward (line 487) | def forward(self, x): function _create_crossvit (line 493) | def _create_crossvit(variant, pretrained=False, **kwargs): function _cfg (line 516) | def _cfg(url='', **kwargs): function crossvit_tiny_240 (line 559) | def crossvit_tiny_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_small_240 (line 568) | def crossvit_small_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_base_240 (line 577) | def crossvit_base_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_9_240 (line 586) | def crossvit_9_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_15_240 (line 595) | def crossvit_15_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_18_240 (line 604) | def crossvit_18_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_9_dagger_240 (line 613) | def crossvit_9_dagger_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_15_dagger_240 (line 622) | def crossvit_15_dagger_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_15_dagger_408 (line 631) | def crossvit_15_dagger_408(pretrained=False, **kwargs) -> CrossVit: function crossvit_18_dagger_240 (line 640) | def crossvit_18_dagger_240(pretrained=False, **kwargs) -> CrossVit: function crossvit_18_dagger_408 (line 649) | def crossvit_18_dagger_408(pretrained=False, **kwargs) -> CrossVit: FILE: timm/models/csatv2.py function _zigzag_permutation (line 88) | def _zigzag_permutation(rows: int, cols: int) -> List[int]: function _dct_kernel_type_2 (line 105) | def _dct_kernel_type_2( function _dct_kernel_type_3 (line 131) | def _dct_kernel_type_3( class Dct1d (line 141) | class Dct1d(nn.Module): method __init__ (line 144) | def __init__( method forward (line 159) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Dct2d (line 163) | class Dct2d(nn.Module): method __init__ (line 166) | def __init__( method forward (line 178) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _split_out_chs (line 182) | def _split_out_chs(out_chs: int, ratio=(24, 4, 4)): class LearnableDct2d (line 199) | class LearnableDct2d(nn.Module): method __init__ (line 202) | def __init__( method reset_parameters (line 232) | def reset_parameters(self) -> None: method _init_buffers (line 236) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 243) | def init_non_persistent_buffers(self) -> None: method _denormalize (line 247) | def _denormalize(self, x: torch.Tensor) -> torch.Tensor: method _rgb_to_ycbcr (line 251) | def _rgb_to_ycbcr(self, x: torch.Tensor) -> torch.Tensor: method _frequency_normalize (line 259) | def _frequency_normalize(self, x: torch.Tensor) -> torch.Tensor: method forward (line 264) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Dct2dStats (line 283) | class Dct2dStats(nn.Module): method __init__ (line 286) | def __init__( method forward (line 300) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: class Block (line 318) | class Block(nn.Module): method __init__ (line 321) | def __init__( method forward (line 341) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SpatialTransformerBlock (line 360) | class SpatialTransformerBlock(nn.Module): method __init__ (line 367) | def __init__( method forward (line 383) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SpatialAttention (line 411) | class SpatialAttention(nn.Module): method __init__ (line 414) | def __init__( method forward (line 425) | def forward(self, x: torch.Tensor) -> torch.Tensor: class TransformerBlock (line 435) | class TransformerBlock(nn.Module): method __init__ (line 438) | def __init__( method forward (line 485) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PosConv (line 517) | class PosConv(nn.Module): method __init__ (line 520) | def __init__( method forward (line 530) | def forward(self, x: torch.Tensor, size: Tuple[int, int]) -> torch.Ten... class CSATv2 (line 538) | class CSATv2(nn.Module): method __init__ (line 545) | def __init__( method init_weights (line 615) | def init_weights(self, needs_reset: bool = True): method _init_weights (line 618) | def _init_weights(self, m: nn.Module, needs_reset: bool = True) -> None: method get_classifier (line 627) | def get_classifier(self) -> nn.Module: method reset_classifier (line 630) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_grad_checkpointing (line 637) | def set_grad_checkpointing(self, enable: bool = True) -> None: method forward_features (line 640) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_intermediates (line 648) | def forward_intermediates( method prune_intermediate_layers (line 698) | def prune_intermediate_layers( method forward_head (line 726) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 729) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _cfg (line 734) | def _cfg(url='', **kwargs): function checkpoint_filter_fn (line 762) | def checkpoint_filter_fn(state_dict: dict, model: nn.Module) -> dict: function _create_csatv2 (line 844) | def _create_csatv2(variant: str, pretrained: bool = False, **kwargs) -> ... function csatv2 (line 858) | def csatv2(pretrained: bool = False, **kwargs) -> CSATv2: function csatv2_21m (line 863) | def csatv2_21m(pretrained: bool = False, **kwargs) -> CSATv2: FILE: timm/models/cspnet.py class CspStemCfg (line 32) | class CspStemCfg: function _pad_arg (line 40) | def _pad_arg(x, n): class CspStagesCfg (line 52) | class CspStagesCfg: method __post_init__ (line 70) | def __post_init__(self): class CspModelCfg (line 89) | class CspModelCfg: function _cs3_cfg (line 98) | def _cs3_cfg( class BottleneckBlock (line 135) | class BottleneckBlock(nn.Module): method __init__ (line 139) | def __init__( method zero_init_last (line 179) | def zero_init_last(self): method forward (line 182) | def forward(self, x): class DarkBlock (line 196) | class DarkBlock(nn.Module): method __init__ (line 200) | def __init__( method zero_init_last (line 234) | def zero_init_last(self): method forward (line 237) | def forward(self, x): class EdgeBlock (line 246) | class EdgeBlock(nn.Module): method __init__ (line 250) | def __init__( method zero_init_last (line 284) | def zero_init_last(self): method forward (line 287) | def forward(self, x): class CrossStage (line 296) | class CrossStage(nn.Module): method __init__ (line 298) | def __init__( method forward (line 382) | def forward(self, x): class CrossStage3 (line 392) | class CrossStage3(nn.Module): method __init__ (line 396) | def __init__( method forward (line 477) | def forward(self, x): class DarkStage (line 486) | class DarkStage(nn.Module): method __init__ (line 489) | def __init__( method forward (line 547) | def forward(self, x): function create_csp_stem (line 553) | def create_csp_stem( function _get_stage_fn (line 611) | def _get_stage_fn(stage_args): function _get_block_fn (line 626) | def _get_block_fn(stage_args): function _get_attn_fn (line 637) | def _get_attn_fn(stage_args): function create_csp_stages (line 647) | def create_csp_stages( class CspNet (line 704) | class CspNet(nn.Module): method __init__ (line 714) | def __init__( method group_matcher (line 783) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 795) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 799) | def get_classifier(self) -> nn.Module: method reset_classifier (line 802) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 806) | def forward_features(self, x): method forward_head (line 811) | def forward_head(self, x, pre_logits: bool = False): method forward (line 814) | def forward(self, x): function _init_weights (line 820) | def _init_weights(module, name, zero_init_last=False): function _create_cspnet (line 994) | def _create_cspnet(variant, pretrained=False, **kwargs): function _cfg (line 1008) | def _cfg(url='', **kwargs): function cspresnet50 (line 1097) | def cspresnet50(pretrained=False, **kwargs) -> CspNet: function cspresnet50d (line 1102) | def cspresnet50d(pretrained=False, **kwargs) -> CspNet: function cspresnet50w (line 1107) | def cspresnet50w(pretrained=False, **kwargs) -> CspNet: function cspresnext50 (line 1112) | def cspresnext50(pretrained=False, **kwargs) -> CspNet: function cspdarknet53 (line 1117) | def cspdarknet53(pretrained=False, **kwargs) -> CspNet: function darknet17 (line 1122) | def darknet17(pretrained=False, **kwargs) -> CspNet: function darknet21 (line 1127) | def darknet21(pretrained=False, **kwargs) -> CspNet: function sedarknet21 (line 1132) | def sedarknet21(pretrained=False, **kwargs) -> CspNet: function darknet53 (line 1137) | def darknet53(pretrained=False, **kwargs) -> CspNet: function darknetaa53 (line 1142) | def darknetaa53(pretrained=False, **kwargs) -> CspNet: function cs3darknet_s (line 1147) | def cs3darknet_s(pretrained=False, **kwargs) -> CspNet: function cs3darknet_m (line 1152) | def cs3darknet_m(pretrained=False, **kwargs) -> CspNet: function cs3darknet_l (line 1157) | def cs3darknet_l(pretrained=False, **kwargs) -> CspNet: function cs3darknet_x (line 1162) | def cs3darknet_x(pretrained=False, **kwargs) -> CspNet: function cs3darknet_focus_s (line 1167) | def cs3darknet_focus_s(pretrained=False, **kwargs) -> CspNet: function cs3darknet_focus_m (line 1172) | def cs3darknet_focus_m(pretrained=False, **kwargs) -> CspNet: function cs3darknet_focus_l (line 1177) | def cs3darknet_focus_l(pretrained=False, **kwargs) -> CspNet: function cs3darknet_focus_x (line 1182) | def cs3darknet_focus_x(pretrained=False, **kwargs) -> CspNet: function cs3sedarknet_l (line 1187) | def cs3sedarknet_l(pretrained=False, **kwargs) -> CspNet: function cs3sedarknet_x (line 1192) | def cs3sedarknet_x(pretrained=False, **kwargs) -> CspNet: function cs3sedarknet_xdw (line 1197) | def cs3sedarknet_xdw(pretrained=False, **kwargs) -> CspNet: function cs3edgenet_x (line 1202) | def cs3edgenet_x(pretrained=False, **kwargs) -> CspNet: function cs3se_edgenet_x (line 1207) | def cs3se_edgenet_x(pretrained=False, **kwargs) -> CspNet: FILE: timm/models/davit.py class ConvPosEnc (line 34) | class ConvPosEnc(nn.Module): method __init__ (line 35) | def __init__( method forward (line 57) | def forward(self, x: Tensor): class Stem (line 63) | class Stem(nn.Module): method __init__ (line 68) | def __init__( method forward (line 94) | def forward(self, x: Tensor): class Downsample (line 104) | class Downsample(nn.Module): method __init__ (line 105) | def __init__( method forward (line 130) | def forward(self, x: Tensor): class ChannelAttentionV2 (line 142) | class ChannelAttentionV2(nn.Module): method __init__ (line 144) | def __init__( method forward (line 162) | def forward(self, x): class ChannelAttention (line 182) | class ChannelAttention(nn.Module): method __init__ (line 184) | def __init__( method forward (line 201) | def forward(self, x: Tensor): class ChannelBlock (line 216) | class ChannelBlock(nn.Module): method __init__ (line 218) | def __init__( method forward (line 263) | def forward(self, x: Tensor): function window_partition (line 282) | def window_partition(x: Tensor, window_size: Tuple[int, int]): function window_reverse (line 297) | def window_reverse(windows: Tensor, window_size: Tuple[int, int], H: int... class WindowAttention (line 313) | class WindowAttention(nn.Module): method __init__ (line 324) | def __init__( method forward (line 347) | def forward(self, x: Tensor): class SpatialBlock (line 366) | class SpatialBlock(nn.Module): method __init__ (line 379) | def __init__( method forward (line 429) | def forward(self, x: Tensor): class DaVitStage (line 469) | class DaVitStage(nn.Module): method __init__ (line 470) | def __init__( method set_grad_checkpointing (line 548) | def set_grad_checkpointing(self, enable=True): method forward (line 551) | def forward(self, x: Tensor): class DaVit (line 560) | class DaVit(nn.Module): method __init__ (line 578) | def __init__( method _init_weights (line 674) | def _init_weights(self, m): method group_matcher (line 681) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 692) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 698) | def get_classifier(self) -> nn.Module: method reset_classifier (line 701) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 705) | def forward_intermediates( method prune_intermediate_layers (line 758) | def prune_intermediate_layers( method forward_features (line 774) | def forward_features(self, x): method forward_head (line 783) | def forward_head(self, x, pre_logits: bool = False): method forward (line 786) | def forward(self, x): function _convert_florence2 (line 792) | def _convert_florence2(state_dict, model, prefix='vision_tower.'): function checkpoint_filter_fn (line 820) | def checkpoint_filter_fn(state_dict, model): function _create_davit (line 846) | def _create_davit(variant, pretrained=False, **kwargs): function _cfg (line 867) | def _cfg(url='', **kwargs): function davit_tiny (line 901) | def davit_tiny(pretrained=False, **kwargs) -> DaVit: function davit_small (line 907) | def davit_small(pretrained=False, **kwargs) -> DaVit: function davit_base (line 913) | def davit_base(pretrained=False, **kwargs) -> DaVit: function davit_large (line 919) | def davit_large(pretrained=False, **kwargs) -> DaVit: function davit_huge (line 925) | def davit_huge(pretrained=False, **kwargs) -> DaVit: function davit_giant (line 931) | def davit_giant(pretrained=False, **kwargs) -> DaVit: function davit_base_fl (line 938) | def davit_base_fl(pretrained=False, **kwargs) -> DaVit: function davit_huge_fl (line 947) | def davit_huge_fl(pretrained=False, **kwargs) -> DaVit: FILE: timm/models/deit.py class VisionTransformerDistilled (line 28) | class VisionTransformerDistilled(VisionTransformer): method __init__ (line 35) | def __init__(self, *args, **kwargs): method init_weights (line 53) | def init_weights(self, mode='', needs_reset=True): method group_matcher (line 59) | def group_matcher(self, coarse=False): method get_classifier (line 68) | def get_classifier(self) -> nn.Module: method reset_classifier (line 71) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_distilled_training (line 77) | def set_distilled_training(self, enable=True): method _pos_embed (line 80) | def _pos_embed(self, x): method forward_head (line 113) | def forward_head(self, x, pre_logits: bool = False) -> torch.Tensor: function _create_deit (line 127) | def _create_deit(variant, pretrained=False, distilled=False, **kwargs): function _cfg (line 141) | def _cfg(url='', **kwargs): function deit_tiny_patch16_224 (line 251) | def deit_tiny_patch16_224(pretrained=False, **kwargs) -> VisionTransformer: function deit_small_patch16_224 (line 261) | def deit_small_patch16_224(pretrained=False, **kwargs) -> VisionTransfor... function deit_base_patch16_224 (line 271) | def deit_base_patch16_224(pretrained=False, **kwargs) -> VisionTransformer: function deit_base_patch16_384 (line 281) | def deit_base_patch16_384(pretrained=False, **kwargs) -> VisionTransformer: function deit_tiny_distilled_patch16_224 (line 291) | def deit_tiny_distilled_patch16_224(pretrained=False, **kwargs) -> Visio... function deit_small_distilled_patch16_224 (line 302) | def deit_small_distilled_patch16_224(pretrained=False, **kwargs) -> Visi... function deit_base_distilled_patch16_224 (line 313) | def deit_base_distilled_patch16_224(pretrained=False, **kwargs) -> Visio... function deit_base_distilled_patch16_384 (line 324) | def deit_base_distilled_patch16_384(pretrained=False, **kwargs) -> Visio... function deit3_small_patch16_224 (line 335) | def deit3_small_patch16_224(pretrained=False, **kwargs) -> VisionTransfo... function deit3_small_patch16_384 (line 345) | def deit3_small_patch16_384(pretrained=False, **kwargs) -> VisionTransfo... function deit3_medium_patch16_224 (line 355) | def deit3_medium_patch16_224(pretrained=False, **kwargs) -> VisionTransf... function deit3_base_patch16_224 (line 365) | def deit3_base_patch16_224(pretrained=False, **kwargs) -> VisionTransfor... function deit3_base_patch16_384 (line 375) | def deit3_base_patch16_384(pretrained=False, **kwargs) -> VisionTransfor... function deit3_large_patch16_224 (line 385) | def deit3_large_patch16_224(pretrained=False, **kwargs) -> VisionTransfo... function deit3_large_patch16_384 (line 395) | def deit3_large_patch16_384(pretrained=False, **kwargs) -> VisionTransfo... function deit3_huge_patch14_224 (line 405) | def deit3_huge_patch14_224(pretrained=False, **kwargs) -> VisionTransfor... FILE: timm/models/densenet.py class DenseLayer (line 23) | class DenseLayer(nn.Module): method __init__ (line 29) | def __init__( method bottleneck_fn (line 61) | def bottleneck_fn(self, xs: List[torch.Tensor]) -> torch.Tensor: method any_requires_grad (line 68) | def any_requires_grad(self, x: List[torch.Tensor]) -> bool: method call_checkpoint_bottleneck (line 75) | def call_checkpoint_bottleneck(self, x: List[torch.Tensor]) -> torch.T... method forward (line 84) | def forward(self, x: Union[torch.Tensor, List[torch.Tensor]]) -> torch... class DenseBlock (line 111) | class DenseBlock(nn.ModuleDict): method __init__ (line 118) | def __init__( method forward (line 155) | def forward(self, init_features: torch.Tensor) -> torch.Tensor: class DenseTransition (line 171) | class DenseTransition(nn.Sequential): method __init__ (line 177) | def __init__( class DenseNet (line 205) | class DenseNet(nn.Module): method __init__ (line 222) | def __init__( method group_matcher (line 357) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 369) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 376) | def get_classifier(self) -> nn.Module: method reset_classifier (line 380) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg')... method forward_features (line 391) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 395) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 409) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _filter_torchvision_pretrained (line 423) | def _filter_torchvision_pretrained(state_dict: dict) -> Dict[str, torch.... function _create_densenet (line 444) | def _create_densenet( function _cfg (line 475) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function densenet121 (line 502) | def densenet121(pretrained=False, **kwargs) -> DenseNet: function densenetblur121d (line 512) | def densenetblur121d(pretrained=False, **kwargs) -> DenseNet: function densenet169 (line 522) | def densenet169(pretrained=False, **kwargs) -> DenseNet: function densenet201 (line 532) | def densenet201(pretrained=False, **kwargs) -> DenseNet: function densenet161 (line 542) | def densenet161(pretrained=False, **kwargs) -> DenseNet: function densenet264d (line 552) | def densenet264d(pretrained=False, **kwargs) -> DenseNet: FILE: timm/models/dla.py class DlaBasic (line 22) | class DlaBasic(nn.Module): method __init__ (line 25) | def __init__( method forward (line 62) | def forward(self, x, shortcut: Optional[torch.Tensor] = None, children... class DlaBottleneck (line 79) | class DlaBottleneck(nn.Module): method __init__ (line 83) | def __init__( method forward (line 118) | def forward(self, x, shortcut: Optional[torch.Tensor] = None, children... class DlaBottle2neck (line 139) | class DlaBottle2neck(nn.Module): method __init__ (line 145) | def __init__( method forward (line 192) | def forward(self, x, shortcut: Optional[torch.Tensor] = None, children... class DlaRoot (line 228) | class DlaRoot(nn.Module): method __init__ (line 229) | def __init__( method forward (line 253) | def forward(self, x_children: List[torch.Tensor]): class DlaTree (line 263) | class DlaTree(nn.Module): method __init__ (line 264) | def __init__( method forward (line 325) | def forward(self, x, shortcut: Optional[torch.Tensor] = None, children... class DLA (line 342) | class DLA(nn.Module): method __init__ (line 343) | def __init__( method _make_conv_level (line 408) | def _make_conv_level(self, inplanes: int, planes: int, convs: int, str... method group_matcher (line 429) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 442) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 446) | def get_classifier(self) -> nn.Module: method reset_classifier (line 449) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 455) | def forward_features(self, x): method forward_head (line 465) | def forward_head(self, x, pre_logits: bool = False): method forward (line 473) | def forward(self, x): function _create_dla (line 479) | def _create_dla(variant, pretrained=False, **kwargs): function _cfg (line 490) | def _cfg(url='', **kwargs): function dla60_res2net (line 518) | def dla60_res2net(pretrained=False, **kwargs) -> DLA: function dla60_res2next (line 526) | def dla60_res2next(pretrained=False,**kwargs): function dla34 (line 534) | def dla34(pretrained=False, **kwargs) -> DLA: # DLA-34 function dla46_c (line 541) | def dla46_c(pretrained=False, **kwargs) -> DLA: # DLA-46-C function dla46x_c (line 548) | def dla46x_c(pretrained=False, **kwargs) -> DLA: # DLA-X-46-C function dla60x_c (line 556) | def dla60x_c(pretrained=False, **kwargs) -> DLA: # DLA-X-60-C function dla60 (line 564) | def dla60(pretrained=False, **kwargs) -> DLA: # DLA-60 function dla60x (line 572) | def dla60x(pretrained=False, **kwargs) -> DLA: # DLA-X-60 function dla102 (line 580) | def dla102(pretrained=False, **kwargs) -> DLA: # DLA-102 function dla102x (line 588) | def dla102x(pretrained=False, **kwargs) -> DLA: # DLA-X-102 function dla102x2 (line 596) | def dla102x2(pretrained=False, **kwargs) -> DLA: # DLA-X-102 64 function dla169 (line 604) | def dla169(pretrained=False, **kwargs) -> DLA: # DLA-169 FILE: timm/models/dpn.py class CatBnAct (line 25) | class CatBnAct(nn.Module): method __init__ (line 26) | def __init__( method forward (line 37) | def forward(self, x): class BnActConv2d (line 43) | class BnActConv2d(nn.Module): method __init__ (line 44) | def __init__( method forward (line 60) | def forward(self, x): class DualPathBlock (line 64) | class DualPathBlock(nn.Module): method __init__ (line 65) | def __init__( method forward (line 117) | def forward(self, x) -> Tuple[torch.Tensor, torch.Tensor]: class DPN (line 151) | class DPN(nn.Module): method __init__ (line 152) | def __init__( method group_matcher (line 257) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 268) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 272) | def get_classifier(self) -> nn.Module: method reset_classifier (line 275) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 281) | def forward_features(self, x): method forward_head (line 284) | def forward_head(self, x, pre_logits: bool = False): method forward (line 293) | def forward(self, x): function _create_dpn (line 299) | def _create_dpn(variant, pretrained=False, **kwargs): function _cfg (line 309) | def _cfg(url='', **kwargs): function dpn48b (line 335) | def dpn48b(pretrained=False, **kwargs) -> DPN: function dpn68 (line 343) | def dpn68(pretrained=False, **kwargs) -> DPN: function dpn68b (line 351) | def dpn68b(pretrained=False, **kwargs) -> DPN: function dpn92 (line 359) | def dpn92(pretrained=False, **kwargs) -> DPN: function dpn98 (line 367) | def dpn98(pretrained=False, **kwargs) -> DPN: function dpn131 (line 375) | def dpn131(pretrained=False, **kwargs) -> DPN: function dpn107 (line 383) | def dpn107(pretrained=False, **kwargs) -> DPN: FILE: timm/models/edgenext.py class PositionalEncodingFourier (line 40) | class PositionalEncodingFourier(nn.Module): method __init__ (line 41) | def __init__( method forward (line 57) | def forward(self, shape: Tuple[int, int, int]): class ConvBlock (line 84) | class ConvBlock(nn.Module): method __init__ (line 85) | def __init__( method forward (line 124) | def forward(self, x): class CrossCovarianceAttn (line 141) | class CrossCovarianceAttn(nn.Module): method __init__ (line 142) | def __init__( method forward (line 162) | def forward(self, x): method no_weight_decay (line 179) | def no_weight_decay(self): class SplitTransposeBlock (line 183) | class SplitTransposeBlock(nn.Module): method __init__ (line 184) | def __init__( method forward (line 237) | def forward(self, x): class EdgeNeXtStage (line 273) | class EdgeNeXtStage(nn.Module): method __init__ (line 274) | def __init__( method forward (line 346) | def forward(self, x): class EdgeNeXt (line 355) | class EdgeNeXt(nn.Module): method __init__ (line 356) | def __init__( method group_matcher (line 461) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 472) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 477) | def get_classifier(self) -> nn.Module: method reset_classifier (line 480) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 484) | def forward_intermediates( method prune_intermediate_layers (line 534) | def prune_intermediate_layers( method forward_features (line 550) | def forward_features(self, x): method forward_head (line 556) | def forward_head(self, x, pre_logits: bool = False): method forward (line 559) | def forward(self, x): function _init_weights (line 565) | def _init_weights(module, name=None, head_init_scale=1.0): function checkpoint_filter_fn (line 578) | def checkpoint_filter_fn(state_dict, model): function _create_edgenext (line 609) | def _create_edgenext(variant, pretrained=False, **kwargs): function _cfg (line 618) | def _cfg(url='', **kwargs): function edgenext_xx_small (line 657) | def edgenext_xx_small(pretrained=False, **kwargs) -> EdgeNeXt: function edgenext_x_small (line 668) | def edgenext_x_small(pretrained=False, **kwargs) -> EdgeNeXt: function edgenext_small (line 679) | def edgenext_small(pretrained=False, **kwargs) -> EdgeNeXt: function edgenext_base (line 690) | def edgenext_base(pretrained=False, **kwargs) -> EdgeNeXt: function edgenext_small_rw (line 701) | def edgenext_small_rw(pretrained=False, **kwargs) -> EdgeNeXt: FILE: timm/models/efficientformer.py class Attention (line 52) | class Attention(torch.nn.Module): method __init__ (line 55) | def __init__( method train (line 90) | def train(self, mode=True): method get_attention_biases (line 95) | def get_attention_biases(self, device: torch.device) -> torch.Tensor: method forward (line 104) | def forward(self, x): # x (B,N,C) class Stem4 (line 119) | class Stem4(nn.Sequential): method __init__ (line 120) | def __init__( class Downsample (line 141) | class Downsample(nn.Module): method __init__ (line 148) | def __init__( method forward (line 166) | def forward(self, x): class Flat (line 172) | class Flat(nn.Module): method __init__ (line 174) | def __init__(self, ): method forward (line 177) | def forward(self, x): class Pooling (line 182) | class Pooling(nn.Module): method __init__ (line 188) | def __init__(self, pool_size: int = 3): method forward (line 192) | def forward(self, x): class ConvMlpWithNorm (line 196) | class ConvMlpWithNorm(nn.Module): method __init__ (line 202) | def __init__( method forward (line 224) | def forward(self, x): class MetaBlock1d (line 235) | class MetaBlock1d(nn.Module): method __init__ (line 237) | def __init__( method forward (line 267) | def forward(self, x): class MetaBlock2d (line 273) | class MetaBlock2d(nn.Module): method __init__ (line 275) | def __init__( method forward (line 305) | def forward(self, x): class EfficientFormerStage (line 311) | class EfficientFormerStage(nn.Module): method __init__ (line 313) | def __init__( method forward (line 378) | def forward(self, x): class EfficientFormer (line 387) | class EfficientFormer(nn.Module): method __init__ (line 389) | def __init__( method _init_weights (line 461) | def _init_weights(self, m): method no_weight_decay (line 468) | def no_weight_decay(self): method group_matcher (line 472) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 480) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 485) | def get_classifier(self) -> nn.Module: method reset_classifier (line 488) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_distilled_training (line 496) | def set_distilled_training(self, enable=True): method forward_intermediates (line 499) | def forward_intermediates( method prune_intermediate_layers (line 553) | def prune_intermediate_layers( method forward_features (line 569) | def forward_features(self, x): method forward_head (line 575) | def forward_head(self, x, pre_logits: bool = False): method forward (line 589) | def forward(self, x): function checkpoint_filter_fn (line 595) | def checkpoint_filter_fn(state_dict, model): function _cfg (line 622) | def _cfg(url='', **kwargs): function _create_efficientformer (line 647) | def _create_efficientformer(variant, pretrained=False, **kwargs): function efficientformer_l1 (line 659) | def efficientformer_l1(pretrained=False, **kwargs) -> EfficientFormer: function efficientformer_l3 (line 669) | def efficientformer_l3(pretrained=False, **kwargs) -> EfficientFormer: function efficientformer_l7 (line 679) | def efficientformer_l7(pretrained=False, **kwargs) -> EfficientFormer: FILE: timm/models/efficientformer_v2.py class ConvNorm (line 69) | class ConvNorm(nn.Module): method __init__ (line 70) | def __init__( method forward (line 101) | def forward(self, x): class Attention2d (line 107) | class Attention2d(torch.nn.Module): method __init__ (line 110) | def __init__( method train (line 166) | def train(self, mode=True): method reset_parameters (line 171) | def reset_parameters(self) -> None: method _compute_attention_bias_idxs (line 176) | def _compute_attention_bias_idxs(self, device=None): method _init_buffers (line 186) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 193) | def init_non_persistent_buffers(self) -> None: method get_attention_biases (line 197) | def get_attention_biases(self, device: torch.device) -> torch.Tensor: method forward (line 206) | def forward(self, x): class LocalGlobalQuery (line 233) | class LocalGlobalQuery(torch.nn.Module): method __init__ (line 234) | def __init__( method forward (line 247) | def forward(self, x): class Attention2dDownsample (line 255) | class Attention2dDownsample(torch.nn.Module): method __init__ (line 258) | def __init__( method train (line 307) | def train(self, mode=True): method reset_parameters (line 312) | def reset_parameters(self) -> None: method _compute_attention_bias_idxs (line 317) | def _compute_attention_bias_idxs(self, device=None): method _init_buffers (line 331) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 338) | def init_non_persistent_buffers(self) -> None: method get_attention_biases (line 342) | def get_attention_biases(self, device: torch.device) -> torch.Tensor: method forward (line 351) | def forward(self, x): class Downsample (line 371) | class Downsample(nn.Module): method __init__ (line 372) | def __init__( method forward (line 414) | def forward(self, x): class ConvMlpWithNorm (line 421) | class ConvMlpWithNorm(nn.Module): method __init__ (line 427) | def __init__( method forward (line 469) | def forward(self, x): class EfficientFormerV2Block (line 478) | class EfficientFormerV2Block(nn.Module): method __init__ (line 479) | def __init__( method forward (line 526) | def forward(self, x): class Stem4 (line 533) | class Stem4(nn.Sequential): method __init__ (line 534) | def __init__( class EfficientFormerV2Stage (line 569) | class EfficientFormerV2Stage(nn.Module): method __init__ (line 571) | def __init__( method forward (line 632) | def forward(self, x): class EfficientFormerV2 (line 641) | class EfficientFormerV2(nn.Module): method __init__ (line 642) | def __init__( method _init_weights (line 727) | def _init_weights(self, m, needs_reset: bool = True): method init_weights (line 735) | def init_weights(self, needs_reset: bool = True): method no_weight_decay (line 739) | def no_weight_decay(self): method group_matcher (line 743) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 751) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 756) | def get_classifier(self) -> nn.Module: method reset_classifier (line 759) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_distilled_training (line 767) | def set_distilled_training(self, enable=True): method forward_intermediates (line 770) | def forward_intermediates( method prune_intermediate_layers (line 821) | def prune_intermediate_layers( method forward_features (line 837) | def forward_features(self, x): method forward_head (line 843) | def forward_head(self, x, pre_logits: bool = False): method forward (line 857) | def forward(self, x): function _cfg (line 863) | def _cfg(url='', **kwargs): function _create_efficientformerv2 (line 891) | def _create_efficientformerv2(variant, pretrained=False, **kwargs): function efficientformerv2_s0 (line 901) | def efficientformerv2_s0(pretrained=False, **kwargs) -> EfficientFormerV2: function efficientformerv2_s1 (line 913) | def efficientformerv2_s1(pretrained=False, **kwargs) -> EfficientFormerV2: function efficientformerv2_s2 (line 925) | def efficientformerv2_s2(pretrained=False, **kwargs) -> EfficientFormerV2: function efficientformerv2_l (line 937) | def efficientformerv2_l(pretrained=False, **kwargs) -> EfficientFormerV2: FILE: timm/models/efficientnet.py class EfficientNet (line 59) | class EfficientNet(nn.Module): method __init__ (line 81) | def __init__( method as_sequential (line 177) | def as_sequential(self) -> nn.Sequential: method group_matcher (line 186) | def group_matcher(self, coarse: bool = False) -> Dict[str, Union[str, ... method set_grad_checkpointing (line 204) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 213) | def get_classifier(self) -> nn.Module: method reset_classifier (line 217) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg')... method forward_intermediates (line 228) | def forward_intermediates( method prune_intermediate_layers (line 288) | def prune_intermediate_layers( method forward_features (line 319) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 331) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 346) | def forward(self, x: torch.Tensor) -> torch.Tensor: class EfficientNetFeatures (line 353) | class EfficientNetFeatures(nn.Module): method __init__ (line 360) | def __init__( method set_grad_checkpointing (line 423) | def set_grad_checkpointing(self, enable: bool = True) -> None: method forward (line 431) | def forward(self, x) -> List[torch.Tensor]: function _create_effnet (line 452) | def _create_effnet(variant, pretrained=False, **kwargs): function _gen_mnasnet_a1 (line 479) | def _gen_mnasnet_a1(variant, channel_multiplier=1.0, pretrained=False, *... function _gen_mnasnet_b1 (line 515) | def _gen_mnasnet_b1(variant, channel_multiplier=1.0, pretrained=False, *... function _gen_mnasnet_small (line 551) | def _gen_mnasnet_small(variant, channel_multiplier=1.0, pretrained=False... function _gen_mobilenet_v1 (line 580) | def _gen_mobilenet_v1( function _gen_mobilenet_v2 (line 616) | def _gen_mobilenet_v2( function _gen_fbnetc (line 653) | def _gen_fbnetc(variant, channel_multiplier=1.0, pretrained=False, **kwa... function _gen_spnasnet (line 683) | def _gen_spnasnet(variant, channel_multiplier=1.0, pretrained=False, **k... function _gen_efficientnet (line 718) | def _gen_efficientnet( function _gen_efficientnet_edge (line 768) | def _gen_efficientnet_edge( function _gen_efficientnet_condconv (line 800) | def _gen_efficientnet_condconv( function _gen_efficientnet_lite (line 832) | def _gen_efficientnet_lite(variant, channel_multiplier=1.0, depth_multip... function _gen_efficientnetv2_base (line 873) | def _gen_efficientnetv2_base( function _gen_efficientnetv2_s (line 903) | def _gen_efficientnetv2_s( function _gen_efficientnetv2_m (line 943) | def _gen_efficientnetv2_m( function _gen_efficientnetv2_l (line 975) | def _gen_efficientnetv2_l( function _gen_efficientnetv2_xl (line 1007) | def _gen_efficientnetv2_xl( function _gen_efficientnet_x (line 1039) | def _gen_efficientnet_x( function _gen_mixnet_s (line 1122) | def _gen_mixnet_s(variant, channel_multiplier=1.0, pretrained=False, **k... function _gen_mixnet_m (line 1155) | def _gen_mixnet_m(variant, channel_multiplier=1.0, depth_multiplier=1.0,... function _gen_tinynet (line 1188) | def _gen_tinynet(variant, model_width=1.0, depth_multiplier=1.0, pretrai... function _gen_mobilenet_edgetpu (line 1211) | def _gen_mobilenet_edgetpu(variant, channel_multiplier=1.0, depth_multip... function _gen_test_efficientnet (line 1300) | def _gen_test_efficientnet(variant, channel_multiplier=1.0, depth_multip... function _cfg (line 1324) | def _cfg(url='', **kwargs): function mnasnet_050 (line 1923) | def mnasnet_050(pretrained=False, **kwargs) -> EfficientNet: function mnasnet_075 (line 1930) | def mnasnet_075(pretrained=False, **kwargs) -> EfficientNet: function mnasnet_100 (line 1937) | def mnasnet_100(pretrained=False, **kwargs) -> EfficientNet: function mnasnet_140 (line 1944) | def mnasnet_140(pretrained=False, **kwargs) -> EfficientNet: function semnasnet_050 (line 1951) | def semnasnet_050(pretrained=False, **kwargs) -> EfficientNet: function semnasnet_075 (line 1958) | def semnasnet_075(pretrained=False, **kwargs) -> EfficientNet: function semnasnet_100 (line 1965) | def semnasnet_100(pretrained=False, **kwargs) -> EfficientNet: function semnasnet_140 (line 1972) | def semnasnet_140(pretrained=False, **kwargs) -> EfficientNet: function mnasnet_small (line 1979) | def mnasnet_small(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv1_100 (line 1986) | def mobilenetv1_100(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv1_100h (line 1993) | def mobilenetv1_100h(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv1_125 (line 2000) | def mobilenetv1_125(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv2_035 (line 2007) | def mobilenetv2_035(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv2_050 (line 2014) | def mobilenetv2_050(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv2_075 (line 2021) | def mobilenetv2_075(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv2_100 (line 2028) | def mobilenetv2_100(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv2_140 (line 2035) | def mobilenetv2_140(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv2_110d (line 2042) | def mobilenetv2_110d(pretrained=False, **kwargs) -> EfficientNet: function mobilenetv2_120d (line 2050) | def mobilenetv2_120d(pretrained=False, **kwargs) -> EfficientNet: function fbnetc_100 (line 2058) | def fbnetc_100(pretrained=False, **kwargs) -> EfficientNet: function spnasnet_100 (line 2068) | def spnasnet_100(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b0 (line 2075) | def efficientnet_b0(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b1 (line 2084) | def efficientnet_b1(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b2 (line 2093) | def efficientnet_b2(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b3 (line 2102) | def efficientnet_b3(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b4 (line 2111) | def efficientnet_b4(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b5 (line 2120) | def efficientnet_b5(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b6 (line 2129) | def efficientnet_b6(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b7 (line 2138) | def efficientnet_b7(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b8 (line 2147) | def efficientnet_b8(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_l2 (line 2156) | def efficientnet_l2(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b0_gn (line 2166) | def efficientnet_b0_gn(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b0_g8_gn (line 2174) | def efficientnet_b0_g8_gn(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b0_g16_evos (line 2183) | def efficientnet_b0_g16_evos(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b3_gn (line 2192) | def efficientnet_b3_gn(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b3_g8_gn (line 2202) | def efficientnet_b3_g8_gn(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_blur_b0 (line 2212) | def efficientnet_blur_b0(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_es (line 2223) | def efficientnet_es(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_es_pruned (line 2231) | def efficientnet_es_pruned(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_em (line 2238) | def efficientnet_em(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_el (line 2246) | def efficientnet_el(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_el_pruned (line 2253) | def efficientnet_el_pruned(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_cc_b0_4e (line 2260) | def efficientnet_cc_b0_4e(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_cc_b0_8e (line 2269) | def efficientnet_cc_b0_8e(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_cc_b1_8e (line 2279) | def efficientnet_cc_b1_8e(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_lite0 (line 2289) | def efficientnet_lite0(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_lite1 (line 2298) | def efficientnet_lite1(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_lite2 (line 2307) | def efficientnet_lite2(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_lite3 (line 2316) | def efficientnet_lite3(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_lite4 (line 2325) | def efficientnet_lite4(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b1_pruned (line 2334) | def efficientnet_b1_pruned(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b2_pruned (line 2345) | def efficientnet_b2_pruned(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_b3_pruned (line 2356) | def efficientnet_b3_pruned(pretrained=False, **kwargs) -> EfficientNet: function efficientnetv2_rw_t (line 2367) | def efficientnetv2_rw_t(pretrained=False, **kwargs) -> EfficientNet: function gc_efficientnetv2_rw_t (line 2375) | def gc_efficientnetv2_rw_t(pretrained=False, **kwargs) -> EfficientNet: function efficientnetv2_rw_s (line 2384) | def efficientnetv2_rw_s(pretrained=False, **kwargs) -> EfficientNet: function efficientnetv2_rw_m (line 2394) | def efficientnetv2_rw_m(pretrained=False, **kwargs) -> EfficientNet: function efficientnetv2_s (line 2404) | def efficientnetv2_s(pretrained=False, **kwargs) -> EfficientNet: function efficientnetv2_m (line 2411) | def efficientnetv2_m(pretrained=False, **kwargs) -> EfficientNet: function efficientnetv2_l (line 2418) | def efficientnetv2_l(pretrained=False, **kwargs) -> EfficientNet: function efficientnetv2_xl (line 2425) | def efficientnetv2_xl(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b0 (line 2432) | def tf_efficientnet_b0(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b1 (line 2442) | def tf_efficientnet_b1(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b2 (line 2452) | def tf_efficientnet_b2(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b3 (line 2462) | def tf_efficientnet_b3(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b4 (line 2472) | def tf_efficientnet_b4(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b5 (line 2482) | def tf_efficientnet_b5(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b6 (line 2492) | def tf_efficientnet_b6(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b7 (line 2503) | def tf_efficientnet_b7(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_b8 (line 2514) | def tf_efficientnet_b8(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_l2 (line 2525) | def tf_efficientnet_l2(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_es (line 2536) | def tf_efficientnet_es(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_em (line 2546) | def tf_efficientnet_em(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_el (line 2556) | def tf_efficientnet_el(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_cc_b0_4e (line 2566) | def tf_efficientnet_cc_b0_4e(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_cc_b0_8e (line 2577) | def tf_efficientnet_cc_b0_8e(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_cc_b1_8e (line 2589) | def tf_efficientnet_cc_b1_8e(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_lite0 (line 2601) | def tf_efficientnet_lite0(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_lite1 (line 2612) | def tf_efficientnet_lite1(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_lite2 (line 2623) | def tf_efficientnet_lite2(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_lite3 (line 2634) | def tf_efficientnet_lite3(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnet_lite4 (line 2645) | def tf_efficientnet_lite4(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_s (line 2656) | def tf_efficientnetv2_s(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_m (line 2665) | def tf_efficientnetv2_m(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_l (line 2674) | def tf_efficientnetv2_l(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_xl (line 2683) | def tf_efficientnetv2_xl(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_b0 (line 2693) | def tf_efficientnetv2_b0(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_b1 (line 2702) | def tf_efficientnetv2_b1(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_b2 (line 2712) | def tf_efficientnetv2_b2(pretrained=False, **kwargs) -> EfficientNet: function tf_efficientnetv2_b3 (line 2722) | def tf_efficientnetv2_b3(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_x_b3 (line 2732) | def efficientnet_x_b3(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_x_b5 (line 2741) | def efficientnet_x_b5(pretrained=False, **kwargs) -> EfficientNet: function efficientnet_h_b5 (line 2749) | def efficientnet_h_b5(pretrained=False, **kwargs) -> EfficientNet: function mixnet_s (line 2757) | def mixnet_s(pretrained=False, **kwargs) -> EfficientNet: function mixnet_m (line 2766) | def mixnet_m(pretrained=False, **kwargs) -> EfficientNet: function mixnet_l (line 2775) | def mixnet_l(pretrained=False, **kwargs) -> EfficientNet: function mixnet_xl (line 2784) | def mixnet_xl(pretrained=False, **kwargs) -> EfficientNet: function mixnet_xxl (line 2794) | def mixnet_xxl(pretrained=False, **kwargs) -> EfficientNet: function tf_mixnet_s (line 2804) | def tf_mixnet_s(pretrained=False, **kwargs) -> EfficientNet: function tf_mixnet_m (line 2815) | def tf_mixnet_m(pretrained=False, **kwargs) -> EfficientNet: function tf_mixnet_l (line 2826) | def tf_mixnet_l(pretrained=False, **kwargs) -> EfficientNet: function tinynet_a (line 2837) | def tinynet_a(pretrained=False, **kwargs) -> EfficientNet: function tinynet_b (line 2843) | def tinynet_b(pretrained=False, **kwargs) -> EfficientNet: function tinynet_c (line 2849) | def tinynet_c(pretrained=False, **kwargs) -> EfficientNet: function tinynet_d (line 2855) | def tinynet_d(pretrained=False, **kwargs) -> EfficientNet: function tinynet_e (line 2861) | def tinynet_e(pretrained=False, **kwargs) -> EfficientNet: function mobilenet_edgetpu_100 (line 2867) | def mobilenet_edgetpu_100(pretrained=False, **kwargs) -> EfficientNet: function mobilenet_edgetpu_v2_xs (line 2874) | def mobilenet_edgetpu_v2_xs(pretrained=False, **kwargs) -> EfficientNet: function mobilenet_edgetpu_v2_s (line 2881) | def mobilenet_edgetpu_v2_s(pretrained=False, **kwargs) -> EfficientNet: function mobilenet_edgetpu_v2_m (line 2888) | def mobilenet_edgetpu_v2_m(pretrained=False, **kwargs) -> EfficientNet: function mobilenet_edgetpu_v2_l (line 2895) | def mobilenet_edgetpu_v2_l(pretrained=False, **kwargs) -> EfficientNet: function test_efficientnet (line 2902) | def test_efficientnet(pretrained=False, **kwargs) -> EfficientNet: function test_efficientnet_gn (line 2908) | def test_efficientnet_gn(pretrained=False, **kwargs) -> EfficientNet: function test_efficientnet_ln (line 2920) | def test_efficientnet_ln(pretrained=False, **kwargs) -> EfficientNet: function test_efficientnet_evos (line 2931) | def test_efficientnet_evos(pretrained=False, **kwargs) -> EfficientNet: FILE: timm/models/efficientvit_mit.py function val2list (line 26) | def val2list(x: list or tuple or any, repeat_time=1): function val2tuple (line 32) | def val2tuple(x: list or tuple or any, min_len: int = 1, idx_repeat: int... function get_same_padding (line 41) | def get_same_padding(kernel_size: int or tuple[int, ...]) -> int or tupl... class ConvNormAct (line 49) | class ConvNormAct(nn.Module): method __init__ (line 50) | def __init__( method forward (line 81) | def forward(self, x): class DSConv (line 89) | class DSConv(nn.Module): method __init__ (line 90) | def __init__( method forward (line 129) | def forward(self, x): class ConvBlock (line 135) | class ConvBlock(nn.Module): method __init__ (line 136) | def __init__( method forward (line 178) | def forward(self, x): class MBConv (line 184) | class MBConv(nn.Module): method __init__ (line 185) | def __init__( method forward (line 237) | def forward(self, x): class FusedMBConv (line 244) | class FusedMBConv(nn.Module): method __init__ (line 245) | def __init__( method forward (line 288) | def forward(self, x): class LiteMLA (line 294) | class LiteMLA(nn.Module): method __init__ (line 297) | def __init__( method _attn (line 359) | def _attn(self, q, k, v): method forward (line 367) | def forward(self, x): class EfficientVitBlock (line 399) | class EfficientVitBlock(nn.Module): method __init__ (line 400) | def __init__( method forward (line 437) | def forward(self, x): class ResidualBlock (line 443) | class ResidualBlock(nn.Module): method __init__ (line 444) | def __init__( method forward (line 455) | def forward(self, x): function build_local_block (line 462) | def build_local_block( class Stem (line 523) | class Stem(nn.Sequential): method __init__ (line 524) | def __init__( class EfficientVitStage (line 569) | class EfficientVitStage(nn.Module): method __init__ (line 570) | def __init__( method forward (line 631) | def forward(self, x): class EfficientVitLargeStage (line 635) | class EfficientVitLargeStage(nn.Module): method __init__ (line 636) | def __init__( method forward (line 700) | def forward(self, x): class ClassifierHead (line 704) | class ClassifierHead(nn.Module): method __init__ (line 705) | def __init__( method reset (line 734) | def reset(self, num_classes: int, pool_type: Optional[str] = None): method forward (line 743) | def forward(self, x, pre_logits: bool = False): class EfficientVit (line 757) | class EfficientVit(nn.Module): method __init__ (line 758) | def __init__( method group_matcher (line 817) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 828) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 832) | def get_classifier(self) -> nn.Module: method reset_classifier (line 835) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 839) | def forward_intermediates( method prune_intermediate_layers (line 885) | def prune_intermediate_layers( method forward_features (line 899) | def forward_features(self, x): method forward_head (line 907) | def forward_head(self, x, pre_logits: bool = False): method forward (line 910) | def forward(self, x): class EfficientVitLarge (line 916) | class EfficientVitLarge(nn.Module): method __init__ (line 917) | def __init__( method group_matcher (line 980) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 991) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 995) | def get_classifier(self) -> nn.Module: method reset_classifier (line 998) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 1002) | def forward_intermediates( method prune_intermediate_layers (line 1048) | def prune_intermediate_layers( method forward_features (line 1062) | def forward_features(self, x): method forward_head (line 1070) | def forward_head(self, x, pre_logits: bool = False): method forward (line 1073) | def forward(self, x): function _cfg (line 1079) | def _cfg(url='', **kwargs): function _create_efficientvit (line 1186) | def _create_efficientvit(variant, pretrained=False, **kwargs): function _create_efficientvit_large (line 1198) | def _create_efficientvit_large(variant, pretrained=False, **kwargs): function efficientvit_b0 (line 1211) | def efficientvit_b0(pretrained=False, **kwargs): function efficientvit_b1 (line 1218) | def efficientvit_b1(pretrained=False, **kwargs): function efficientvit_b2 (line 1225) | def efficientvit_b2(pretrained=False, **kwargs): function efficientvit_b3 (line 1232) | def efficientvit_b3(pretrained=False, **kwargs): function efficientvit_l1 (line 1239) | def efficientvit_l1(pretrained=False, **kwargs): function efficientvit_l2 (line 1246) | def efficientvit_l2(pretrained=False, **kwargs): function efficientvit_l3 (line 1253) | def efficientvit_l3(pretrained=False, **kwargs): FILE: timm/models/efficientvit_msra.py class ConvNorm (line 26) | class ConvNorm(torch.nn.Sequential): method __init__ (line 27) | def __init__( method fuse (line 47) | def fuse(self): class NormLinear (line 61) | class NormLinear(torch.nn.Sequential): method __init__ (line 62) | def __init__( method fuse (line 83) | def fuse(self): class PatchMerging (line 99) | class PatchMerging(torch.nn.Module): method __init__ (line 100) | def __init__( method forward (line 116) | def forward(self, x): class ResidualDrop (line 121) | class ResidualDrop(torch.nn.Module): method __init__ (line 122) | def __init__(self, m: nn.Module, drop: float = 0.): method forward (line 127) | def forward(self, x): class ConvMlp (line 135) | class ConvMlp(torch.nn.Module): method __init__ (line 136) | def __init__( method forward (line 149) | def forward(self, x): class CascadedGroupAttention (line 154) | class CascadedGroupAttention(torch.nn.Module): method __init__ (line 167) | def __init__( method reset_parameters (line 213) | def reset_parameters(self) -> None: method _init_buffers (line 218) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 231) | def init_non_persistent_buffers(self) -> None: method train (line 236) | def train(self, mode=True): method get_attention_biases (line 241) | def get_attention_biases(self, device: torch.device) -> torch.Tensor: method forward (line 250) | def forward(self, x): class LocalWindowAttention (line 274) | class LocalWindowAttention(torch.nn.Module): method __init__ (line 286) | def __init__( method forward (line 314) | def forward(self, x): class EfficientVitBlock (line 343) | class EfficientVitBlock(torch.nn.Module): method __init__ (line 355) | def __init__( method forward (line 387) | def forward(self, x): class EfficientVitStage (line 391) | class EfficientVitStage(torch.nn.Module): method __init__ (line 392) | def __init__( method forward (line 447) | def forward(self, x): class PatchEmbedding (line 453) | class PatchEmbedding(torch.nn.Sequential): method __init__ (line 454) | def __init__( class EfficientVitMsra (line 473) | class EfficientVitMsra(nn.Module): method __init__ (line 474) | def __init__( method init_weights (line 543) | def init_weights(self, needs_reset: bool = True): method _init_weights (line 546) | def _init_weights(self, m: nn.Module, needs_reset: bool = True) -> None: method no_weight_decay (line 551) | def no_weight_decay(self): method group_matcher (line 555) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 566) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 570) | def get_classifier(self) -> nn.Module: method reset_classifier (line 573) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 584) | def forward_intermediates( method prune_intermediate_layers (line 630) | def prune_intermediate_layers( method forward_features (line 644) | def forward_features(self, x): method forward_head (line 652) | def forward_head(self, x, pre_logits: bool = False): method forward (line 656) | def forward(self, x): function _cfg (line 696) | def _cfg(url='', **kwargs): function _create_efficientvit_msra (line 739) | def _create_efficientvit_msra(variant, pretrained=False, **kwargs): function efficientvit_m0 (line 752) | def efficientvit_m0(pretrained=False, **kwargs): function efficientvit_m1 (line 765) | def efficientvit_m1(pretrained=False, **kwargs): function efficientvit_m2 (line 778) | def efficientvit_m2(pretrained=False, **kwargs): function efficientvit_m3 (line 791) | def efficientvit_m3(pretrained=False, **kwargs): function efficientvit_m4 (line 804) | def efficientvit_m4(pretrained=False, **kwargs): function efficientvit_m5 (line 817) | def efficientvit_m5(pretrained=False, **kwargs): FILE: timm/models/eva.py class EvaAttention (line 105) | class EvaAttention(nn.Module): method __init__ (line 110) | def __init__( method reset_parameters (line 185) | def reset_parameters(self) -> None: method _init_buffers (line 192) | def _init_buffers(self) -> None: method forward (line 197) | def forward( method init_non_persistent_buffers (line 264) | def init_non_persistent_buffers(self) -> None: class EvaBlock (line 269) | class EvaBlock(nn.Module): method __init__ (line 271) | def __init__( method reset_parameters (line 379) | def reset_parameters(self) -> None: method forward (line 385) | def forward( class EvaBlockPostNorm (line 401) | class EvaBlockPostNorm(nn.Module): method __init__ (line 403) | def __init__( method forward (line 505) | def forward( class Eva (line 517) | class Eva(nn.Module): method __init__ (line 525) | def __init__( method init_weights (line 750) | def init_weights(self, needs_reset: bool = True): method fix_init_weight (line 767) | def fix_init_weight(self) -> None: method _init_weights (line 775) | def _init_weights(self, m: nn.Module, needs_reset: bool = True) -> None: method no_weight_decay (line 790) | def no_weight_decay(self) -> Set[str]: method set_grad_checkpointing (line 798) | def set_grad_checkpointing(self, enable: bool = True) -> None: method group_matcher (line 803) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method get_classifier (line 812) | def get_classifier(self) -> nn.Module: method reset_classifier (line 815) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_input_size (line 827) | def set_input_size( method _pos_embed (line 856) | def _pos_embed(self, x) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: method forward_intermediates (line 911) | def forward_intermediates( method prune_intermediate_layers (line 988) | def prune_intermediate_layers( method pool (line 1006) | def pool(self, x: torch.Tensor, pool_type: Optional[str] = None) -> to... method forward_features (line 1014) | def forward_features( method forward_head (line 1053) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 1068) | def forward( function _convert_pe (line 1089) | def _convert_pe( function checkpoint_filter_fn (line 1159) | def checkpoint_filter_fn( function _create_eva (line 1283) | def _create_eva(variant: str, pretrained: bool = False, **kwargs) -> Eva: function _cfg (line 1314) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _pe_cfg (line 1334) | def _pe_cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _dinov3_cfg (line 1354) | def _dinov3_cfg(url: str = '', **kwargs) -> Dict[str, Any]: function eva_giant_patch14_224 (line 1783) | def eva_giant_patch14_224(pretrained: bool = False, **kwargs) -> Eva: function eva_giant_patch14_336 (line 1791) | def eva_giant_patch14_336(pretrained: bool = False, **kwargs) -> Eva: function eva_giant_patch14_560 (line 1799) | def eva_giant_patch14_560(pretrained: bool = False, **kwargs) -> Eva: function eva02_tiny_patch14_224 (line 1807) | def eva02_tiny_patch14_224(pretrained: bool = False, **kwargs) -> Eva: function eva02_small_patch14_224 (line 1825) | def eva02_small_patch14_224(pretrained: bool = False, **kwargs) -> Eva: function eva02_base_patch14_224 (line 1843) | def eva02_base_patch14_224(pretrained: bool = False, **kwargs) -> Eva: function eva02_large_patch14_224 (line 1863) | def eva02_large_patch14_224(pretrained: bool = False, **kwargs) -> Eva: function eva02_tiny_patch14_336 (line 1883) | def eva02_tiny_patch14_336(pretrained: bool = False, **kwargs) -> Eva: function eva02_small_patch14_336 (line 1901) | def eva02_small_patch14_336(pretrained: bool = False, **kwargs) -> Eva: function eva02_base_patch14_448 (line 1919) | def eva02_base_patch14_448(pretrained: bool = False, **kwargs) -> Eva: function eva02_large_patch14_448 (line 1939) | def eva02_large_patch14_448(pretrained: bool = False, **kwargs) -> Eva: function eva_giant_patch14_clip_224 (line 1959) | def eva_giant_patch14_clip_224(pretrained: bool = False, **kwargs) -> Eva: function eva02_base_patch16_clip_224 (line 1969) | def eva02_base_patch16_clip_224(pretrained: bool = False, **kwargs) -> Eva: function eva02_large_patch14_clip_224 (line 1991) | def eva02_large_patch14_clip_224(pretrained: bool = False, **kwargs) -> ... function eva02_large_patch14_clip_336 (line 2013) | def eva02_large_patch14_clip_336(pretrained: bool = False, **kwargs) -> ... function eva02_enormous_patch14_clip_224 (line 2035) | def eva02_enormous_patch14_clip_224(pretrained: bool = False, **kwargs) ... function vit_medium_patch16_rope_reg1_gap_256 (line 2052) | def vit_medium_patch16_rope_reg1_gap_256(pretrained: bool = False, **kwa... function vit_mediumd_patch16_rope_reg1_gap_256 (line 2074) | def vit_mediumd_patch16_rope_reg1_gap_256(pretrained: bool = False, **kw... function vit_betwixt_patch16_rope_reg4_gap_256 (line 2096) | def vit_betwixt_patch16_rope_reg4_gap_256(pretrained: bool = False, **kw... function vit_base_patch16_rope_reg1_gap_256 (line 2118) | def vit_base_patch16_rope_reg1_gap_256(pretrained: bool = False, **kwarg... function vit_pe_core_tiny_patch16_384 (line 2140) | def vit_pe_core_tiny_patch16_384(pretrained: bool = False, **kwargs) -> ... function vit_pe_core_small_patch16_384 (line 2165) | def vit_pe_core_small_patch16_384(pretrained: bool = False, **kwargs) ->... function vit_pe_core_base_patch16_224 (line 2189) | def vit_pe_core_base_patch16_224(pretrained: bool = False, **kwargs) -> ... function vit_pe_core_large_patch14_336 (line 2213) | def vit_pe_core_large_patch14_336(pretrained: bool = False, **kwargs) ->... function vit_pe_core_gigantic_patch14_448 (line 2237) | def vit_pe_core_gigantic_patch14_448(pretrained: bool = False, **kwargs)... function vit_pe_lang_large_patch14_448 (line 2261) | def vit_pe_lang_large_patch14_448(pretrained: bool = False, **kwargs) ->... function vit_pe_lang_gigantic_patch14_448 (line 2286) | def vit_pe_lang_gigantic_patch14_448(pretrained: bool = False, **kwargs)... function vit_pe_spatial_tiny_patch16_512 (line 2310) | def vit_pe_spatial_tiny_patch16_512(pretrained: bool = False, **kwargs) ... function vit_pe_spatial_small_patch16_512 (line 2333) | def vit_pe_spatial_small_patch16_512(pretrained: bool = False, **kwargs)... function vit_pe_spatial_base_patch16_512 (line 2356) | def vit_pe_spatial_base_patch16_512(pretrained: bool = False, **kwargs) ... function vit_pe_spatial_large_patch14_448 (line 2379) | def vit_pe_spatial_large_patch14_448(pretrained: bool = False, **kwargs)... function vit_pe_spatial_gigantic_patch14_448 (line 2402) | def vit_pe_spatial_gigantic_patch14_448(pretrained: bool = False, **kwar... function vit_small_patch16_rope_224 (line 2427) | def vit_small_patch16_rope_224(pretrained: bool = False, **kwargs) -> Eva: function vit_base_patch16_rope_224 (line 2450) | def vit_base_patch16_rope_224(pretrained: bool = False, **kwargs) -> Eva: function vit_large_patch16_rope_224 (line 2474) | def vit_large_patch16_rope_224(pretrained: bool = False, **kwargs) -> Eva: function vit_small_patch16_rope_mixed_224 (line 2497) | def vit_small_patch16_rope_mixed_224(pretrained: bool = False, **kwargs)... function vit_base_patch16_rope_mixed_224 (line 2521) | def vit_base_patch16_rope_mixed_224(pretrained: bool = False, **kwargs) ... function vit_large_patch16_rope_mixed_224 (line 2545) | def vit_large_patch16_rope_mixed_224(pretrained: bool = False, **kwargs)... function vit_small_patch16_rope_ape_224 (line 2570) | def vit_small_patch16_rope_ape_224(pretrained: bool = False, **kwargs) -... function vit_base_patch16_rope_ape_224 (line 2594) | def vit_base_patch16_rope_ape_224(pretrained: bool = False, **kwargs) ->... function vit_large_patch16_rope_ape_224 (line 2619) | def vit_large_patch16_rope_ape_224(pretrained: bool = False, **kwargs) -... function vit_small_patch16_rope_mixed_ape_224 (line 2644) | def vit_small_patch16_rope_mixed_ape_224(pretrained: bool = False, **kwa... function vit_base_patch16_rope_mixed_ape_224 (line 2670) | def vit_base_patch16_rope_mixed_ape_224(pretrained: bool = False, **kwar... function vit_large_patch16_rope_mixed_ape_224 (line 2695) | def vit_large_patch16_rope_mixed_ape_224(pretrained: bool = False, **kwa... function vit_small_patch16_dinov3 (line 2720) | def vit_small_patch16_dinov3(pretrained: bool = False, **kwargs) -> Eva: function vit_small_patch16_dinov3_qkvb (line 2747) | def vit_small_patch16_dinov3_qkvb(pretrained: bool = False, **kwargs) ->... function vit_small_plus_patch16_dinov3 (line 2774) | def vit_small_plus_patch16_dinov3(pretrained: bool = False, **kwargs) ->... function vit_small_plus_patch16_dinov3_qkvb (line 2803) | def vit_small_plus_patch16_dinov3_qkvb(pretrained: bool = False, **kwarg... function vit_base_patch16_dinov3 (line 2832) | def vit_base_patch16_dinov3(pretrained: bool = False, **kwargs) -> Eva: function vit_base_patch16_dinov3_qkvb (line 2859) | def vit_base_patch16_dinov3_qkvb(pretrained: bool = False, **kwargs) -> ... function vit_large_patch16_dinov3 (line 2886) | def vit_large_patch16_dinov3(pretrained: bool = False, **kwargs) -> Eva: function vit_large_patch16_dinov3_qkvb (line 2913) | def vit_large_patch16_dinov3_qkvb(pretrained: bool = False, **kwargs) ->... function vit_huge_plus_patch16_dinov3 (line 2940) | def vit_huge_plus_patch16_dinov3(pretrained: bool = False, **kwargs) -> ... function vit_huge_plus_patch16_dinov3_qkvb (line 2970) | def vit_huge_plus_patch16_dinov3_qkvb(pretrained: bool = False, **kwargs... function vit_7b_patch16_dinov3 (line 2999) | def vit_7b_patch16_dinov3(pretrained: bool = False, **kwargs) -> Eva: FILE: timm/models/fasternet.py class Partial_conv3 (line 35) | class Partial_conv3(nn.Module): method __init__ (line 36) | def __init__(self, dim: int, n_div: int, forward: str, device=None, dt... method forward_slicing (line 50) | def forward_slicing(self, x: torch.Tensor) -> torch.Tensor: method forward_split_cat (line 56) | def forward_split_cat(self, x: torch.Tensor) -> torch.Tensor: class MLPBlock (line 64) | class MLPBlock(nn.Module): method __init__ (line 65) | def __init__( method forward (line 99) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Block (line 110) | class Block(nn.Module): method __init__ (line 111) | def __init__( method forward (line 151) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PatchEmbed (line 160) | class PatchEmbed(nn.Module): method __init__ (line 161) | def __init__( method forward (line 175) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PatchMerging (line 179) | class PatchMerging(nn.Module): method __init__ (line 180) | def __init__( method forward (line 193) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FasterNet (line 197) | class FasterNet(nn.Module): method __init__ (line 198) | def __init__( method _initialize_weights (line 273) | def _initialize_weights(self): method no_weight_decay (line 285) | def no_weight_decay(self) -> Set: method group_matcher (line 289) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 301) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 306) | def get_classifier(self) -> nn.Module: method reset_classifier (line 309) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg',... method forward_intermediates (line 317) | def forward_intermediates( method prune_intermediate_layers (line 359) | def prune_intermediate_layers( method forward_features (line 373) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 378) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 387) | def forward(self, x: torch.Tensor) -> torch.Tensor: function checkpoint_filter_fn (line 393) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _cfg (line 421) | def _cfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function _create_fasternet (line 463) | def _create_fasternet(variant: str, pretrained: bool = False, **kwargs: ... function fasternet_t0 (line 474) | def fasternet_t0(pretrained: bool = False, **kwargs: Any) -> FasterNet: function fasternet_t1 (line 480) | def fasternet_t1(pretrained: bool = False, **kwargs: Any) -> FasterNet: function fasternet_t2 (line 486) | def fasternet_t2(pretrained: bool = False, **kwargs: Any) -> FasterNet: function fasternet_s (line 492) | def fasternet_s(pretrained: bool = False, **kwargs: Any) -> FasterNet: function fasternet_m (line 498) | def fasternet_m(pretrained: bool = False, **kwargs: Any) -> FasterNet: function fasternet_l (line 504) | def fasternet_l(pretrained: bool = False, **kwargs: Any) -> FasterNet: FILE: timm/models/fastvit.py function num_groups (line 34) | def num_groups(group_size, channels): class MobileOneBlock (line 43) | class MobileOneBlock(nn.Module): method __init__ (line 53) | def __init__( method forward (line 151) | def forward(self, x: torch.Tensor) -> torch.Tensor: method reparameterize (line 176) | def reparameterize(self): method _get_kernel_bias (line 211) | def _get_kernel_bias(self) -> Tuple[torch.Tensor, torch.Tensor]: method _fuse_bn_tensor (line 246) | def _fuse_bn_tensor( class ReparamLargeKernelConv (line 291) | class ReparamLargeKernelConv(nn.Module): method __init__ (line 300) | def __init__( method forward (line 374) | def forward(self, x: torch.Tensor) -> torch.Tensor: method get_kernel_bias (line 385) | def get_kernel_bias(self) -> Tuple[torch.Tensor, torch.Tensor]: method reparameterize (line 401) | def reparameterize(self) -> None: method _fuse_bn (line 425) | def _fuse_bn( function convolutional_stem (line 449) | def convolutional_stem( class Attention (line 504) | class Attention(nn.Module): method __init__ (line 512) | def __init__( method forward (line 544) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PatchEmbed (line 575) | class PatchEmbed(nn.Module): method __init__ (line 578) | def __init__( method forward (line 627) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LayerScale2d (line 632) | class LayerScale2d(nn.Module): method __init__ (line 633) | def __init__( method forward (line 645) | def forward(self, x): class RepMixer (line 649) | class RepMixer(nn.Module): method __init__ (line 656) | def __init__( method forward (line 715) | def forward(self, x: torch.Tensor) -> torch.Tensor: method reparameterize (line 722) | def reparameterize(self) -> None: class ConvMlp (line 767) | class ConvMlp(nn.Module): method __init__ (line 770) | def __init__( method _init_weights (line 807) | def _init_weights(self, m: nn.Module) -> None: method forward (line 813) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RepConditionalPosEnc (line 823) | class RepConditionalPosEnc(nn.Module): method __init__ (line 832) | def __init__( method forward (line 891) | def forward(self, x: torch.Tensor) -> torch.Tensor: method reparameterize (line 898) | def reparameterize(self) -> None: class RepMixerBlock (line 944) | class RepMixerBlock(nn.Module): method __init__ (line 951) | def __init__( method forward (line 1000) | def forward(self, x): class AttentionBlock (line 1006) | class AttentionBlock(nn.Module): method __init__ (line 1013) | def __init__( method forward (line 1060) | def forward(self, x): class FastVitStage (line 1066) | class FastVitStage(nn.Module): method __init__ (line 1067) | def __init__( method forward (line 1161) | def forward(self, x): class FastVit (line 1171) | class FastVit(nn.Module): method __init__ (line 1178) | def __init__( method _init_weights (line 1302) | def _init_weights(self, m: nn.Module) -> None: method no_weight_decay (line 1310) | def no_weight_decay(self): method group_matcher (line 1314) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 1325) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 1330) | def get_classifier(self) -> nn.Module: method reset_classifier (line 1333) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 1337) | def forward_intermediates( method prune_intermediate_layers (line 1383) | def prune_intermediate_layers( method forward_features (line 1397) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 1414) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False): method forward (line 1417) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _cfg (line 1425) | def _cfg(url="", **kwargs): function checkpoint_filter_fn (line 1537) | def checkpoint_filter_fn(state_dict, model): function _create_fastvit (line 1613) | def _create_fastvit(variant, pretrained=False, **kwargs): function fastvit_t8 (line 1627) | def fastvit_t8(pretrained=False, **kwargs): function fastvit_t12 (line 1639) | def fastvit_t12(pretrained=False, **kwargs): function fastvit_s12 (line 1651) | def fastvit_s12(pretrained=False, **kwargs): function fastvit_sa12 (line 1663) | def fastvit_sa12(pretrained=False, **kwargs): function fastvit_sa24 (line 1676) | def fastvit_sa24(pretrained=False, **kwargs): function fastvit_sa36 (line 1689) | def fastvit_sa36(pretrained=False, **kwargs): function fastvit_ma36 (line 1702) | def fastvit_ma36(pretrained=False, **kwargs): function fastvit_mci0 (line 1715) | def fastvit_mci0(pretrained=False, **kwargs): function fastvit_mci1 (line 1730) | def fastvit_mci1(pretrained=False, **kwargs): function fastvit_mci2 (line 1745) | def fastvit_mci2(pretrained=False, **kwargs): function fastvit_mci3 (line 1760) | def fastvit_mci3(pretrained=False, **kwargs): function fastvit_mci4 (line 1785) | def fastvit_mci4(pretrained=False, **kwargs): FILE: timm/models/focalnet.py class FocalModulation (line 45) | class FocalModulation(nn.Module): method __init__ (line 46) | def __init__( method forward (line 89) | def forward(self, x): class FocalNetBlock (line 116) | class FocalNetBlock(nn.Module): method __init__ (line 120) | def __init__( method forward (line 188) | def forward(self, x): class FocalNetStage (line 203) | class FocalNetStage(nn.Module): method __init__ (line 207) | def __init__( method set_grad_checkpointing (line 281) | def set_grad_checkpointing(self, enable=True): method forward (line 284) | def forward(self, x): class Downsample (line 294) | class Downsample(nn.Module): method __init__ (line 296) | def __init__( method forward (line 329) | def forward(self, x): class FocalNet (line 335) | class FocalNet(nn.Module): method __init__ (line 339) | def __init__( method no_weight_decay (line 452) | def no_weight_decay(self): method group_matcher (line 456) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 470) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 476) | def get_classifier(self) -> nn.Module: method reset_classifier (line 479) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 483) | def forward_intermediates( method prune_intermediate_layers (line 533) | def prune_intermediate_layers( method forward_features (line 549) | def forward_features(self, x): method forward_head (line 555) | def forward_head(self, x, pre_logits: bool = False): method forward (line 558) | def forward(self, x): function _init_weights (line 564) | def _init_weights(module, name=None, head_init_scale=1.0): function _cfg (line 578) | def _cfg(url='', **kwargs): function checkpoint_filter_fn (line 624) | def checkpoint_filter_fn(state_dict, model: FocalNet): function _create_focalnet (line 645) | def _create_focalnet(variant, pretrained=False, **kwargs): function focalnet_tiny_srf (line 658) | def focalnet_tiny_srf(pretrained=False, **kwargs) -> FocalNet: function focalnet_small_srf (line 664) | def focalnet_small_srf(pretrained=False, **kwargs) -> FocalNet: function focalnet_base_srf (line 670) | def focalnet_base_srf(pretrained=False, **kwargs) -> FocalNet: function focalnet_tiny_lrf (line 676) | def focalnet_tiny_lrf(pretrained=False, **kwargs) -> FocalNet: function focalnet_small_lrf (line 682) | def focalnet_small_lrf(pretrained=False, **kwargs) -> FocalNet: function focalnet_base_lrf (line 688) | def focalnet_base_lrf(pretrained=False, **kwargs) -> FocalNet: function focalnet_large_fl3 (line 695) | def focalnet_large_fl3(pretrained=False, **kwargs) -> FocalNet: function focalnet_large_fl4 (line 703) | def focalnet_large_fl4(pretrained=False, **kwargs) -> FocalNet: function focalnet_xlarge_fl3 (line 711) | def focalnet_xlarge_fl3(pretrained=False, **kwargs) -> FocalNet: function focalnet_xlarge_fl4 (line 719) | def focalnet_xlarge_fl4(pretrained=False, **kwargs) -> FocalNet: function focalnet_huge_fl3 (line 727) | def focalnet_huge_fl3(pretrained=False, **kwargs) -> FocalNet: function focalnet_huge_fl4 (line 735) | def focalnet_huge_fl4(pretrained=False, **kwargs) -> FocalNet: FILE: timm/models/gcvit.py class MbConvBlock (line 54) | class MbConvBlock(nn.Module): method __init__ (line 57) | def __init__( method forward (line 83) | def forward(self, x): class Downsample2d (line 93) | class Downsample2d(nn.Module): method __init__ (line 94) | def __init__( method forward (line 121) | def forward(self, x): class FeatureBlock (line 129) | class FeatureBlock(nn.Module): method __init__ (line 130) | def __init__( method forward (line 154) | def forward(self, x): class Stem (line 158) | class Stem(nn.Module): method __init__ (line 159) | def __init__( method forward (line 173) | def forward(self, x): class WindowAttentionGlobal (line 179) | class WindowAttentionGlobal(nn.Module): method __init__ (line 181) | def __init__( method forward (line 211) | def forward(self, x, q_global: Optional[torch.Tensor] = None): function window_partition (line 238) | def window_partition(x, window_size: Tuple[int, int]): function window_reverse (line 246) | def window_reverse(windows, window_size: Tuple[int, int], img_size: Tupl... class GlobalContextVitBlock (line 254) | class GlobalContextVitBlock(nn.Module): method __init__ (line 255) | def __init__( method _window_attn (line 300) | def _window_attn(self, x, q_global: Optional[torch.Tensor] = None): method forward (line 308) | def forward(self, x, q_global: Optional[torch.Tensor] = None): class GlobalContextVitStage (line 314) | class GlobalContextVitStage(nn.Module): method __init__ (line 315) | def __init__( method forward (line 381) | def forward(self, x): class GlobalContextVit (line 399) | class GlobalContextVit(nn.Module): method __init__ (line 400) | def __init__( method _init_weights (line 487) | def _init_weights(self, module, name, scheme='vit'): method no_weight_decay (line 504) | def no_weight_decay(self): method group_matcher (line 510) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 518) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 523) | def get_classifier(self) -> nn.Module: method reset_classifier (line 526) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 533) | def forward_intermediates( method prune_intermediate_layers (line 575) | def prune_intermediate_layers( method forward_features (line 589) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 594) | def forward_head(self, x, pre_logits: bool = False): method forward (line 597) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _create_gcvit (line 603) | def _create_gcvit(variant, pretrained=False, **kwargs): function _cfg (line 612) | def _cfg(url='', **kwargs): function gcvit_xxtiny (line 639) | def gcvit_xxtiny(pretrained=False, **kwargs) -> GlobalContextVit: function gcvit_xtiny (line 648) | def gcvit_xtiny(pretrained=False, **kwargs) -> GlobalContextVit: function gcvit_tiny (line 657) | def gcvit_tiny(pretrained=False, **kwargs) -> GlobalContextVit: function gcvit_small (line 666) | def gcvit_small(pretrained=False, **kwargs) -> GlobalContextVit: function gcvit_base (line 678) | def gcvit_base(pretrained=False, **kwargs) -> GlobalContextVit: FILE: timm/models/ghostnet.py class GhostModule (line 36) | class GhostModule(nn.Module): method __init__ (line 37) | def __init__( method forward (line 67) | def forward(self, x: torch.Tensor) -> torch.Tensor: class GhostModuleV2 (line 74) | class GhostModuleV2(nn.Module): method __init__ (line 75) | def __init__( method forward (line 112) | def forward(self, x: torch.Tensor) -> torch.Tensor: class GhostModuleV3 (line 121) | class GhostModuleV3(nn.Module): method __init__ (line 122) | def __init__( method forward (line 193) | def forward(self, x): method _get_kernel_bias_primary (line 216) | def _get_kernel_bias_primary(self): method _get_kernel_bias_cheap (line 240) | def _get_kernel_bias_cheap(self): method _fuse_bn_tensor (line 264) | def _fuse_bn_tensor(self, branch): method switch_to_deploy (line 294) | def switch_to_deploy(self): method reparameterize (line 353) | def reparameterize(self): class GhostBottleneck (line 357) | class GhostBottleneck(nn.Module): method __init__ (line 360) | def __init__( method forward (line 427) | def forward(self, x: torch.Tensor) -> torch.Tensor: class GhostBottleneckV3 (line 449) | class GhostBottleneckV3(nn.Module): method __init__ (line 452) | def __init__( method forward (line 527) | def forward(self, x: torch.Tensor) -> torch.Tensor: method _get_kernel_bias_dw (line 553) | def _get_kernel_bias_dw(self): method _fuse_bn_tensor (line 577) | def _fuse_bn_tensor(self, branch): method switch_to_deploy (line 607) | def switch_to_deploy(self): method reparameterize (line 637) | def reparameterize(self): class GhostNet (line 641) | class GhostNet(nn.Module): method __init__ (line 642) | def __init__( method no_weight_decay (line 719) | def no_weight_decay(self) -> Set: method group_matcher (line 723) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 734) | def set_grad_checkpointing(self, enable: bool = True): method get_classifier (line 738) | def get_classifier(self) -> nn.Module: method reset_classifier (line 741) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_intermediates (line 751) | def forward_intermediates( method prune_intermediate_layers (line 804) | def prune_intermediate_layers( method forward_features (line 820) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 830) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 839) | def forward(self, x: torch.Tensor) -> torch.Tensor: method convert_to_deploy (line 844) | def convert_to_deploy(self): function checkpoint_filter_fn (line 848) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _create_ghostnet (line 864) | def _create_ghostnet(variant: str, width: float = 1.0, pretrained: bool ... function _cfg (line 909) | def _cfg(url='', **kwargs): function ghostnet_050 (line 950) | def ghostnet_050(pretrained=False, **kwargs) -> GhostNet: function ghostnet_100 (line 957) | def ghostnet_100(pretrained=False, **kwargs) -> GhostNet: function ghostnet_130 (line 964) | def ghostnet_130(pretrained=False, **kwargs) -> GhostNet: function ghostnetv2_100 (line 971) | def ghostnetv2_100(pretrained=False, **kwargs) -> GhostNet: function ghostnetv2_130 (line 978) | def ghostnetv2_130(pretrained=False, **kwargs) -> GhostNet: function ghostnetv2_160 (line 985) | def ghostnetv2_160(pretrained=False, **kwargs) -> GhostNet: function ghostnetv3_050 (line 992) | def ghostnetv3_050(pretrained: bool = False, **kwargs: Any) -> GhostNet: function ghostnetv3_100 (line 999) | def ghostnetv3_100(pretrained: bool = False, **kwargs: Any) -> GhostNet: function ghostnetv3_130 (line 1006) | def ghostnetv3_130(pretrained: bool = False, **kwargs: Any) -> GhostNet: function ghostnetv3_160 (line 1013) | def ghostnetv3_160(pretrained: bool = False, **kwargs: Any) -> GhostNet: FILE: timm/models/hardcorenas.py function _gen_hardcorenas (line 16) | def _gen_hardcorenas(pretrained, variant, arch_def, **kwargs): function _cfg (line 55) | def _cfg(url='', **kwargs): function hardcorenas_a (line 77) | def hardcorenas_a(pretrained=False, **kwargs) -> MobileNetV3: function hardcorenas_b (line 89) | def hardcorenas_b(pretrained=False, **kwargs) -> MobileNetV3: function hardcorenas_c (line 103) | def hardcorenas_c(pretrained=False, **kwargs) -> MobileNetV3: function hardcorenas_d (line 117) | def hardcorenas_d(pretrained=False, **kwargs) -> MobileNetV3: function hardcorenas_e (line 132) | def hardcorenas_e(pretrained=False, **kwargs) -> MobileNetV3: function hardcorenas_f (line 146) | def hardcorenas_f(pretrained=False, **kwargs) -> MobileNetV3: FILE: timm/models/hgnet.py class LearnableAffineBlock (line 25) | class LearnableAffineBlock(nn.Module): method __init__ (line 26) | def __init__( method forward (line 38) | def forward(self, x): class ConvBNAct (line 42) | class ConvBNAct(nn.Module): method __init__ (line 43) | def __init__( method forward (line 79) | def forward(self, x): class LightConvBNAct (line 87) | class LightConvBNAct(nn.Module): method __init__ (line 88) | def __init__( method forward (line 118) | def forward(self, x): class EseModule (line 124) | class EseModule(nn.Module): method __init__ (line 125) | def __init__(self, chs: int, device=None, dtype=None): method forward (line 138) | def forward(self, x): class StemV1 (line 146) | class StemV1(nn.Module): method __init__ (line 148) | def __init__(self, stem_chs: List[int], device=None, dtype=None): method forward (line 162) | def forward(self, x): class StemV2 (line 168) | class StemV2(nn.Module): method __init__ (line 170) | def __init__( method forward (line 223) | def forward(self, x): class HighPerfGpuBlock (line 236) | class HighPerfGpuBlock(nn.Module): method __init__ (line 237) | def __init__( method forward (line 320) | def forward(self, x): class HighPerfGpuStage (line 333) | class HighPerfGpuStage(nn.Module): method __init__ (line 334) | def __init__( method forward (line 388) | def forward(self, x): class ClassifierHead (line 397) | class ClassifierHead(nn.Module): method __init__ (line 398) | def __init__( method reset (line 441) | def reset(self, num_classes: int, pool_type: Optional[str] = None, dev... method forward (line 451) | def forward(self, x, pre_logits: bool = False): class HighPerfGpuNet (line 462) | class HighPerfGpuNet(nn.Module): method __init__ (line 464) | def __init__( method group_matcher (line 549) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 556) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 561) | def get_classifier(self) -> nn.Module: method reset_classifier (line 564) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 568) | def forward_intermediates( method prune_intermediate_layers (line 610) | def prune_intermediate_layers( method forward_features (line 624) | def forward_features(self, x): method forward_head (line 628) | def forward_head(self, x, pre_logits: bool = False): method forward (line 631) | def forward(self, x): function _create_hgnet (line 733) | def _create_hgnet(variant, pretrained=False, **kwargs): function _cfg (line 745) | def _cfg(url='', **kwargs): function hgnet_tiny (line 806) | def hgnet_tiny(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnet_small (line 811) | def hgnet_small(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnet_base (line 816) | def hgnet_base(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnetv2_b0 (line 821) | def hgnetv2_b0(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnetv2_b1 (line 826) | def hgnetv2_b1(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnetv2_b2 (line 831) | def hgnetv2_b2(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnetv2_b3 (line 836) | def hgnetv2_b3(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnetv2_b4 (line 841) | def hgnetv2_b4(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnetv2_b5 (line 846) | def hgnetv2_b5(pretrained=False, **kwargs) -> HighPerfGpuNet: function hgnetv2_b6 (line 851) | def hgnetv2_b6(pretrained=False, **kwargs) -> HighPerfGpuNet: FILE: timm/models/hiera.py function conv_nd (line 58) | def conv_nd(n: int) -> Type[nn.Module]: function get_resized_mask (line 67) | def get_resized_mask(target_size: List[int], mask: torch.Tensor) -> torc... function undo_windowing (line 79) | def undo_windowing( class Unroll (line 112) | class Unroll(nn.Module): method __init__ (line 132) | def __init__( method forward (line 142) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Reroll (line 174) | class Reroll(nn.Module): method __init__ (line 179) | def __init__( method forward (line 202) | def forward( class MaskUnitAttention (line 255) | class MaskUnitAttention(nn.Module): method __init__ (line 264) | def __init__( method forward (line 299) | def forward(self, x: torch.Tensor) -> torch.Tensor: class HieraBlock (line 346) | class HieraBlock(nn.Module): method __init__ (line 347) | def __init__( method forward (line 397) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PatchEmbed (line 418) | class PatchEmbed(nn.Module): method __init__ (line 421) | def __init__( method forward (line 446) | def forward( class Hiera (line 461) | class Hiera(nn.Module): method __init__ (line 463) | def __init__( method fix_init_weight (line 634) | def fix_init_weight(self): method no_weight_decay (line 643) | def no_weight_decay(self): method group_matcher (line 652) | def group_matcher(self, coarse: bool = False) -> Dict: method set_grad_checkpointing (line 659) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 663) | def get_classifier(self): method reset_classifier (line 666) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method get_random_mask (line 670) | def get_random_mask(self, x: torch.Tensor, mask_ratio: float) -> torch... method _pos_embed (line 694) | def _pos_embed(self, x) -> torch.Tensor: method forward_intermediates (line 722) | def forward_intermediates( method prune_intermediate_layers (line 785) | def prune_intermediate_layers( method forward_features (line 804) | def forward_features( method forward_head (line 849) | def forward_head(self, x, pre_logits: bool = False) -> torch.Tensor: method forward (line 853) | def forward( function _cfg (line 864) | def _cfg(url='', **kwargs): function checkpoint_filter_fn (line 962) | def checkpoint_filter_fn(state_dict, model=None): function _create_hiera (line 987) | def _create_hiera(variant: str, pretrained: bool = False, **kwargs) -> H... function hiera_tiny_224 (line 1001) | def hiera_tiny_224(pretrained=False, **kwargs): function hiera_small_224 (line 1007) | def hiera_small_224(pretrained=False, **kwargs): function hiera_base_224 (line 1013) | def hiera_base_224(pretrained=False, **kwargs): function hiera_base_plus_224 (line 1019) | def hiera_base_plus_224(pretrained=False, **kwargs): function hiera_large_224 (line 1025) | def hiera_large_224(pretrained=False, **kwargs): function hiera_huge_224 (line 1031) | def hiera_huge_224(pretrained=False, **kwargs): function hiera_small_abswin_256 (line 1037) | def hiera_small_abswin_256(pretrained=False, **kwargs): function hiera_base_abswin_256 (line 1046) | def hiera_base_abswin_256(pretrained=False, **kwargs): FILE: timm/models/hieradet_sam2.py function window_partition (line 32) | def window_partition(x, window_size: Tuple[int, int]): function window_unpartition (line 48) | def window_unpartition(windows: torch.Tensor, window_size: Tuple[int, in... function _calc_pad (line 65) | def _calc_pad(H: int, W: int, window_size: Tuple[int, int]) -> Tuple[int... class MultiScaleAttention (line 72) | class MultiScaleAttention(nn.Module): method __init__ (line 75) | def __init__( method forward (line 97) | def forward(self, x: torch.Tensor) -> torch.Tensor: class MultiScaleBlock (line 132) | class MultiScaleBlock(nn.Module): method __init__ (line 133) | def __init__( method forward (line 192) | def forward(self, x: torch.Tensor) -> torch.Tensor: class HieraPatchEmbed (line 230) | class HieraPatchEmbed(nn.Module): method __init__ (line 235) | def __init__( method forward (line 264) | def forward(self, x: torch.Tensor) -> torch.Tensor: class HieraDet (line 271) | class HieraDet(nn.Module): method __init__ (line 276) | def __init__( method _pos_embed (line 429) | def _pos_embed(self, x: torch.Tensor) -> torch.Tensor: method fix_init_weight (line 439) | def fix_init_weight(self): method no_weight_decay (line 448) | def no_weight_decay(self): method group_matcher (line 452) | def group_matcher(self, coarse: bool = False) -> Dict: method set_grad_checkpointing (line 459) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 463) | def get_classifier(self): method reset_classifier (line 466) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 470) | def forward_intermediates( method prune_intermediate_layers (line 524) | def prune_intermediate_layers( method forward_features (line 543) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 553) | def forward_head(self, x, pre_logits: bool = False) -> torch.Tensor: method forward (line 557) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _cfg (line 564) | def _cfg(url='', **kwargs): function checkpoint_filter_fn (line 628) | def checkpoint_filter_fn(state_dict, model=None, prefix=''): function _create_hiera_det (line 643) | def _create_hiera_det(variant: str, pretrained: bool = False, **kwargs) ... function sam2_hiera_tiny (line 662) | def sam2_hiera_tiny(pretrained=False, **kwargs): function sam2_hiera_small (line 668) | def sam2_hiera_small(pretrained=False, **kwargs): function sam2_hiera_base_plus (line 674) | def sam2_hiera_base_plus(pretrained=False, **kwargs): function sam2_hiera_large (line 680) | def sam2_hiera_large(pretrained=False, **kwargs): function hieradet_small (line 692) | def hieradet_small(pretrained=False, **kwargs): FILE: timm/models/hrnet.py class HighResolutionModule (line 357) | class HighResolutionModule(nn.Module): method __init__ (line 358) | def __init__( method _check_branches (line 396) | def _check_branches(self, num_branches, block_types, num_blocks, num_i... method _make_one_branch (line 408) | def _make_one_branch(self, branch_index, block_type, num_blocks, num_c... method _make_branches (line 431) | def _make_branches(self, num_branches, block_type, num_blocks, num_cha... method _make_fuse_layers (line 439) | def _make_fuse_layers(self, device=None, dtype=None): method get_num_in_chs (line 478) | def get_num_in_chs(self): method forward (line 481) | def forward(self, x: List[torch.Tensor]) -> List[torch.Tensor]: class SequentialList (line 500) | class SequentialList(nn.Sequential): method __init__ (line 502) | def __init__(self, *args): method forward (line 505) | def forward(self, x) -> List[torch.Tensor]: class HighResolutionNet (line 517) | class HighResolutionNet(nn.Module): method __init__ (line 519) | def __init__( method _make_head (line 614) | def _make_head(self, pre_stage_channels, incre_only=False, conv_bias=T... method _make_transition_layer (line 665) | def _make_transition_layer(self, num_channels_pre_layer, num_channels_... method _make_layer (line 693) | def _make_layer(self, block_type, inplanes, planes, block_types, strid... method _make_stage (line 709) | def _make_stage(self, layer_config, num_in_chs, multi_scale_output=Tru... method init_weights (line 737) | def init_weights(self): method group_matcher (line 747) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 759) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 763) | def get_classifier(self) -> nn.Module: method reset_classifier (line 766) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method stages (line 771) | def stages(self, x) -> List[torch.Tensor]: method forward_features (line 784) | def forward_features(self, x): method forward_head (line 809) | def forward_head(self, x, pre_logits: bool = False): method forward (line 815) | def forward(self, x): class HighResolutionNetFeatures (line 821) | class HighResolutionNetFeatures(HighResolutionNet): method __init__ (line 832) | def __init__( method forward_features (line 858) | def forward_features(self, x): method forward (line 861) | def forward(self, x) -> List[torch.Tensor]: function _create_hrnet (line 880) | def _create_hrnet(variant, pretrained=False, cfg_variant=None, **model_k... function _cfg (line 909) | def _cfg(url='', **kwargs): function hrnet_w18_small (line 950) | def hrnet_w18_small(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w18_small_v2 (line 955) | def hrnet_w18_small_v2(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w18 (line 960) | def hrnet_w18(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w30 (line 965) | def hrnet_w30(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w32 (line 970) | def hrnet_w32(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w40 (line 975) | def hrnet_w40(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w44 (line 980) | def hrnet_w44(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w48 (line 985) | def hrnet_w48(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w64 (line 990) | def hrnet_w64(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w18_ssld (line 995) | def hrnet_w18_ssld(pretrained=False, **kwargs) -> HighResolutionNet: function hrnet_w48_ssld (line 1001) | def hrnet_w48_ssld(pretrained=False, **kwargs) -> HighResolutionNet: FILE: timm/models/inception_next.py class InceptionDWConv2d (line 22) | class InceptionDWConv2d(nn.Module): method __init__ (line 26) | def __init__( method forward (line 52) | def forward(self, x): class ConvMlp (line 63) | class ConvMlp(nn.Module): method __init__ (line 68) | def __init__( method forward (line 92) | def forward(self, x): class MlpClassifierHead (line 101) | class MlpClassifierHead(nn.Module): method __init__ (line 105) | def __init__( method reset (line 133) | def reset(self, num_classes: int, pool_type: Optional[str] = None): method forward (line 140) | def forward(self, x, pre_logits: bool = False): class MetaNeXtBlock (line 149) | class MetaNeXtBlock(nn.Module): method __init__ (line 157) | def __init__( method forward (line 179) | def forward(self, x): class MetaNeXtStage (line 190) | class MetaNeXtStage(nn.Module): method __init__ (line 191) | def __init__( method forward (line 241) | def forward(self, x): class MetaNeXt (line 250) | class MetaNeXt(nn.Module): method __init__ (line 268) | def __init__( method _init_weights (line 339) | def _init_weights(self, m): method group_matcher (line 346) | def group_matcher(self, coarse=False): method get_classifier (line 356) | def get_classifier(self) -> nn.Module: method reset_classifier (line 359) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_grad_checkpointing (line 364) | def set_grad_checkpointing(self, enable=True): method no_weight_decay (line 369) | def no_weight_decay(self): method forward_intermediates (line 372) | def forward_intermediates( method prune_intermediate_layers (line 414) | def prune_intermediate_layers( method forward_features (line 428) | def forward_features(self, x): method forward_head (line 433) | def forward_head(self, x, pre_logits: bool = False): method forward (line 436) | def forward(self, x): function _cfg (line 442) | def _cfg(url='', **kwargs): function _create_inception_next (line 480) | def _create_inception_next(variant, pretrained=False, **kwargs): function inception_next_atto (line 490) | def inception_next_atto(pretrained=False, **kwargs): function inception_next_tiny (line 499) | def inception_next_tiny(pretrained=False, **kwargs): function inception_next_small (line 508) | def inception_next_small(pretrained=False, **kwargs): function inception_next_base (line 517) | def inception_next_base(pretrained=False, **kwargs): FILE: timm/models/inception_resnet_v2.py class Mixed_5b (line 19) | class Mixed_5b(nn.Module): method __init__ (line 20) | def __init__( method forward (line 48) | def forward(self, x): class Block35 (line 57) | class Block35(nn.Module): method __init__ (line 58) | def __init__( method forward (line 86) | def forward(self, x): class Mixed_6a (line 97) | class Mixed_6a(nn.Module): method __init__ (line 98) | def __init__( method forward (line 118) | def forward(self, x): class Block17 (line 126) | class Block17(nn.Module): method __init__ (line 127) | def __init__( method forward (line 150) | def forward(self, x): class Mixed_7a (line 160) | class Mixed_7a(nn.Module): method __init__ (line 161) | def __init__( method forward (line 189) | def forward(self, x): class Block8 (line 198) | class Block8(nn.Module): method __init__ (line 200) | def __init__( method forward (line 224) | def forward(self, x): class InceptionResnetV2 (line 235) | class InceptionResnetV2(nn.Module): method __init__ (line 236) | def __init__( method group_matcher (line 299) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 318) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 322) | def get_classifier(self) -> nn.Module: method reset_classifier (line 325) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 329) | def forward_features(self, x): method forward_head (line 347) | def forward_head(self, x, pre_logits: bool = False): method forward (line 352) | def forward(self, x): function _create_inception_resnet_v2 (line 358) | def _create_inception_resnet_v2(variant, pretrained=False, **kwargs): function inception_resnet_v2 (line 386) | def inception_resnet_v2(pretrained=False, **kwargs) -> InceptionResnetV2: FILE: timm/models/inception_v3.py class InceptionA (line 23) | class InceptionA(nn.Module): method __init__ (line 25) | def __init__( method _forward (line 47) | def _forward(self, x): method forward (line 63) | def forward(self, x): class InceptionB (line 68) | class InceptionB(nn.Module): method __init__ (line 70) | def __init__( method _forward (line 86) | def _forward(self, x): method forward (line 98) | def forward(self, x): class InceptionC (line 103) | class InceptionC(nn.Module): method __init__ (line 105) | def __init__( method _forward (line 131) | def _forward(self, x): method forward (line 150) | def forward(self, x): class InceptionD (line 155) | class InceptionD(nn.Module): method __init__ (line 157) | def __init__( method _forward (line 175) | def _forward(self, x): method forward (line 188) | def forward(self, x): class InceptionE (line 193) | class InceptionE(nn.Module): method __init__ (line 195) | def __init__( method _forward (line 218) | def _forward(self, x): method forward (line 242) | def forward(self, x): class InceptionAux (line 247) | class InceptionAux(nn.Module): method __init__ (line 249) | def __init__( method forward (line 266) | def forward(self, x): class InceptionV3 (line 284) | class InceptionV3(nn.Module): method __init__ (line 289) | def __init__( method group_matcher (line 364) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 381) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 385) | def get_classifier(self) -> nn.Module: method reset_classifier (line 388) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_preaux (line 392) | def forward_preaux(self, x): method forward_postaux (line 410) | def forward_postaux(self, x): method forward_features (line 416) | def forward_features(self, x): method forward_head (line 425) | def forward_head(self, x, pre_logits: bool = False): method forward (line 433) | def forward(self, x): function _create_inception_v3 (line 443) | def _create_inception_v3(variant, pretrained=False, **kwargs): function _cfg (line 466) | def _cfg(url='', **kwargs): function inception_v3 (line 499) | def inception_v3(pretrained=False, **kwargs) -> InceptionV3: FILE: timm/models/inception_v4.py class Mixed3a (line 20) | class Mixed3a(nn.Module): method __init__ (line 21) | def __init__( method forward (line 32) | def forward(self, x): class Mixed4a (line 39) | class Mixed4a(nn.Module): method __init__ (line 40) | def __init__( method forward (line 61) | def forward(self, x): class Mixed5a (line 68) | class Mixed5a(nn.Module): method __init__ (line 69) | def __init__( method forward (line 80) | def forward(self, x): class InceptionA (line 87) | class InceptionA(nn.Module): method __init__ (line 88) | def __init__( method forward (line 114) | def forward(self, x): class ReductionA (line 123) | class ReductionA(nn.Module): method __init__ (line 124) | def __init__( method forward (line 142) | def forward(self, x): class InceptionB (line 150) | class InceptionB(nn.Module): method __init__ (line 151) | def __init__( method forward (line 180) | def forward(self, x): class ReductionB (line 189) | class ReductionB(nn.Module): method __init__ (line 190) | def __init__( method forward (line 213) | def forward(self, x): class InceptionC (line 221) | class InceptionC(nn.Module): method __init__ (line 222) | def __init__( method forward (line 248) | def forward(self, x): class InceptionV4 (line 269) | class InceptionV4(nn.Module): method __init__ (line 270) | def __init__( method group_matcher (line 328) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 335) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 339) | def get_classifier(self) -> nn.Module: method reset_classifier (line 342) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_intermediates (line 347) | def forward_intermediates( method prune_intermediate_layers (line 391) | def prune_intermediate_layers( method forward_features (line 407) | def forward_features(self, x): method forward_head (line 410) | def forward_head(self, x, pre_logits: bool = False): method forward (line 415) | def forward(self, x): function _create_inception_v4 (line 421) | def _create_inception_v4(variant, pretrained=False, **kwargs) -> Incepti... function inception_v4 (line 444) | def inception_v4(pretrained=False, **kwargs): FILE: timm/models/levit.py class ConvNorm (line 43) | class ConvNorm(nn.Module): method __init__ (line 44) | def __init__( method fuse (line 65) | def fuse(self): method forward (line 77) | def forward(self, x): class LinearNorm (line 81) | class LinearNorm(nn.Module): method __init__ (line 82) | def __init__( method fuse (line 98) | def fuse(self): method forward (line 108) | def forward(self, x): class NormLinear (line 113) | class NormLinear(nn.Module): method __init__ (line 114) | def __init__( method fuse (line 135) | def fuse(self): method forward (line 149) | def forward(self, x): class Stem8 (line 153) | class Stem8(nn.Sequential): method __init__ (line 154) | def __init__( class Stem16 (line 173) | class Stem16(nn.Sequential): method __init__ (line 174) | def __init__( class Downsample (line 195) | class Downsample(nn.Module): method __init__ (line 196) | def __init__( method forward (line 209) | def forward(self, x): class Attention (line 219) | class Attention(nn.Module): method __init__ (line 222) | def __init__( method train (line 264) | def train(self, mode=True): method reset_parameters (line 269) | def reset_parameters(self) -> None: method _compute_attention_bias_idxs (line 274) | def _compute_attention_bias_idxs(self, device=None): method _init_buffers (line 284) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 291) | def init_non_persistent_buffers(self) -> None: method get_attention_biases (line 295) | def get_attention_biases(self, device: torch.device) -> torch.Tensor: method forward (line 304) | def forward(self, x): # x (B,C,H,W) class AttentionDownsample (line 330) | class AttentionDownsample(nn.Module): method __init__ (line 333) | def __init__( method train (line 391) | def train(self, mode=True): method reset_parameters (line 396) | def reset_parameters(self) -> None: method _compute_attention_bias_idxs (line 401) | def _compute_attention_bias_idxs(self, device=None): method _init_buffers (line 415) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 422) | def init_non_persistent_buffers(self) -> None: method get_attention_biases (line 426) | def get_attention_biases(self, device: torch.device) -> torch.Tensor: method forward (line 435) | def forward(self, x): class LevitMlp (line 461) | class LevitMlp(nn.Module): method __init__ (line 464) | def __init__( method forward (line 486) | def forward(self, x): class LevitDownsample (line 494) | class LevitDownsample(nn.Module): method __init__ (line 495) | def __init__( method forward (line 538) | def forward(self, x): class LevitBlock (line 544) | class LevitBlock(nn.Module): method __init__ (line 545) | def __init__( method forward (line 585) | def forward(self, x): class LevitStage (line 591) | class LevitStage(nn.Module): method __init__ (line 592) | def __init__( method forward (line 651) | def forward(self, x): class Levit (line 657) | class Levit(nn.Module): method __init__ (line 664) | def __init__( method init_weights (line 753) | def init_weights(self, needs_reset: bool = True): method _init_weights (line 756) | def _init_weights(self, m: nn.Module, needs_reset: bool = True) -> None: method no_weight_decay (line 761) | def no_weight_decay(self): method group_matcher (line 765) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 773) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 777) | def get_classifier(self) -> nn.Module: method reset_classifier (line 780) | def reset_classifier(self, num_classes: int , global_pool: Optional[st... method forward_intermediates (line 787) | def forward_intermediates( method prune_intermediate_layers (line 840) | def prune_intermediate_layers( method forward_features (line 854) | def forward_features(self, x): method forward_head (line 864) | def forward_head(self, x, pre_logits: bool = False): method forward (line 869) | def forward(self, x): class LevitDistilled (line 875) | class LevitDistilled(Levit): method __init__ (line 876) | def __init__(self, *args, **kwargs): method get_classifier (line 883) | def get_classifier(self) -> nn.Module: method reset_classifier (line 886) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_distilled_training (line 895) | def set_distilled_training(self, enable=True): method forward_head (line 898) | def forward_head(self, x, pre_logits: bool = False): function checkpoint_filter_fn (line 912) | def checkpoint_filter_fn(state_dict, model): function create_levit (line 965) | def create_levit(variant, cfg_variant=None, pretrained=False, distilled=... function _cfg (line 988) | def _cfg(url='', **kwargs): function levit_128s (line 1055) | def levit_128s(pretrained=False, **kwargs) -> Levit: function levit_128 (line 1060) | def levit_128(pretrained=False, **kwargs) -> Levit: function levit_192 (line 1065) | def levit_192(pretrained=False, **kwargs) -> Levit: function levit_256 (line 1070) | def levit_256(pretrained=False, **kwargs) -> Levit: function levit_384 (line 1075) | def levit_384(pretrained=False, **kwargs) -> Levit: function levit_384_s8 (line 1080) | def levit_384_s8(pretrained=False, **kwargs) -> Levit: function levit_512_s8 (line 1085) | def levit_512_s8(pretrained=False, **kwargs) -> Levit: function levit_512 (line 1090) | def levit_512(pretrained=False, **kwargs) -> Levit: function levit_256d (line 1095) | def levit_256d(pretrained=False, **kwargs) -> Levit: function levit_512d (line 1100) | def levit_512d(pretrained=False, **kwargs) -> Levit: function levit_conv_128s (line 1105) | def levit_conv_128s(pretrained=False, **kwargs) -> Levit: function levit_conv_128 (line 1110) | def levit_conv_128(pretrained=False, **kwargs) -> Levit: function levit_conv_192 (line 1115) | def levit_conv_192(pretrained=False, **kwargs) -> Levit: function levit_conv_256 (line 1120) | def levit_conv_256(pretrained=False, **kwargs) -> Levit: function levit_conv_384 (line 1125) | def levit_conv_384(pretrained=False, **kwargs) -> Levit: function levit_conv_384_s8 (line 1130) | def levit_conv_384_s8(pretrained=False, **kwargs) -> Levit: function levit_conv_512_s8 (line 1135) | def levit_conv_512_s8(pretrained=False, **kwargs) -> Levit: function levit_conv_512 (line 1140) | def levit_conv_512(pretrained=False, **kwargs) -> Levit: function levit_conv_256d (line 1145) | def levit_conv_256d(pretrained=False, **kwargs) -> Levit: function levit_conv_512d (line 1150) | def levit_conv_512d(pretrained=False, **kwargs) -> Levit: FILE: timm/models/mambaout.py class Stem (line 22) | class Stem(nn.Module): method __init__ (line 27) | def __init__( method forward (line 59) | def forward(self, x): class DownsampleNormFirst (line 72) | class DownsampleNormFirst(nn.Module): method __init__ (line 74) | def __init__( method forward (line 94) | def forward(self, x): class Downsample (line 102) | class Downsample(nn.Module): method __init__ (line 104) | def __init__( method forward (line 124) | def forward(self, x): class MlpHead (line 132) | class MlpHead(nn.Module): method __init__ (line 136) | def __init__( method reset (line 174) | def reset(self, num_classes: int, pool_type: Optional[str] = None, res... method forward (line 183) | def forward(self, x, pre_logits: bool = False): class GatedConvBlock (line 195) | class GatedConvBlock(nn.Module): method __init__ (line 204) | def __init__( method forward (line 238) | def forward(self, x): class MambaOutStage (line 252) | class MambaOutStage(nn.Module): method __init__ (line 254) | def __init__( method forward (line 298) | def forward(self, x): class MambaOut (line 307) | class MambaOut(nn.Module): method __init__ (line 324) | def __init__( method _init_weights (line 424) | def _init_weights(self, m): method group_matcher (line 431) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 441) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 446) | def get_classifier(self) -> nn.Module: method reset_classifier (line 449) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 453) | def forward_intermediates( method prune_intermediate_layers (line 500) | def prune_intermediate_layers( method forward_features (line 514) | def forward_features(self, x): method forward_head (line 519) | def forward_head(self, x, pre_logits: bool = False): method forward (line 523) | def forward(self, x): function checkpoint_filter_fn (line 529) | def checkpoint_filter_fn(state_dict, model): function _cfg (line 554) | def _cfg(url='', **kwargs): function _create_mambaout (line 610) | def _create_mambaout(variant, pretrained=False, **kwargs): function mambaout_femto (line 622) | def mambaout_femto(pretrained=False, **kwargs): function mambaout_kobe (line 628) | def mambaout_kobe(pretrained=False, **kwargs): function mambaout_tiny (line 633) | def mambaout_tiny(pretrained=False, **kwargs): function mambaout_small (line 639) | def mambaout_small(pretrained=False, **kwargs): function mambaout_base (line 645) | def mambaout_base(pretrained=False, **kwargs): function mambaout_small_rw (line 651) | def mambaout_small_rw(pretrained=False, **kwargs): function mambaout_base_short_rw (line 664) | def mambaout_base_short_rw(pretrained=False, **kwargs): function mambaout_base_tall_rw (line 679) | def mambaout_base_tall_rw(pretrained=False, **kwargs): function mambaout_base_wide_rw (line 694) | def mambaout_base_wide_rw(pretrained=False, **kwargs): function mambaout_base_plus_rw (line 710) | def mambaout_base_plus_rw(pretrained=False, **kwargs): function test_mambaout (line 726) | def test_mambaout(pretrained=False, **kwargs): FILE: timm/models/maxxvit.py class MaxxVitTransformerCfg (line 85) | class MaxxVitTransformerCfg: method __post_init__ (line 109) | def __post_init__(self): class MaxxVitConvCfg (line 119) | class MaxxVitConvCfg: method __post_init__ (line 142) | def __post_init__(self): class MaxxVitCfg (line 156) | class MaxxVitCfg: class Attention2d (line 169) | class Attention2d(nn.Module): method __init__ (line 173) | def __init__( method forward (line 215) | def forward(self, x: torch.Tensor, shared_rel_pos: Optional[torch.Tens... class AttentionCl (line 253) | class AttentionCl(nn.Module): method __init__ (line 257) | def __init__( method forward (line 300) | def forward(self, x: torch.Tensor, shared_rel_pos: Optional[torch.Tens... class Downsample2d (line 338) | class Downsample2d(nn.Module): method __init__ (line 347) | def __init__( method forward (line 382) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _init_transformer (line 388) | def _init_transformer(module: nn.Module, name: str, scheme: str = '') ->... class TransformerBlock2d (line 413) | class TransformerBlock2d(nn.Module): method __init__ (line 424) | def __init__( method init_weights (line 485) | def init_weights(self, scheme: str = '') -> None: method forward (line 488) | def forward(self, x: torch.Tensor, shared_rel_pos: Optional[torch.Tens... function _init_conv (line 494) | def _init_conv(module: nn.Module, name: str, scheme: str = '') -> None: function num_groups (line 518) | def num_groups(group_size: Optional[int], channels: int) -> int: class MbConvBlock (line 528) | class MbConvBlock(nn.Module): method __init__ (line 531) | def __init__( method init_weights (line 613) | def init_weights(self, scheme: str = '') -> None: method forward (line 616) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvNeXtBlock (line 639) | class ConvNeXtBlock(nn.Module): method __init__ (line 642) | def __init__( method forward (line 723) | def forward(self, x: torch.Tensor) -> torch.Tensor: function window_partition (line 742) | def window_partition(x: torch.Tensor, window_size: List[int]) -> torch.T... function window_reverse (line 753) | def window_reverse(windows: torch.Tensor, window_size: List[int], img_si... function grid_partition (line 762) | def grid_partition(x: torch.Tensor, grid_size: List[int]) -> torch.Tensor: function grid_reverse (line 773) | def grid_reverse(windows: torch.Tensor, grid_size: List[int], img_size: ... function get_rel_pos_cls (line 782) | def get_rel_pos_cls(cfg: MaxxVitTransformerCfg, window_size: Tuple[int, ... class PartitionAttentionCl (line 794) | class PartitionAttentionCl(nn.Module): method __init__ (line 800) | def __init__( method _partition_attn (line 844) | def _partition_attn(self, x): method forward (line 859) | def forward(self, x): class ParallelPartitionAttention (line 865) | class ParallelPartitionAttention(nn.Module): method __init__ (line 871) | def __init__( method _partition_attn (line 933) | def _partition_attn(self, x: torch.Tensor) -> torch.Tensor: method forward (line 946) | def forward(self, x: torch.Tensor) -> torch.Tensor: function window_partition_nchw (line 952) | def window_partition_nchw(x: torch.Tensor, window_size: List[int]) -> to... function window_reverse_nchw (line 963) | def window_reverse_nchw(windows: torch.Tensor, window_size: List[int], i... function grid_partition_nchw (line 972) | def grid_partition_nchw(x: torch.Tensor, grid_size: List[int]) -> torch.... function grid_reverse_nchw (line 983) | def grid_reverse_nchw(windows: torch.Tensor, grid_size: List[int], img_s... class PartitionAttention2d (line 992) | class PartitionAttention2d(nn.Module): method __init__ (line 998) | def __init__( method _partition_attn (line 1049) | def _partition_attn(self, x: torch.Tensor) -> torch.Tensor: method forward (line 1064) | def forward(self, x: torch.Tensor) -> torch.Tensor: class MaxxVitBlock (line 1070) | class MaxxVitBlock(nn.Module): method __init__ (line 1073) | def __init__( method init_weights (line 1106) | def init_weights(self, scheme=''): method forward (line 1112) | def forward(self, x): class ParallelMaxxVitBlock (line 1126) | class ParallelMaxxVitBlock(nn.Module): method __init__ (line 1132) | def __init__( method init_weights (line 1166) | def init_weights(self, scheme: str = '') -> None: method forward (line 1170) | def forward(self, x: torch.Tensor) -> torch.Tensor: class MaxxVitStage (line 1178) | class MaxxVitStage(nn.Module): method __init__ (line 1181) | def __init__( method forward (line 1260) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Stem (line 1268) | class Stem(nn.Module): method __init__ (line 1271) | def __init__( method init_weights (line 1308) | def init_weights(self, scheme: str = '') -> None: method forward (line 1311) | def forward(self, x: torch.Tensor) -> torch.Tensor: function cfg_window_size (line 1318) | def cfg_window_size(cfg: MaxxVitTransformerCfg, img_size: Tuple[int, int... function _overlay_kwargs (line 1328) | def _overlay_kwargs(cfg: MaxxVitCfg, **kwargs: Any) -> MaxxVitCfg: class MaxxVit (line 1349) | class MaxxVit(nn.Module): method __init__ (line 1355) | def __init__( method _init_weights (line 1462) | def _init_weights(self, module: nn.Module, name: str, scheme: str = ''... method no_weight_decay (line 1470) | def no_weight_decay(self) -> Set[str]: method group_matcher (line 1476) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 1484) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 1489) | def get_classifier(self) -> nn.Module: method reset_classifier (line 1492) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 1496) | def forward_intermediates( method prune_intermediate_layers (line 1550) | def prune_intermediate_layers( method forward_features (line 1565) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 1571) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 1574) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _rw_coat_cfg (line 1580) | def _rw_coat_cfg( function _rw_max_cfg (line 1637) | def _rw_max_cfg( function _next_cfg (line 1685) | def _next_cfg( function _tf_cfg (line 1724) | def _tf_cfg() -> Dict[str, Any]: function checkpoint_filter_fn (line 2110) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _create_maxxvit (line 2132) | def _create_maxxvit(variant: str, cfg_variant: Optional[str] = None, pre... function _cfg (line 2147) | def _cfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function coatnet_pico_rw_224 (line 2379) | def coatnet_pico_rw_224(pretrained: bool = False, **kwargs: Any) -> Maxx... function coatnet_nano_rw_224 (line 2385) | def coatnet_nano_rw_224(pretrained: bool = False, **kwargs: Any) -> Maxx... function coatnet_0_rw_224 (line 2391) | def coatnet_0_rw_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_1_rw_224 (line 2397) | def coatnet_1_rw_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_2_rw_224 (line 2403) | def coatnet_2_rw_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_3_rw_224 (line 2409) | def coatnet_3_rw_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_bn_0_rw_224 (line 2415) | def coatnet_bn_0_rw_224(pretrained: bool = False, **kwargs: Any) -> Maxx... function coatnet_rmlp_nano_rw_224 (line 2421) | def coatnet_rmlp_nano_rw_224(pretrained: bool = False, **kwargs: Any) ->... function coatnet_rmlp_0_rw_224 (line 2427) | def coatnet_rmlp_0_rw_224(pretrained: bool = False, **kwargs: Any) -> Ma... function coatnet_rmlp_1_rw_224 (line 2433) | def coatnet_rmlp_1_rw_224(pretrained: bool = False, **kwargs: Any) -> Ma... function coatnet_rmlp_1_rw2_224 (line 2439) | def coatnet_rmlp_1_rw2_224(pretrained: bool = False, **kwargs: Any) -> M... function coatnet_rmlp_2_rw_224 (line 2445) | def coatnet_rmlp_2_rw_224(pretrained: bool = False, **kwargs: Any) -> Ma... function coatnet_rmlp_2_rw_384 (line 2451) | def coatnet_rmlp_2_rw_384(pretrained: bool = False, **kwargs: Any) -> Ma... function coatnet_rmlp_3_rw_224 (line 2457) | def coatnet_rmlp_3_rw_224(pretrained: bool = False, **kwargs: Any) -> Ma... function coatnet_nano_cc_224 (line 2463) | def coatnet_nano_cc_224(pretrained: bool = False, **kwargs: Any) -> Maxx... function coatnext_nano_rw_224 (line 2469) | def coatnext_nano_rw_224(pretrained: bool = False, **kwargs: Any) -> Max... function coatnet_0_224 (line 2475) | def coatnet_0_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_1_224 (line 2481) | def coatnet_1_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_2_224 (line 2487) | def coatnet_2_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_3_224 (line 2493) | def coatnet_3_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_4_224 (line 2499) | def coatnet_4_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function coatnet_5_224 (line 2505) | def coatnet_5_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_pico_rw_256 (line 2511) | def maxvit_pico_rw_256(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_nano_rw_256 (line 2517) | def maxvit_nano_rw_256(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_tiny_rw_224 (line 2523) | def maxvit_tiny_rw_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_tiny_rw_256 (line 2529) | def maxvit_tiny_rw_256(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_rmlp_pico_rw_256 (line 2535) | def maxvit_rmlp_pico_rw_256(pretrained: bool = False, **kwargs: Any) -> ... function maxvit_rmlp_nano_rw_256 (line 2541) | def maxvit_rmlp_nano_rw_256(pretrained: bool = False, **kwargs: Any) -> ... function maxvit_rmlp_tiny_rw_256 (line 2547) | def maxvit_rmlp_tiny_rw_256(pretrained: bool = False, **kwargs: Any) -> ... function maxvit_rmlp_small_rw_224 (line 2553) | def maxvit_rmlp_small_rw_224(pretrained: bool = False, **kwargs: Any) ->... function maxvit_rmlp_small_rw_256 (line 2559) | def maxvit_rmlp_small_rw_256(pretrained: bool = False, **kwargs: Any) ->... function maxvit_rmlp_base_rw_224 (line 2565) | def maxvit_rmlp_base_rw_224(pretrained: bool = False, **kwargs: Any) -> ... function maxvit_rmlp_base_rw_384 (line 2571) | def maxvit_rmlp_base_rw_384(pretrained: bool = False, **kwargs: Any) -> ... function maxvit_tiny_pm_256 (line 2577) | def maxvit_tiny_pm_256(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxxvit_rmlp_nano_rw_256 (line 2583) | def maxxvit_rmlp_nano_rw_256(pretrained: bool = False, **kwargs: Any) ->... function maxxvit_rmlp_tiny_rw_256 (line 2589) | def maxxvit_rmlp_tiny_rw_256(pretrained: bool = False, **kwargs: Any) ->... function maxxvit_rmlp_small_rw_256 (line 2595) | def maxxvit_rmlp_small_rw_256(pretrained: bool = False, **kwargs: Any) -... function maxxvitv2_nano_rw_256 (line 2601) | def maxxvitv2_nano_rw_256(pretrained: bool = False, **kwargs: Any) -> Ma... function maxxvitv2_rmlp_base_rw_224 (line 2607) | def maxxvitv2_rmlp_base_rw_224(pretrained: bool = False, **kwargs: Any) ... function maxxvitv2_rmlp_base_rw_384 (line 2613) | def maxxvitv2_rmlp_base_rw_384(pretrained: bool = False, **kwargs: Any) ... function maxxvitv2_rmlp_large_rw_224 (line 2619) | def maxxvitv2_rmlp_large_rw_224(pretrained: bool = False, **kwargs: Any)... function maxvit_tiny_tf_224 (line 2625) | def maxvit_tiny_tf_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_tiny_tf_384 (line 2631) | def maxvit_tiny_tf_384(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_tiny_tf_512 (line 2637) | def maxvit_tiny_tf_512(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_small_tf_224 (line 2643) | def maxvit_small_tf_224(pretrained: bool = False, **kwargs: Any) -> Maxx... function maxvit_small_tf_384 (line 2649) | def maxvit_small_tf_384(pretrained: bool = False, **kwargs: Any) -> Maxx... function maxvit_small_tf_512 (line 2655) | def maxvit_small_tf_512(pretrained: bool = False, **kwargs: Any) -> Maxx... function maxvit_base_tf_224 (line 2661) | def maxvit_base_tf_224(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_base_tf_384 (line 2667) | def maxvit_base_tf_384(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_base_tf_512 (line 2673) | def maxvit_base_tf_512(pretrained: bool = False, **kwargs: Any) -> MaxxVit: function maxvit_large_tf_224 (line 2679) | def maxvit_large_tf_224(pretrained: bool = False, **kwargs: Any) -> Maxx... function maxvit_large_tf_384 (line 2685) | def maxvit_large_tf_384(pretrained: bool = False, **kwargs: Any) -> Maxx... function maxvit_large_tf_512 (line 2691) | def maxvit_large_tf_512(pretrained: bool = False, **kwargs: Any) -> Maxx... function maxvit_xlarge_tf_224 (line 2697) | def maxvit_xlarge_tf_224(pretrained: bool = False, **kwargs: Any) -> Max... function maxvit_xlarge_tf_384 (line 2703) | def maxvit_xlarge_tf_384(pretrained: bool = False, **kwargs: Any) -> Max... function maxvit_xlarge_tf_512 (line 2709) | def maxvit_xlarge_tf_512(pretrained: bool = False, **kwargs: Any) -> Max... FILE: timm/models/metaformer.py class Stem (line 59) | class Stem(nn.Module): method __init__ (line 65) | def __init__( method forward (line 85) | def forward(self, x): class Downsampling (line 91) | class Downsampling(nn.Module): method __init__ (line 96) | def __init__( method forward (line 119) | def forward(self, x): class Scale (line 125) | class Scale(nn.Module): method __init__ (line 130) | def __init__( method forward (line 144) | def forward(self, x): class SquaredReLU (line 148) | class SquaredReLU(nn.Module): method __init__ (line 153) | def __init__(self, inplace: bool = False): method forward (line 157) | def forward(self, x): class StarReLU (line 161) | class StarReLU(nn.Module): method __init__ (line 166) | def __init__( method forward (line 184) | def forward(self, x): class Attention (line 188) | class Attention(nn.Module): method __init__ (line 195) | def __init__( method forward (line 226) | def forward(self, x): class GroupNorm1NoBias (line 251) | class GroupNorm1NoBias(GroupNorm1): method __init__ (line 252) | def __init__(self, num_channels: int, **kwargs): class LayerNorm2dNoBias (line 258) | class LayerNorm2dNoBias(LayerNorm2d): method __init__ (line 259) | def __init__(self, num_channels: int, **kwargs): class LayerNormNoBias (line 265) | class LayerNormNoBias(nn.LayerNorm): method __init__ (line 266) | def __init__(self, num_channels: int, **kwargs): class SepConv (line 272) | class SepConv(nn.Module): method __init__ (line 277) | def __init__( method forward (line 307) | def forward(self, x): class Pooling (line 316) | class Pooling(nn.Module): method __init__ (line 321) | def __init__(self, pool_size: int = 3, **kwargs): method forward (line 325) | def forward(self, x): class MlpHead (line 330) | class MlpHead(nn.Module): method __init__ (line 334) | def __init__( method forward (line 355) | def forward(self, x): class MetaFormerBlock (line 364) | class MetaFormerBlock(nn.Module): method __init__ (line 369) | def __init__( method forward (line 410) | def forward(self, x): class MetaFormerStage (line 426) | class MetaFormerStage(nn.Module): method __init__ (line 428) | def __init__( method set_grad_checkpointing (line 478) | def set_grad_checkpointing(self, enable=True): method forward (line 481) | def forward(self, x: Tensor): class MetaFormer (line 499) | class MetaFormer(nn.Module): method __init__ (line 525) | def __init__( method _init_weights (line 632) | def _init_weights(self, m): method set_grad_checkpointing (line 639) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 645) | def get_classifier(self) -> nn.Module: method reset_classifier (line 648) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 663) | def forward_intermediates( method prune_intermediate_layers (line 708) | def prune_intermediate_layers( method forward_head (line 722) | def forward_head(self, x: Tensor, pre_logits: bool = False): method forward_features (line 730) | def forward_features(self, x: Tensor): method forward (line 738) | def forward(self, x: Tensor): function checkpoint_filter_fn (line 745) | def checkpoint_filter_fn(state_dict, model): function _create_metaformer (line 782) | def _create_metaformer(variant, pretrained=False, **kwargs): function _cfg (line 798) | def _cfg(url='', **kwargs): function poolformer_s12 (line 964) | def poolformer_s12(pretrained=False, **kwargs) -> MetaFormer: function poolformer_s24 (line 980) | def poolformer_s24(pretrained=False, **kwargs) -> MetaFormer: function poolformer_s36 (line 996) | def poolformer_s36(pretrained=False, **kwargs) -> MetaFormer: function poolformer_m36 (line 1012) | def poolformer_m36(pretrained=False, **kwargs) -> MetaFormer: function poolformer_m48 (line 1028) | def poolformer_m48(pretrained=False, **kwargs) -> MetaFormer: function poolformerv2_s12 (line 1044) | def poolformerv2_s12(pretrained=False, **kwargs) -> MetaFormer: function poolformerv2_s24 (line 1055) | def poolformerv2_s24(pretrained=False, **kwargs) -> MetaFormer: function poolformerv2_s36 (line 1066) | def poolformerv2_s36(pretrained=False, **kwargs) -> MetaFormer: function poolformerv2_m36 (line 1077) | def poolformerv2_m36(pretrained=False, **kwargs) -> MetaFormer: function poolformerv2_m48 (line 1088) | def poolformerv2_m48(pretrained=False, **kwargs) -> MetaFormer: function convformer_s18 (line 1099) | def convformer_s18(pretrained=False, **kwargs) -> MetaFormer: function convformer_s36 (line 1110) | def convformer_s36(pretrained=False, **kwargs) -> MetaFormer: function convformer_m36 (line 1121) | def convformer_m36(pretrained=False, **kwargs) -> MetaFormer: function convformer_b36 (line 1132) | def convformer_b36(pretrained=False, **kwargs) -> MetaFormer: function caformer_s18 (line 1143) | def caformer_s18(pretrained=False, **kwargs) -> MetaFormer: function caformer_s36 (line 1154) | def caformer_s36(pretrained=False, **kwargs) -> MetaFormer: function caformer_m36 (line 1165) | def caformer_m36(pretrained=False, **kwargs) -> MetaFormer: function caformer_b36 (line 1176) | def caformer_b36(pretrained=False, **kwargs) -> MetaFormer: FILE: timm/models/mlp_mixer.py class MixerBlock (line 59) | class MixerBlock(nn.Module): method __init__ (line 64) | def __init__( method forward (line 98) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Affine (line 105) | class Affine(nn.Module): method __init__ (line 108) | def __init__(self, dim: int, device=None, dtype=None) -> None: method forward (line 119) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ResBlock (line 124) | class ResBlock(nn.Module): method __init__ (line 129) | def __init__( method forward (line 167) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SpatialGatingUnit (line 174) | class SpatialGatingUnit(nn.Module): method __init__ (line 179) | def __init__( method init_weights (line 200) | def init_weights(self) -> None: method forward (line 206) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SpatialGatingBlock (line 214) | class SpatialGatingBlock(nn.Module): method __init__ (line 219) | def __init__( method forward (line 259) | def forward(self, x: torch.Tensor) -> torch.Tensor: class MlpMixer (line 265) | class MlpMixer(nn.Module): method __init__ (line 271) | def __init__( method init_weights (line 354) | def init_weights(self, nlhb: bool = False) -> None: method group_matcher (line 364) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 379) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 388) | def get_classifier(self) -> nn.Module: method reset_classifier (line 392) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 406) | def forward_intermediates( method prune_intermediate_layers (line 463) | def prune_intermediate_layers( method forward_features (line 487) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 497) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 512) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _init_weights (line 519) | def _init_weights(module: nn.Module, name: str, head_bias: float = 0., f... function checkpoint_filter_fn (line 559) | def checkpoint_filter_fn(state_dict, model): function _create_mixer (line 576) | def _create_mixer(variant, pretrained=False, **kwargs) -> MlpMixer: function _cfg (line 589) | def _cfg(url='', **kwargs) -> Dict[str, Any]: function mixer_s32_224 (line 702) | def mixer_s32_224(pretrained=False, **kwargs) -> MlpMixer: function mixer_s16_224 (line 712) | def mixer_s16_224(pretrained=False, **kwargs) -> MlpMixer: function mixer_b32_224 (line 722) | def mixer_b32_224(pretrained=False, **kwargs) -> MlpMixer: function mixer_b16_224 (line 732) | def mixer_b16_224(pretrained=False, **kwargs) -> MlpMixer: function mixer_l32_224 (line 742) | def mixer_l32_224(pretrained=False, **kwargs) -> MlpMixer: function mixer_l16_224 (line 752) | def mixer_l16_224(pretrained=False, **kwargs) -> MlpMixer: function gmixer_12_224 (line 762) | def gmixer_12_224(pretrained=False, **kwargs) -> MlpMixer: function gmixer_24_224 (line 774) | def gmixer_24_224(pretrained=False, **kwargs) -> MlpMixer: function resmlp_12_224 (line 786) | def resmlp_12_224(pretrained=False, **kwargs) -> MlpMixer: function resmlp_24_224 (line 797) | def resmlp_24_224(pretrained=False, **kwargs) -> MlpMixer: function resmlp_36_224 (line 809) | def resmlp_36_224(pretrained=False, **kwargs) -> MlpMixer: function resmlp_big_24_224 (line 821) | def resmlp_big_24_224(pretrained=False, **kwargs) -> MlpMixer: function gmlp_ti16_224 (line 833) | def gmlp_ti16_224(pretrained=False, **kwargs) -> MlpMixer: function gmlp_s16_224 (line 845) | def gmlp_s16_224(pretrained=False, **kwargs) -> MlpMixer: function gmlp_b16_224 (line 857) | def gmlp_b16_224(pretrained=False, **kwargs) -> MlpMixer: FILE: timm/models/mobilenetv3.py class MobileNetV3 (line 29) | class MobileNetV3(nn.Module): method __init__ (line 45) | def __init__( method as_sequential (line 161) | def as_sequential(self) -> nn.Sequential: method group_matcher (line 174) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 182) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 187) | def get_classifier(self) -> nn.Module: method reset_classifier (line 191) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg')... method forward_intermediates (line 204) | def forward_intermediates( method prune_intermediate_layers (line 262) | def prune_intermediate_layers( method forward_features (line 295) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 312) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 333) | def forward(self, x: torch.Tensor) -> torch.Tensor: class MobileNetV3Features (line 347) | class MobileNetV3Features(nn.Module): method __init__ (line 354) | def __init__( method set_grad_checkpointing (line 441) | def set_grad_checkpointing(self, enable: bool = True) -> None: method forward (line 445) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]: function _create_mnv3 (line 475) | def _create_mnv3(variant: str, pretrained: bool = False, **kwargs) -> Mo... function _gen_mobilenet_v3_rw (line 511) | def _gen_mobilenet_v3_rw( function _gen_mobilenet_v3 (line 557) | def _gen_mobilenet_v3( function _gen_fbnetv3 (line 669) | def _gen_fbnetv3(variant: str, channel_multiplier: float = 1.0, pretrain... function _gen_lcnet (line 740) | def _gen_lcnet(variant: str, channel_multiplier: float = 1.0, pretrained... function _gen_mobilenet_v4 (line 785) | def _gen_mobilenet_v4( function _cfg (line 1044) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function mobilenetv3_large_075 (line 1282) | def mobilenetv3_large_075(pretrained: bool = False, **kwargs) -> MobileN... function mobilenetv3_large_100 (line 1289) | def mobilenetv3_large_100(pretrained: bool = False, **kwargs) -> MobileN... function mobilenetv3_large_150d (line 1295) | def mobilenetv3_large_150d(pretrained: bool = False, **kwargs) -> Mobile... function mobilenetv3_small_050 (line 1301) | def mobilenetv3_small_050(pretrained: bool = False, **kwargs) -> MobileN... function mobilenetv3_small_075 (line 1308) | def mobilenetv3_small_075(pretrained: bool = False, **kwargs) -> MobileN... function mobilenetv3_small_100 (line 1315) | def mobilenetv3_small_100(pretrained: bool = False, **kwargs) -> MobileN... function mobilenetv3_rw (line 1322) | def mobilenetv3_rw(pretrained: bool = False, **kwargs) -> MobileNetV3: function tf_mobilenetv3_large_075 (line 1330) | def tf_mobilenetv3_large_075(pretrained: bool = False, **kwargs) -> Mobi... function tf_mobilenetv3_large_100 (line 1339) | def tf_mobilenetv3_large_100(pretrained: bool = False, **kwargs) -> Mobi... function tf_mobilenetv3_large_minimal_100 (line 1348) | def tf_mobilenetv3_large_minimal_100(pretrained: bool = False, **kwargs)... function tf_mobilenetv3_small_075 (line 1357) | def tf_mobilenetv3_small_075(pretrained: bool = False, **kwargs) -> Mobi... function tf_mobilenetv3_small_100 (line 1366) | def tf_mobilenetv3_small_100(pretrained: bool = False, **kwargs) -> Mobi... function tf_mobilenetv3_small_minimal_100 (line 1375) | def tf_mobilenetv3_small_minimal_100(pretrained: bool = False, **kwargs)... function fbnetv3_b (line 1384) | def fbnetv3_b(pretrained: bool = False, **kwargs) -> MobileNetV3: function fbnetv3_d (line 1391) | def fbnetv3_d(pretrained: bool = False, **kwargs) -> MobileNetV3: function fbnetv3_g (line 1398) | def fbnetv3_g(pretrained: bool = False, **kwargs) -> MobileNetV3: function lcnet_035 (line 1405) | def lcnet_035(pretrained: bool = False, **kwargs) -> MobileNetV3: function lcnet_050 (line 1412) | def lcnet_050(pretrained: bool = False, **kwargs) -> MobileNetV3: function lcnet_075 (line 1419) | def lcnet_075(pretrained: bool = False, **kwargs) -> MobileNetV3: function lcnet_100 (line 1426) | def lcnet_100(pretrained: bool = False, **kwargs) -> MobileNetV3: function lcnet_150 (line 1433) | def lcnet_150(pretrained: bool = False, **kwargs) -> MobileNetV3: function mobilenetv4_conv_small_035 (line 1440) | def mobilenetv4_conv_small_035(pretrained: bool = False, **kwargs) -> Mo... function mobilenetv4_conv_small_050 (line 1447) | def mobilenetv4_conv_small_050(pretrained: bool = False, **kwargs) -> Mo... function mobilenetv4_conv_small (line 1454) | def mobilenetv4_conv_small(pretrained: bool = False, **kwargs) -> Mobile... function mobilenetv4_conv_medium (line 1461) | def mobilenetv4_conv_medium(pretrained: bool = False, **kwargs) -> Mobil... function mobilenetv4_conv_large (line 1468) | def mobilenetv4_conv_large(pretrained: bool = False, **kwargs) -> Mobile... function mobilenetv4_hybrid_medium (line 1475) | def mobilenetv4_hybrid_medium(pretrained: bool = False, **kwargs) -> Mob... function mobilenetv4_hybrid_large (line 1482) | def mobilenetv4_hybrid_large(pretrained: bool = False, **kwargs) -> Mobi... function mobilenetv4_conv_aa_medium (line 1489) | def mobilenetv4_conv_aa_medium(pretrained: bool = False, **kwargs) -> Mo... function mobilenetv4_conv_blur_medium (line 1496) | def mobilenetv4_conv_blur_medium(pretrained: bool = False, **kwargs) -> ... function mobilenetv4_conv_aa_large (line 1503) | def mobilenetv4_conv_aa_large(pretrained: bool = False, **kwargs) -> Mob... function mobilenetv4_hybrid_medium_075 (line 1510) | def mobilenetv4_hybrid_medium_075(pretrained: bool = False, **kwargs) ->... function mobilenetv4_hybrid_large_075 (line 1517) | def mobilenetv4_hybrid_large_075(pretrained: bool = False, **kwargs) -> ... FILE: timm/models/mobilenetv5.py class MobileNetV5MultiScaleFusionAdapter (line 40) | class MobileNetV5MultiScaleFusionAdapter(nn.Module): method __init__ (line 52) | def __init__( method forward (line 92) | def forward(self, inputs: List[torch.Tensor]) -> torch.Tensor: class MobileNetV5 (line 126) | class MobileNetV5(nn.Module): method __init__ (line 130) | def __init__( method as_sequential (line 257) | def as_sequential(self): method group_matcher (line 269) | def group_matcher(self, coarse: bool = False): method set_grad_checkpointing (line 276) | def set_grad_checkpointing(self, enable: bool = True): method get_classifier (line 280) | def get_classifier(self) -> nn.Module: method reset_classifier (line 283) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_intermediates (line 290) | def forward_intermediates( method prune_intermediate_layers (line 352) | def prune_intermediate_layers( method forward_features (line 376) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 399) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 412) | def forward(self, x: torch.Tensor) -> torch.Tensor: class MobileNetV5Encoder (line 418) | class MobileNetV5Encoder(nn.Module): method __init__ (line 421) | def __init__( method forward_intermediates (line 502) | def forward_intermediates( method forward_features (line 571) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 588) | def forward_head(self, x: torch.Tensor) -> torch.Tensor: method forward (line 591) | def forward(self, x: torch.Tensor) -> torch.Tensor: function checkpoint_filter_fn (line 595) | def checkpoint_filter_fn( function _create_mnv5_encoder (line 608) | def _create_mnv5_encoder(variant: str, pretrained: bool = False, **kwarg... function _create_mnv5 (line 632) | def _create_mnv5(variant: str, pretrained: bool = False, **kwargs) -> Mo... function _gen_mobilenet_v5 (line 646) | def _gen_mobilenet_v5( function _cfg (line 825) | def _cfg(url: str = '', **kwargs): function mobilenetv5_300m_enc (line 858) | def mobilenetv5_300m_enc(pretrained: bool = False, **kwargs) -> MobileNe... function mobilenetv5_300m (line 872) | def mobilenetv5_300m(pretrained: bool = False, **kwargs) -> MobileNetV5: function mobilenetv5_base (line 878) | def mobilenetv5_base(pretrained: bool = False, **kwargs) -> MobileNetV5: FILE: timm/models/mobilevit.py function _inverted_residual_block (line 33) | def _inverted_residual_block(d, c, s, br=4.0): function _mobilevit_block (line 40) | def _mobilevit_block(d, c, s, transformer_dim, transformer_depth, patch_... function _mobilevitv2_block (line 54) | def _mobilevitv2_block(d, c, s, transformer_depth, patch_size=2, br=2.0,... function _mobilevitv2_cfg (line 67) | def _mobilevitv2_cfg(multiplier=1.0): class MobileVitBlock (line 165) | class MobileVitBlock(nn.Module): method __init__ (line 169) | def __init__( method forward (line 238) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LinearSelfAttention (line 281) | class LinearSelfAttention(nn.Module): method __init__ (line 301) | def __init__( method _forward_self_attn (line 331) | def _forward_self_attn(self, x: torch.Tensor) -> torch.Tensor: method _forward_cross_attn (line 356) | def _forward_cross_attn(self, x: torch.Tensor, x_prev: Optional[torch.... method forward (line 398) | def forward(self, x: torch.Tensor, x_prev: Optional[torch.Tensor] = No... class LinearTransformerBlock (line 405) | class LinearTransformerBlock(nn.Module): method __init__ (line 421) | def __init__( method forward (line 451) | def forward(self, x: torch.Tensor, x_prev: Optional[torch.Tensor] = No... class MobileVitV2Block (line 468) | class MobileVitV2Block(nn.Module): method __init__ (line 473) | def __init__( method forward (line 533) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _create_mobilevit (line 575) | def _create_mobilevit(variant, cfg_variant=None, pretrained=False, **kwa... function _create_mobilevit2 (line 583) | def _create_mobilevit2(variant, cfg_variant=None, pretrained=False, **kw... function _cfg (line 591) | def _cfg(url='', **kwargs): function mobilevit_xxs (line 653) | def mobilevit_xxs(pretrained=False, **kwargs) -> ByobNet: function mobilevit_xs (line 658) | def mobilevit_xs(pretrained=False, **kwargs) -> ByobNet: function mobilevit_s (line 663) | def mobilevit_s(pretrained=False, **kwargs) -> ByobNet: function mobilevitv2_050 (line 668) | def mobilevitv2_050(pretrained=False, **kwargs) -> ByobNet: function mobilevitv2_075 (line 673) | def mobilevitv2_075(pretrained=False, **kwargs) -> ByobNet: function mobilevitv2_100 (line 678) | def mobilevitv2_100(pretrained=False, **kwargs) -> ByobNet: function mobilevitv2_125 (line 683) | def mobilevitv2_125(pretrained=False, **kwargs) -> ByobNet: function mobilevitv2_150 (line 688) | def mobilevitv2_150(pretrained=False, **kwargs) -> ByobNet: function mobilevitv2_175 (line 693) | def mobilevitv2_175(pretrained=False, **kwargs) -> ByobNet: function mobilevitv2_200 (line 698) | def mobilevitv2_200(pretrained=False, **kwargs) -> ByobNet: FILE: timm/models/mvitv2.py class MultiScaleVitCfg (line 37) | class MultiScaleVitCfg: method __post_init__ (line 62) | def __post_init__(self): function prod (line 85) | def prod(iterable): class PatchEmbed (line 89) | class PatchEmbed(nn.Module): method __init__ (line 94) | def __init__( method forward (line 116) | def forward(self, x) -> Tuple[torch.Tensor, List[int]]: function reshape_pre_pool (line 123) | def reshape_pre_pool( function reshape_post_pool (line 138) | def reshape_post_pool( function cal_rel_pos_type (line 152) | def cal_rel_pos_type( class MultiScaleAttentionPoolFirst (line 202) | class MultiScaleAttentionPoolFirst(nn.Module): method __init__ (line 203) | def __init__( method forward (line 309) | def forward(self, x, feat_size: List[int]): class MultiScaleAttention (line 378) | class MultiScaleAttention(nn.Module): method __init__ (line 379) | def __init__( method forward (line 483) | def forward(self, x, feat_size: List[int]): class MultiScaleBlock (line 537) | class MultiScaleBlock(nn.Module): method __init__ (line 538) | def __init__( method _shortcut_pool (line 611) | def _shortcut_pool(self, x, feat_size: List[int]): method forward (line 627) | def forward(self, x, feat_size: List[int]): class MultiScaleVitStage (line 641) | class MultiScaleVitStage(nn.Module): method __init__ (line 643) | def __init__( method forward (line 706) | def forward(self, x, feat_size: List[int]): class MultiScaleVit (line 715) | class MultiScaleVit(nn.Module): method __init__ (line 728) | def __init__( method _init_weights (line 831) | def _init_weights(self, m): method no_weight_decay (line 838) | def no_weight_decay(self): method group_matcher (line 843) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 851) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 856) | def get_classifier(self) -> nn.Module: method reset_classifier (line 859) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 870) | def forward_intermediates( method prune_intermediate_layers (line 929) | def prune_intermediate_layers( method forward_features (line 946) | def forward_features(self, x): method forward_head (line 963) | def forward_head(self, x, pre_logits: bool = False): method forward (line 971) | def forward(self, x): function checkpoint_filter_fn (line 977) | def checkpoint_filter_fn(state_dict, model): function _create_mvitv2 (line 1066) | def _create_mvitv2(variant, cfg_variant=None, pretrained=False, **kwargs): function _cfg (line 1079) | def _cfg(url='', **kwargs): function mvitv2_tiny (line 1120) | def mvitv2_tiny(pretrained=False, **kwargs) -> MultiScaleVit: function mvitv2_small (line 1125) | def mvitv2_small(pretrained=False, **kwargs) -> MultiScaleVit: function mvitv2_base (line 1130) | def mvitv2_base(pretrained=False, **kwargs) -> MultiScaleVit: function mvitv2_large (line 1135) | def mvitv2_large(pretrained=False, **kwargs) -> MultiScaleVit: function mvitv2_small_cls (line 1140) | def mvitv2_small_cls(pretrained=False, **kwargs) -> MultiScaleVit: function mvitv2_base_cls (line 1145) | def mvitv2_base_cls(pretrained=False, **kwargs) -> MultiScaleVit: function mvitv2_large_cls (line 1150) | def mvitv2_large_cls(pretrained=False, **kwargs) -> MultiScaleVit: function mvitv2_huge_cls (line 1155) | def mvitv2_huge_cls(pretrained=False, **kwargs) -> MultiScaleVit: FILE: timm/models/naflexvit.py class NaFlexVitCfg (line 59) | class NaFlexVitCfg: function _overlay_kwargs (line 146) | def _overlay_kwargs(cfg: NaFlexVitCfg, **kwargs) -> NaFlexVitCfg: function batch_patchify (line 158) | def batch_patchify( function calculate_naflex_grid_sizes (line 190) | def calculate_naflex_grid_sizes(_coord: torch.Tensor): class NaFlexRopeIterator (line 197) | class NaFlexRopeIterator: method __init__ (line 200) | def __init__( method __iter__ (line 229) | def __iter__(self): method __next__ (line 234) | def __next__(self): function get_block_fn (line 261) | def get_block_fn(cfg: NaFlexVitCfg) -> Callable: class NaFlexEmbeds (line 306) | class NaFlexEmbeds(nn.Module): method __init__ (line 347) | def __init__( method reset_parameters (line 498) | def reset_parameters(self) -> None: method feature_info (line 510) | def feature_info(self, location) -> Dict[str, Any]: method feat_ratio (line 521) | def feat_ratio(self, as_scalar: bool = True) -> Union[int, Tuple[int, ... method dynamic_feat_size (line 535) | def dynamic_feat_size(self, img_size: Tuple[int, int]) -> Tuple[int, i... method _apply_learned_naflex_pos_embed (line 552) | def _apply_learned_naflex_pos_embed( method _apply_learned_naflex_pos_embed_grid_sample (line 609) | def _apply_learned_naflex_pos_embed_grid_sample( method _apply_learned_pos_embed (line 655) | def _apply_learned_pos_embed( method _apply_factorized_naflex_pos_embed (line 691) | def _apply_factorized_naflex_pos_embed( method _apply_factorized_naflex_pos_embed_grid_sample (line 753) | def _apply_factorized_naflex_pos_embed_grid_sample( method _apply_factorized_pos_embed (line 800) | def _apply_factorized_pos_embed( method forward (line 842) | def forward( function create_attention_mask (line 949) | def create_attention_mask( function global_pool_naflex (line 1018) | def global_pool_naflex( class NaFlexVit (line 1090) | class NaFlexVit(nn.Module): method __init__ (line 1103) | def __init__( method fix_init_weight (line 1277) | def fix_init_weight(self) -> None: method init_weights (line 1294) | def init_weights(self, mode: str = '', needs_reset: bool = True) -> None: method load_pretrained (line 1312) | def load_pretrained(self, checkpoint_path: str, prefix: str = '') -> N... method no_weight_decay (line 1338) | def no_weight_decay(self) -> Set: method group_matcher (line 1350) | def group_matcher(self, coarse: bool = False) -> Dict: method set_grad_checkpointing (line 1365) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 1376) | def get_classifier(self) -> nn.Module: method _generate_rope_naflex (line 1385) | def _generate_rope_naflex( method reset_classifier (line 1453) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method _forward_embeds (line 1470) | def _forward_embeds( method forward_intermediates (line 1532) | def forward_intermediates( method forward_features (line 1681) | def forward_features( method _pool (line 1745) | def _pool( method forward_head (line 1775) | def forward_head( method forward (line 1786) | def forward( function _debug_dump_patches (line 1837) | def _debug_dump_patches(x): function get_init_weights_vit (line 1852) | def get_init_weights_vit(mode: str = 'jax', head_bias: float = 0.0, need... function checkpoint_filter_fn (line 1869) | def checkpoint_filter_fn(state_dict: Dict[str, Any], model: NaFlexVit) -... function _cfg (line 1944) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _create_naflexvit (line 1985) | def _create_naflexvit(variant: str, pretrained: bool = False, **kwargs) ... function _create_naflexvit_from_classic (line 2004) | def _create_naflexvit_from_classic( function _create_naflexvit_from_eva (line 2047) | def _create_naflexvit_from_eva( function naflexvit_base_patch16_gap (line 2115) | def naflexvit_base_patch16_gap(pretrained: bool = False, **kwargs) -> Na... function naflexvit_base_patch16_par_gap (line 2133) | def naflexvit_base_patch16_par_gap(pretrained: bool = False, **kwargs) -... function naflexvit_base_patch16_parfac_gap (line 2152) | def naflexvit_base_patch16_parfac_gap(pretrained: bool = False, **kwargs... function naflexvit_base_patch16_map (line 2172) | def naflexvit_base_patch16_map(pretrained: bool = False, **kwargs) -> Na... function naflexvit_so150m2_patch16_reg1_gap (line 2189) | def naflexvit_so150m2_patch16_reg1_gap(pretrained: bool = False, **kwarg... function naflexvit_so150m2_patch16_reg1_map (line 2214) | def naflexvit_so150m2_patch16_reg1_map(pretrained: bool = False, **kwarg... function naflexvit_base_patch16_siglip (line 2238) | def naflexvit_base_patch16_siglip(pretrained: bool = False, **kwargs) ->... function naflexvit_so400m_patch16_siglip (line 2254) | def naflexvit_so400m_patch16_siglip(pretrained: bool = False, **kwargs) ... FILE: timm/models/nasnet.py class ActConvBn (line 19) | class ActConvBn(nn.Module): method __init__ (line 21) | def __init__( method forward (line 38) | def forward(self, x): class SeparableConv2d (line 45) | class SeparableConv2d(nn.Module): method __init__ (line 47) | def __init__( method forward (line 76) | def forward(self, x): class BranchSeparables (line 82) | class BranchSeparables(nn.Module): method __init__ (line 84) | def __init__( method forward (line 107) | def forward(self, x): class CellStem0 (line 117) | class CellStem0(nn.Module): method __init__ (line 118) | def __init__( method forward (line 151) | def forward(self, x): class CellStem1 (line 177) | class CellStem1(nn.Module): method __init__ (line 179) | def __init__( method forward (line 219) | def forward(self, x_conv0, x_stem_0): class FirstCell (line 253) | class FirstCell(nn.Module): method __init__ (line 255) | def __init__( method forward (line 294) | def forward(self, x, x_prev): class NormalCell (line 323) | class NormalCell(nn.Module): method __init__ (line 325) | def __init__( method forward (line 353) | def forward(self, x, x_prev): class ReductionCell0 (line 379) | class ReductionCell0(nn.Module): method __init__ (line 381) | def __init__( method forward (line 410) | def forward(self, x, x_prev): class ReductionCell1 (line 437) | class ReductionCell1(nn.Module): method __init__ (line 439) | def __init__( method forward (line 468) | def forward(self, x, x_prev): class NASNetALarge (line 495) | class NASNetALarge(nn.Module): method __init__ (line 498) | def __init__( method group_matcher (line 620) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 632) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 636) | def get_classifier(self) -> nn.Module: method reset_classifier (line 639) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 644) | def forward_features(self, x): method forward_head (line 675) | def forward_head(self, x, pre_logits: bool = False): method forward (line 680) | def forward(self, x): function _create_nasnet (line 686) | def _create_nasnet(variant, pretrained=False, **kwargs): function nasnetalarge (line 715) | def nasnetalarge(pretrained=False, **kwargs) -> NASNetALarge: FILE: timm/models/nest.py class Attention (line 54) | class Attention(nn.Module): method __init__ (line 61) | def __init__( method forward (line 83) | def forward(self, x): class TransformerLayer (line 108) | class TransformerLayer(nn.Module): method __init__ (line 114) | def __init__( method forward (line 151) | def forward(self, x): class ConvPool (line 158) | class ConvPool(nn.Module): method __init__ (line 159) | def __init__( method forward (line 174) | def forward(self, x): function blockify (line 187) | def blockify(x, block_size: int): function deblockify (line 204) | def deblockify(x, block_size: int): class NestLevel (line 218) | class NestLevel(nn.Module): method __init__ (line 221) | def __init__( method forward (line 271) | def forward(self, x): class Nest (line 288) | class Nest(nn.Module): method __init__ (line 295) | def __init__( method init_weights (line 434) | def init_weights(self, mode=''): method no_weight_decay (line 442) | def no_weight_decay(self): method group_matcher (line 446) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 458) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 463) | def get_classifier(self) -> nn.Module: method reset_classifier (line 466) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_intermediates (line 471) | def forward_intermediates( method prune_intermediate_layers (line 522) | def prune_intermediate_layers( method forward_features (line 538) | def forward_features(self, x): method forward_head (line 545) | def forward_head(self, x, pre_logits: bool = False): method forward (line 550) | def forward(self, x): function _init_nest_weights (line 556) | def _init_nest_weights(module: nn.Module, name: str = '', head_bias: flo... function resize_pos_embed (line 574) | def resize_pos_embed(posemb, posemb_new): function checkpoint_filter_fn (line 591) | def checkpoint_filter_fn(state_dict, model): function _create_nest (line 600) | def _create_nest(variant, pretrained=False, **kwargs): function _cfg (line 613) | def _cfg(url='', **kwargs): function nest_base (line 637) | def nest_base(pretrained=False, **kwargs) -> Nest: function nest_small (line 647) | def nest_small(pretrained=False, **kwargs) -> Nest: function nest_tiny (line 656) | def nest_tiny(pretrained=False, **kwargs) -> Nest: function nest_base_jx (line 665) | def nest_base_jx(pretrained=False, **kwargs) -> Nest: function nest_small_jx (line 676) | def nest_small_jx(pretrained=False, **kwargs) -> Nest: function nest_tiny_jx (line 686) | def nest_tiny_jx(pretrained=False, **kwargs) -> Nest: FILE: timm/models/nextvit.py function merge_pre_bn (line 26) | def merge_pre_bn(module, pre_bn_1, pre_bn_2=None): class ConvNormAct (line 73) | class ConvNormAct(nn.Module): method __init__ (line 74) | def __init__( method forward (line 101) | def forward(self, x): function _make_divisible (line 108) | def _make_divisible(v, divisor, min_value=None): class PatchEmbed (line 118) | class PatchEmbed(nn.Module): method __init__ (line 119) | def __init__( method forward (line 143) | def forward(self, x): class ConvAttention (line 147) | class ConvAttention(nn.Module): method __init__ (line 152) | def __init__( method forward (line 177) | def forward(self, x): class NextConvBlock (line 184) | class NextConvBlock(nn.Module): method __init__ (line 189) | def __init__( method reparameterize (line 232) | def reparameterize(self): method forward (line 238) | def forward(self, x): class EfficientAttention (line 247) | class EfficientAttention(nn.Module): method __init__ (line 253) | def __init__( method forward (line 291) | def forward(self, x): class NextTransformerBlock (line 320) | class NextTransformerBlock(nn.Module): method __init__ (line 325) | def __init__( method reparameterize (line 391) | def reparameterize(self): method forward (line 407) | def forward(self, x): class NextStage (line 425) | class NextStage(nn.Module): method __init__ (line 427) | def __init__( method set_grad_checkpointing (line 488) | def set_grad_checkpointing(self, enable=True): method forward (line 491) | def forward(self, x): class NextViT (line 499) | class NextViT(nn.Module): method __init__ (line 500) | def __init__( method _initialize_weights (line 590) | def _initialize_weights(self): method group_matcher (line 602) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 612) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 618) | def get_classifier(self) -> nn.Module: method reset_classifier (line 621) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 625) | def forward_intermediates( method prune_intermediate_layers (line 678) | def prune_intermediate_layers( method forward_features (line 694) | def forward_features(self, x): method forward_head (line 703) | def forward_head(self, x, pre_logits: bool = False): method forward (line 706) | def forward(self, x): function checkpoint_filter_fn (line 712) | def checkpoint_filter_fn(state_dict, model): function _create_nextvit (line 726) | def _create_nextvit(variant, pretrained=False, **kwargs): function _cfg (line 741) | def _cfg(url='', **kwargs): function nextvit_small (line 801) | def nextvit_small(pretrained=False, **kwargs): function nextvit_base (line 809) | def nextvit_base(pretrained=False, **kwargs): function nextvit_large (line 817) | def nextvit_large(pretrained=False, **kwargs): FILE: timm/models/nfnet.py class NfCfg (line 39) | class NfCfg: class GammaAct (line 64) | class GammaAct(nn.Module): method __init__ (line 67) | def __init__(self, act_type: str = 'relu', gamma: float = 1.0, inplace... method forward (line 80) | def forward(self, x: torch.Tensor) -> torch.Tensor: function act_with_gamma (line 92) | def act_with_gamma(act_type: str, gamma: float = 1.) -> Callable: class DownsampleAvg (line 107) | class DownsampleAvg(nn.Module): method __init__ (line 110) | def __init__( method forward (line 140) | def forward(self, x: torch.Tensor) -> torch.Tensor: class NormFreeBlock (line 153) | class NormFreeBlock(nn.Module): method __init__ (line 157) | def __init__( method forward (line 251) | def forward(self, x: torch.Tensor) -> torch.Tensor: function create_stem (line 285) | def create_stem( class NormFreeNet (line 368) | class NormFreeNet(nn.Module): method __init__ (line 390) | def __init__( method group_matcher (line 523) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 535) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 540) | def get_classifier(self) -> nn.Module: method reset_classifier (line 544) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 554) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 572) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 584) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _nfres_cfg (line 598) | def _nfres_cfg( function _nfreg_cfg (line 634) | def _nfreg_cfg(depths: Tuple[int, ...], channels: Tuple[int, ...] = (48,... function _nfnet_cfg (line 661) | def _nfnet_cfg( function _dm_nfnet_cfg (line 704) | def _dm_nfnet_cfg( function _create_normfreenet (line 805) | def _create_normfreenet(variant: str, pretrained: bool = False, **kwargs... function _dcfg (line 828) | def _dcfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function dm_nfnet_f0 (line 953) | def dm_nfnet_f0(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function dm_nfnet_f1 (line 959) | def dm_nfnet_f1(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function dm_nfnet_f2 (line 965) | def dm_nfnet_f2(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function dm_nfnet_f3 (line 971) | def dm_nfnet_f3(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function dm_nfnet_f4 (line 977) | def dm_nfnet_f4(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function dm_nfnet_f5 (line 983) | def dm_nfnet_f5(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function dm_nfnet_f6 (line 989) | def dm_nfnet_f6(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f0 (line 995) | def nfnet_f0(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f1 (line 1001) | def nfnet_f1(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f2 (line 1007) | def nfnet_f2(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f3 (line 1013) | def nfnet_f3(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f4 (line 1019) | def nfnet_f4(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f5 (line 1025) | def nfnet_f5(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f6 (line 1031) | def nfnet_f6(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_f7 (line 1037) | def nfnet_f7(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nfnet_l0 (line 1043) | def nfnet_l0(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function eca_nfnet_l0 (line 1052) | def eca_nfnet_l0(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function eca_nfnet_l1 (line 1061) | def eca_nfnet_l1(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function eca_nfnet_l2 (line 1070) | def eca_nfnet_l2(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function eca_nfnet_l3 (line 1079) | def eca_nfnet_l3(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_regnet_b0 (line 1088) | def nf_regnet_b0(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_regnet_b1 (line 1095) | def nf_regnet_b1(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_regnet_b2 (line 1102) | def nf_regnet_b2(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_regnet_b3 (line 1109) | def nf_regnet_b3(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_regnet_b4 (line 1116) | def nf_regnet_b4(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_regnet_b5 (line 1123) | def nf_regnet_b5(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_resnet26 (line 1130) | def nf_resnet26(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_resnet50 (line 1137) | def nf_resnet50(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_resnet101 (line 1144) | def nf_resnet101(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_seresnet26 (line 1151) | def nf_seresnet26(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_seresnet50 (line 1157) | def nf_seresnet50(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_seresnet101 (line 1163) | def nf_seresnet101(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_ecaresnet26 (line 1169) | def nf_ecaresnet26(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_ecaresnet50 (line 1175) | def nf_ecaresnet50(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: function nf_ecaresnet101 (line 1181) | def nf_ecaresnet101(pretrained: bool = False, **kwargs: Any) -> NormFree... function test_nfnet (line 1187) | def test_nfnet(pretrained: bool = False, **kwargs: Any) -> NormFreeNet: FILE: timm/models/pit.py class SequentialTuple (line 33) | class SequentialTuple(nn.Sequential): method forward (line 35) | def forward(self, x: Tuple[torch.Tensor, torch.Tensor]) -> Tuple[torch... class Transformer (line 41) | class Transformer(nn.Module): method __init__ (line 42) | def __init__( method forward (line 76) | def forward(self, x: Tuple[torch.Tensor, torch.Tensor]) -> Tuple[torch... class Pooling (line 96) | class Pooling(nn.Module): method __init__ (line 97) | def __init__( method forward (line 121) | def forward(self, x, cls_token) -> Tuple[torch.Tensor, torch.Tensor]: class ConvEmbedding (line 127) | class ConvEmbedding(nn.Module): method __init__ (line 128) | def __init__( method forward (line 158) | def forward(self, x): class PoolingVisionTransformer (line 163) | class PoolingVisionTransformer(nn.Module): method __init__ (line 169) | def __init__( method _init_weights (line 253) | def _init_weights(self, m): method no_weight_decay (line 259) | def no_weight_decay(self): method set_distilled_training (line 263) | def set_distilled_training(self, enable=True): method set_grad_checkpointing (line 267) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 270) | def get_classifier(self) -> nn.Module: method reset_classifier (line 276) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 286) | def forward_intermediates( method prune_intermediate_layers (line 335) | def prune_intermediate_layers( method forward_features (line 351) | def forward_features(self, x): method forward_head (line 359) | def forward_head(self, x, pre_logits: bool = False) -> torch.Tensor: method forward (line 382) | def forward(self, x): function checkpoint_filter_fn (line 388) | def checkpoint_filter_fn(state_dict, model): function _create_pit (line 402) | def _create_pit(variant, pretrained=False, **kwargs): function _cfg (line 417) | def _cfg(url='', **kwargs): function pit_b_224 (line 451) | def pit_b_224(pretrained=False, **kwargs) -> PoolingVisionTransformer: function pit_s_224 (line 464) | def pit_s_224(pretrained=False, **kwargs) -> PoolingVisionTransformer: function pit_xs_224 (line 477) | def pit_xs_224(pretrained=False, **kwargs) -> PoolingVisionTransformer: function pit_ti_224 (line 490) | def pit_ti_224(pretrained=False, **kwargs) -> PoolingVisionTransformer: function pit_b_distilled_224 (line 503) | def pit_b_distilled_224(pretrained=False, **kwargs) -> PoolingVisionTran... function pit_s_distilled_224 (line 517) | def pit_s_distilled_224(pretrained=False, **kwargs) -> PoolingVisionTran... function pit_xs_distilled_224 (line 531) | def pit_xs_distilled_224(pretrained=False, **kwargs) -> PoolingVisionTra... function pit_ti_distilled_224 (line 545) | def pit_ti_distilled_224(pretrained=False, **kwargs) -> PoolingVisionTra... FILE: timm/models/pnasnet.py class SeparableConv2d (line 22) | class SeparableConv2d(nn.Module): method __init__ (line 24) | def __init__( method forward (line 53) | def forward(self, x): class BranchSeparables (line 59) | class BranchSeparables(nn.Module): method __init__ (line 61) | def __init__( method forward (line 96) | def forward(self, x): class ActConvBn (line 106) | class ActConvBn(nn.Module): method __init__ (line 108) | def __init__( method forward (line 131) | def forward(self, x): class FactorizedReduction (line 138) | class FactorizedReduction(nn.Module): method __init__ (line 140) | def __init__( method forward (line 162) | def forward(self, x): class CellBase (line 170) | class CellBase(nn.Module): method cell_forward (line 172) | def cell_forward(self, x_left, x_right): class CellStem0 (line 200) | class CellStem0(CellBase): method __init__ (line 202) | def __init__( method forward (line 242) | def forward(self, x_left): class Cell (line 248) | class Cell(CellBase): method __init__ (line 250) | def __init__( method forward (line 303) | def forward(self, x_left, x_right): class PNASNet5Large (line 310) | class PNASNet5Large(nn.Module): method __init__ (line 311) | def __init__( method group_matcher (line 383) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 387) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 391) | def get_classifier(self) -> nn.Module: method reset_classifier (line 394) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg',... method forward_features (line 400) | def forward_features(self, x): method forward_head (line 419) | def forward_head(self, x, pre_logits: bool = False): method forward (line 424) | def forward(self, x): function _create_pnasnet (line 430) | def _create_pnasnet(variant, pretrained=False, **kwargs): function pnasnet5large (line 458) | def pnasnet5large(pretrained=False, **kwargs) -> PNASNet5Large: FILE: timm/models/pvt_v2.py class MlpWithDepthwiseConv (line 35) | class MlpWithDepthwiseConv(nn.Module): method __init__ (line 36) | def __init__( method forward (line 58) | def forward(self, x, feat_size: List[int]): class Attention (line 72) | class Attention(nn.Module): method __init__ (line 75) | def __init__( method forward (line 118) | def forward(self, x, feat_size: List[int]): class Block (line 154) | class Block(nn.Module): method __init__ (line 156) | def __init__( method forward (line 198) | def forward(self, x, feat_size: List[int]): class OverlapPatchEmbed (line 205) | class OverlapPatchEmbed(nn.Module): method __init__ (line 208) | def __init__( method forward (line 227) | def forward(self, x): class PyramidVisionTransformerStage (line 234) | class PyramidVisionTransformerStage(nn.Module): method __init__ (line 235) | def __init__( method forward (line 285) | def forward(self, x): class PyramidVisionTransformerV2 (line 303) | class PyramidVisionTransformerV2(nn.Module): method __init__ (line 304) | def __init__( method _init_weights (line 379) | def _init_weights(self, m): method freeze_patch_emb (line 391) | def freeze_patch_emb(self): method no_weight_decay (line 395) | def no_weight_decay(self): method group_matcher (line 399) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 407) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 411) | def get_classifier(self) -> nn.Module: method reset_classifier (line 414) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 423) | def forward_intermediates( method prune_intermediate_layers (line 465) | def prune_intermediate_layers( method forward_features (line 479) | def forward_features(self, x): method forward_head (line 484) | def forward_head(self, x, pre_logits: bool = False): method forward (line 490) | def forward(self, x): function checkpoint_filter_fn (line 496) | def checkpoint_filter_fn(state_dict, model): function _create_pvt2 (line 516) | def _create_pvt2(variant, pretrained=False, **kwargs): function _cfg (line 530) | def _cfg(url='', **kwargs): function pvt_v2_b0 (line 553) | def pvt_v2_b0(pretrained=False, **kwargs) -> PyramidVisionTransformerV2: function pvt_v2_b1 (line 559) | def pvt_v2_b1(pretrained=False, **kwargs) -> PyramidVisionTransformerV2: function pvt_v2_b2 (line 565) | def pvt_v2_b2(pretrained=False, **kwargs) -> PyramidVisionTransformerV2: function pvt_v2_b3 (line 571) | def pvt_v2_b3(pretrained=False, **kwargs) -> PyramidVisionTransformerV2: function pvt_v2_b4 (line 577) | def pvt_v2_b4(pretrained=False, **kwargs) -> PyramidVisionTransformerV2: function pvt_v2_b5 (line 583) | def pvt_v2_b5(pretrained=False, **kwargs) -> PyramidVisionTransformerV2: function pvt_v2_b2_li (line 590) | def pvt_v2_b2_li(pretrained=False, **kwargs) -> PyramidVisionTransformerV2: FILE: timm/models/rdnet.py class Block (line 24) | class Block(nn.Module): method __init__ (line 25) | def __init__( method forward (line 45) | def forward(self, x): class BlockESE (line 49) | class BlockESE(nn.Module): method __init__ (line 50) | def __init__( method forward (line 71) | def forward(self, x): function _get_block_type (line 75) | def _get_block_type(block: str): class DenseBlock (line 85) | class DenseBlock(nn.Module): method __init__ (line 86) | def __init__( method forward (line 125) | def forward(self, x: List[torch.Tensor]) -> torch.Tensor: class DenseStage (line 136) | class DenseStage(nn.Sequential): method __init__ (line 137) | def __init__( method forward (line 162) | def forward(self, init_feature: torch.Tensor) -> torch.Tensor: class RDNet (line 170) | class RDNet(nn.Module): method __init__ (line 171) | def __init__( method group_matcher (line 332) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 340) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 345) | def get_classifier(self) -> nn.Module: method reset_classifier (line 348) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 352) | def forward_intermediates( method prune_intermediate_layers (line 403) | def prune_intermediate_layers( method forward_features (line 421) | def forward_features(self, x): method forward_head (line 427) | def forward_head(self, x, pre_logits: bool = False): method forward (line 430) | def forward(self, x): function _init_weights (line 436) | def _init_weights(module, name=None, head_init_scale=1.0): function checkpoint_filter_fn (line 449) | def checkpoint_filter_fn(state_dict, model): function _create_rdnet (line 465) | def _create_rdnet(variant, pretrained=False, **kwargs): function _cfg (line 474) | def _cfg(url='', **kwargs): function rdnet_tiny (line 505) | def rdnet_tiny(pretrained=False, **kwargs): function rdnet_small (line 520) | def rdnet_small(pretrained=False, **kwargs): function rdnet_base (line 535) | def rdnet_base(pretrained=False, **kwargs): function rdnet_large (line 550) | def rdnet_large(pretrained=False, **kwargs): FILE: timm/models/regnet.py class RegNetCfg (line 46) | class RegNetCfg: function quantize_float (line 65) | def quantize_float(f: float, q: int) -> int: function adjust_widths_groups_comp (line 78) | def adjust_widths_groups_comp( function generate_regnet (line 106) | def generate_regnet( function downsample_conv (line 139) | def downsample_conv( function downsample_avg (line 190) | def downsample_avg( function create_shortcut (line 231) | def create_shortcut( class Bottleneck (line 272) | class Bottleneck(nn.Module): method __init__ (line 279) | def __init__( method zero_init_last (line 352) | def zero_init_last(self) -> None: method forward (line 356) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PreBottleneck (line 378) | class PreBottleneck(nn.Module): method __init__ (line 384) | def __init__( method zero_init_last (line 456) | def zero_init_last(self) -> None: method forward (line 460) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RegStage (line 484) | class RegStage(nn.Module): method __init__ (line 490) | def __init__( method forward (line 536) | def forward(self, x: torch.Tensor) -> torch.Tensor: class RegNet (line 553) | class RegNet(nn.Module): method __init__ (line 560) | def __init__( method _get_stage_args (line 649) | def _get_stage_args( method group_matcher (line 706) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 714) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 720) | def get_classifier(self) -> nn.Module: method reset_classifier (line 724) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 734) | def forward_intermediates( method prune_intermediate_layers (line 782) | def prune_intermediate_layers( method forward_features (line 809) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 826) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 838) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _init_weights (line 852) | def _init_weights(module: nn.Module, name: str = '', zero_init_last: boo... function _filter_fn (line 874) | def _filter_fn(state_dict: Dict[str, Any]) -> Dict[str, Any]: function _create_regnet (line 1004) | def _create_regnet(variant: str, pretrained: bool, **kwargs) -> RegNet: function _cfg (line 1022) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _cfgpyc (line 1041) | def _cfgpyc(url: str = '', **kwargs) -> Dict[str, Any]: function _cfgtv2 (line 1060) | def _cfgtv2(url: str = '', **kwargs) -> Dict[str, Any]: function regnetx_002 (line 1264) | def regnetx_002(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_004 (line 1270) | def regnetx_004(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_004_tv (line 1276) | def regnetx_004_tv(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_006 (line 1282) | def regnetx_006(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_008 (line 1288) | def regnetx_008(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_016 (line 1294) | def regnetx_016(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_032 (line 1300) | def regnetx_032(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_040 (line 1306) | def regnetx_040(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_064 (line 1312) | def regnetx_064(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_080 (line 1318) | def regnetx_080(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_120 (line 1324) | def regnetx_120(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_160 (line 1330) | def regnetx_160(pretrained: bool = False, **kwargs) -> RegNet: function regnetx_320 (line 1336) | def regnetx_320(pretrained: bool = False, **kwargs) -> RegNet: function regnety_002 (line 1342) | def regnety_002(pretrained: bool = False, **kwargs) -> RegNet: function regnety_004 (line 1348) | def regnety_004(pretrained: bool = False, **kwargs) -> RegNet: function regnety_006 (line 1354) | def regnety_006(pretrained: bool = False, **kwargs) -> RegNet: function regnety_008 (line 1360) | def regnety_008(pretrained: bool = False, **kwargs) -> RegNet: function regnety_008_tv (line 1366) | def regnety_008_tv(pretrained: bool = False, **kwargs) -> RegNet: function regnety_016 (line 1372) | def regnety_016(pretrained: bool = False, **kwargs) -> RegNet: function regnety_032 (line 1378) | def regnety_032(pretrained: bool = False, **kwargs) -> RegNet: function regnety_040 (line 1384) | def regnety_040(pretrained: bool = False, **kwargs) -> RegNet: function regnety_064 (line 1390) | def regnety_064(pretrained: bool = False, **kwargs) -> RegNet: function regnety_080 (line 1396) | def regnety_080(pretrained: bool = False, **kwargs) -> RegNet: function regnety_080_tv (line 1402) | def regnety_080_tv(pretrained: bool = False, **kwargs) -> RegNet: function regnety_120 (line 1408) | def regnety_120(pretrained: bool = False, **kwargs) -> RegNet: function regnety_160 (line 1414) | def regnety_160(pretrained: bool = False, **kwargs) -> RegNet: function regnety_320 (line 1420) | def regnety_320(pretrained: bool = False, **kwargs) -> RegNet: function regnety_640 (line 1426) | def regnety_640(pretrained: bool = False, **kwargs) -> RegNet: function regnety_1280 (line 1432) | def regnety_1280(pretrained: bool = False, **kwargs) -> RegNet: function regnety_2560 (line 1438) | def regnety_2560(pretrained: bool = False, **kwargs) -> RegNet: function regnety_040_sgn (line 1444) | def regnety_040_sgn(pretrained: bool = False, **kwargs) -> RegNet: function regnetv_040 (line 1450) | def regnetv_040(pretrained: bool = False, **kwargs) -> RegNet: function regnetv_064 (line 1456) | def regnetv_064(pretrained: bool = False, **kwargs) -> RegNet: function regnetz_005 (line 1462) | def regnetz_005(pretrained: bool = False, **kwargs) -> RegNet: function regnetz_040 (line 1471) | def regnetz_040(pretrained: bool = False, **kwargs) -> RegNet: function regnetz_040_h (line 1480) | def regnetz_040_h(pretrained: bool = False, **kwargs) -> RegNet: FILE: timm/models/repghost.py class RepGhostModule (line 29) | class RepGhostModule(nn.Module): method __init__ (line 30) | def __init__( method forward (line 70) | def forward(self, x): method get_equivalent_kernel_bias (line 77) | def get_equivalent_kernel_bias(self): method _pad_1x1_to_3x3_tensor (line 86) | def _pad_1x1_to_3x3_tensor(kernel1x1): method _fuse_bn_tensor (line 93) | def _fuse_bn_tensor(conv, bn, in_channels=None, device=None): method switch_to_deploy (line 115) | def switch_to_deploy(self): method reparameterize (line 136) | def reparameterize(self): class RepGhostBottleneck (line 140) | class RepGhostBottleneck(nn.Module): method __init__ (line 143) | def __init__( method forward (line 207) | def forward(self, x): class RepGhostNet (line 229) | class RepGhostNet(nn.Module): method __init__ (line 230) | def __init__( method group_matcher (line 298) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 309) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 313) | def get_classifier(self) -> nn.Module: method reset_classifier (line 316) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 330) | def forward_intermediates( method prune_intermediate_layers (line 383) | def prune_intermediate_layers( method forward_features (line 399) | def forward_features(self, x): method forward_head (line 409) | def forward_head(self, x, pre_logits: bool = False): method forward (line 418) | def forward(self, x): method convert_to_deploy (line 423) | def convert_to_deploy(self): function repghost_model_convert (line 427) | def repghost_model_convert(model: torch.nn.Module, save_path=None, do_co... function _create_repghostnet (line 441) | def _create_repghostnet(variant, width=1.0, pretrained=False, **kwargs): function _cfg (line 485) | def _cfg(url='', **kwargs): function repghostnet_050 (line 533) | def repghostnet_050(pretrained=False, **kwargs) -> RepGhostNet: function repghostnet_058 (line 540) | def repghostnet_058(pretrained=False, **kwargs) -> RepGhostNet: function repghostnet_080 (line 547) | def repghostnet_080(pretrained=False, **kwargs) -> RepGhostNet: function repghostnet_100 (line 554) | def repghostnet_100(pretrained=False, **kwargs) -> RepGhostNet: function repghostnet_111 (line 561) | def repghostnet_111(pretrained=False, **kwargs) -> RepGhostNet: function repghostnet_130 (line 567) | def repghostnet_130(pretrained=False, **kwargs) -> RepGhostNet: function repghostnet_150 (line 574) | def repghostnet_150(pretrained=False, **kwargs) -> RepGhostNet: function repghostnet_200 (line 581) | def repghostnet_200(pretrained=False, **kwargs) -> RepGhostNet: FILE: timm/models/repvit.py class ConvNorm (line 32) | class ConvNorm(nn.Sequential): method __init__ (line 33) | def __init__( method fuse (line 54) | def fuse(self): class NormLinear (line 74) | class NormLinear(nn.Sequential): method __init__ (line 75) | def __init__( method fuse (line 93) | def fuse(self): class RepVggDw (line 108) | class RepVggDw(nn.Module): method __init__ (line 109) | def __init__( method forward (line 130) | def forward(self, x): method fuse (line 134) | def fuse(self): class RepVitMlp (line 169) | class RepVitMlp(nn.Module): method __init__ (line 170) | def __init__( method forward (line 184) | def forward(self, x): class RepViTBlock (line 188) | class RepViTBlock(nn.Module): method __init__ (line 189) | def __init__( method forward (line 206) | def forward(self, x): class RepVitStem (line 214) | class RepVitStem(nn.Module): method __init__ (line 215) | def __init__( method forward (line 230) | def forward(self, x): class RepVitDownsample (line 234) | class RepVitDownsample(nn.Module): method __init__ (line 235) | def __init__( method forward (line 269) | def forward(self, x): class RepVitClassifier (line 278) | class RepVitClassifier(nn.Module): method __init__ (line 279) | def __init__( method forward (line 298) | def forward(self, x): method fuse (line 311) | def fuse(self): class RepVitStage (line 326) | class RepVitStage(nn.Module): method __init__ (line 327) | def __init__( method forward (line 364) | def forward(self, x): class RepVit (line 370) | class RepVit(nn.Module): method __init__ (line 371) | def __init__( method group_matcher (line 433) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 438) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 442) | def get_classifier(self) -> nn.Module: method reset_classifier (line 445) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_distilled_training (line 453) | def set_distilled_training(self, enable=True): method forward_intermediates (line 456) | def forward_intermediates( method prune_intermediate_layers (line 501) | def prune_intermediate_layers( method forward_features (line 515) | def forward_features(self, x): method forward_head (line 523) | def forward_head(self, x, pre_logits: bool = False): method forward (line 531) | def forward(self, x): method fuse (line 537) | def fuse(self): function _cfg (line 550) | def _cfg(url='', **kwargs): function _create_repvit (line 612) | def _create_repvit(variant, pretrained=False, **kwargs): function repvit_m1 (line 625) | def repvit_m1(pretrained=False, **kwargs): function repvit_m2 (line 634) | def repvit_m2(pretrained=False, **kwargs): function repvit_m3 (line 643) | def repvit_m3(pretrained=False, **kwargs): function repvit_m0_9 (line 652) | def repvit_m0_9(pretrained=False, **kwargs): function repvit_m1_0 (line 661) | def repvit_m1_0(pretrained=False, **kwargs): function repvit_m1_1 (line 670) | def repvit_m1_1(pretrained=False, **kwargs): function repvit_m1_5 (line 679) | def repvit_m1_5(pretrained=False, **kwargs): function repvit_m2_3 (line 688) | def repvit_m2_3(pretrained=False, **kwargs): FILE: timm/models/res2net.py class Bottle2neck (line 19) | class Bottle2neck(nn.Module): method __init__ (line 25) | def __init__( method zero_init_last (line 86) | def zero_init_last(self): method forward (line 90) | def forward(self, x): function _create_res2net (line 131) | def _create_res2net(variant, pretrained=False, **kwargs): function _cfg (line 135) | def _cfg(url='', **kwargs): function res2net50_26w_4s (line 161) | def res2net50_26w_4s(pretrained=False, **kwargs) -> ResNet: function res2net101_26w_4s (line 170) | def res2net101_26w_4s(pretrained=False, **kwargs) -> ResNet: function res2net50_26w_6s (line 179) | def res2net50_26w_6s(pretrained=False, **kwargs) -> ResNet: function res2net50_26w_8s (line 188) | def res2net50_26w_8s(pretrained=False, **kwargs) -> ResNet: function res2net50_48w_2s (line 197) | def res2net50_48w_2s(pretrained=False, **kwargs) -> ResNet: function res2net50_14w_8s (line 206) | def res2net50_14w_8s(pretrained=False, **kwargs) -> ResNet: function res2next50 (line 215) | def res2next50(pretrained=False, **kwargs) -> ResNet: function res2net50d (line 224) | def res2net50d(pretrained=False, **kwargs) -> ResNet: function res2net101d (line 234) | def res2net101d(pretrained=False, **kwargs) -> ResNet: FILE: timm/models/resnest.py class ResNestBottleneck (line 20) | class ResNestBottleneck(nn.Module): method __init__ (line 26) | def __init__( method zero_init_last (line 110) | def zero_init_last(self): method forward (line 114) | def forward(self, x): function _create_resnest (line 146) | def _create_resnest(variant, pretrained=False, **kwargs): function _cfg (line 155) | def _cfg(url='', **kwargs): function resnest14d (line 190) | def resnest14d(pretrained=False, **kwargs) -> ResNet: function resnest26d (line 201) | def resnest26d(pretrained=False, **kwargs) -> ResNet: function resnest50d (line 212) | def resnest50d(pretrained=False, **kwargs) -> ResNet: function resnest101e (line 224) | def resnest101e(pretrained=False, **kwargs) -> ResNet: function resnest200e (line 236) | def resnest200e(pretrained=False, **kwargs) -> ResNet: function resnest269e (line 248) | def resnest269e(pretrained=False, **kwargs) -> ResNet: function resnest50d_4s2x40d (line 260) | def resnest50d_4s2x40d(pretrained=False, **kwargs) -> ResNet: function resnest50d_1s4x24d (line 271) | def resnest50d_1s4x24d(pretrained=False, **kwargs) -> ResNet: FILE: timm/models/resnet.py function get_padding (line 29) | def get_padding(kernel_size: int, stride: int, dilation: int = 1) -> int: class BasicBlock (line 34) | class BasicBlock(nn.Module): method __init__ (line 41) | def __init__( method zero_init_last (line 123) | def zero_init_last(self) -> None: method forward (line 128) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Bottleneck (line 154) | class Bottleneck(nn.Module): method __init__ (line 161) | def __init__( method zero_init_last (line 239) | def zero_init_last(self) -> None: method forward (line 244) | def forward(self, x: torch.Tensor) -> torch.Tensor: function downsample_conv (line 274) | def downsample_conv( function downsample_avg (line 306) | def downsample_avg( function drop_blocks (line 333) | def drop_blocks(drop_prob: float = 0.) -> List[Optional[partial]]: function make_blocks (line 348) | def make_blocks( class ResNet (line 437) | class ResNet(nn.Module): method __init__ (line 469) | def __init__( method init_weights (line 611) | def init_weights(self, zero_init_last: bool = True) -> None: method group_matcher (line 626) | def group_matcher(self, coarse: bool = False) -> Dict[str, str]: method set_grad_checkpointing (line 639) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 648) | def get_classifier(self, name_only: bool = False) -> Union[str, nn.Mod... method reset_classifier (line 659) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg')... method forward_intermediates (line 669) | def forward_intermediates( method prune_intermediate_layers (line 718) | def prune_intermediate_layers( method forward_features (line 743) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 759) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 774) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _create_resnet (line 781) | def _create_resnet(variant: str, pretrained: bool = False, **kwargs) -> ... function _cfg (line 795) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _tcfg (line 808) | def _tcfg(url: str = '', **kwargs) -> Dict[str, Any]: function _ttcfg (line 813) | def _ttcfg(url: str = '', **kwargs) -> Dict[str, Any]: function _rcfg (line 821) | def _rcfg(url: str = '', **kwargs) -> Dict[str, Any]: function _r3cfg (line 829) | def _r3cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _gcfg (line 838) | def _gcfg(url: str = '', **kwargs) -> Dict[str, Any]: function resnet10t (line 1477) | def resnet10t(pretrained: bool = False, **kwargs) -> ResNet: function resnet14t (line 1485) | def resnet14t(pretrained: bool = False, **kwargs) -> ResNet: function resnet18 (line 1493) | def resnet18(pretrained: bool = False, **kwargs) -> ResNet: function resnet18d (line 1501) | def resnet18d(pretrained: bool = False, **kwargs) -> ResNet: function resnet34 (line 1509) | def resnet34(pretrained: bool = False, **kwargs) -> ResNet: function resnet34d (line 1517) | def resnet34d(pretrained: bool = False, **kwargs) -> ResNet: function resnet26 (line 1525) | def resnet26(pretrained: bool = False, **kwargs) -> ResNet: function resnet26t (line 1533) | def resnet26t(pretrained: bool = False, **kwargs) -> ResNet: function resnet26d (line 1541) | def resnet26d(pretrained: bool = False, **kwargs) -> ResNet: function resnet50 (line 1549) | def resnet50(pretrained: bool = False, **kwargs) -> ResNet: function resnet50c (line 1557) | def resnet50c(pretrained: bool = False, **kwargs) -> ResNet: function resnet50d (line 1565) | def resnet50d(pretrained: bool = False, **kwargs) -> ResNet: function resnet50s (line 1573) | def resnet50s(pretrained: bool = False, **kwargs) -> ResNet: function resnet50t (line 1581) | def resnet50t(pretrained: bool = False, **kwargs) -> ResNet: function resnet101 (line 1589) | def resnet101(pretrained: bool = False, **kwargs) -> ResNet: function resnet101c (line 1597) | def resnet101c(pretrained: bool = False, **kwargs) -> ResNet: function resnet101d (line 1605) | def resnet101d(pretrained: bool = False, **kwargs) -> ResNet: function resnet101s (line 1613) | def resnet101s(pretrained: bool = False, **kwargs) -> ResNet: function resnet152 (line 1621) | def resnet152(pretrained: bool = False, **kwargs) -> ResNet: function resnet152c (line 1629) | def resnet152c(pretrained: bool = False, **kwargs) -> ResNet: function resnet152d (line 1637) | def resnet152d(pretrained: bool = False, **kwargs) -> ResNet: function resnet152s (line 1645) | def resnet152s(pretrained: bool = False, **kwargs) -> ResNet: function resnet200 (line 1653) | def resnet200(pretrained: bool = False, **kwargs) -> ResNet: function resnet200d (line 1661) | def resnet200d(pretrained: bool = False, **kwargs) -> ResNet: function wide_resnet50_2 (line 1669) | def wide_resnet50_2(pretrained: bool = False, **kwargs) -> ResNet: function wide_resnet101_2 (line 1681) | def wide_resnet101_2(pretrained: bool = False, **kwargs) -> ResNet: function resnet50_gn (line 1692) | def resnet50_gn(pretrained: bool = False, **kwargs) -> ResNet: function resnext50_32x4d (line 1700) | def resnext50_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function resnext50d_32x4d (line 1708) | def resnext50d_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function resnext101_32x4d (line 1718) | def resnext101_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function resnext101_32x8d (line 1726) | def resnext101_32x8d(pretrained: bool = False, **kwargs) -> ResNet: function resnext101_32x16d (line 1734) | def resnext101_32x16d(pretrained: bool = False, **kwargs) -> ResNet: function resnext101_32x32d (line 1742) | def resnext101_32x32d(pretrained: bool = False, **kwargs) -> ResNet: function resnext101_64x4d (line 1750) | def resnext101_64x4d(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet26t (line 1758) | def ecaresnet26t(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet50d (line 1770) | def ecaresnet50d(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet50d_pruned (line 1780) | def ecaresnet50d_pruned(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet50t (line 1791) | def ecaresnet50t(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnetlight (line 1802) | def ecaresnetlight(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet101d (line 1812) | def ecaresnet101d(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet101d_pruned (line 1822) | def ecaresnet101d_pruned(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet200d (line 1833) | def ecaresnet200d(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnet269d (line 1843) | def ecaresnet269d(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnext26t_32x4d (line 1853) | def ecaresnext26t_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function ecaresnext50t_32x4d (line 1865) | def ecaresnext50t_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function seresnet18 (line 1877) | def seresnet18(pretrained: bool = False, **kwargs) -> ResNet: function seresnet34 (line 1883) | def seresnet34(pretrained: bool = False, **kwargs) -> ResNet: function seresnet50 (line 1889) | def seresnet50(pretrained: bool = False, **kwargs) -> ResNet: function seresnet50t (line 1895) | def seresnet50t(pretrained: bool = False, **kwargs) -> ResNet: function seresnet101 (line 1903) | def seresnet101(pretrained: bool = False, **kwargs) -> ResNet: function seresnet152 (line 1909) | def seresnet152(pretrained: bool = False, **kwargs) -> ResNet: function seresnet152d (line 1915) | def seresnet152d(pretrained: bool = False, **kwargs) -> ResNet: function seresnet200d (line 1923) | def seresnet200d(pretrained: bool = False, **kwargs) -> ResNet: function seresnet269d (line 1933) | def seresnet269d(pretrained: bool = False, **kwargs) -> ResNet: function seresnext26d_32x4d (line 1943) | def seresnext26d_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function seresnext26t_32x4d (line 1955) | def seresnext26t_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function seresnext50_32x4d (line 1967) | def seresnext50_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function seresnext101_32x4d (line 1975) | def seresnext101_32x4d(pretrained: bool = False, **kwargs) -> ResNet: function seresnext101_32x8d (line 1983) | def seresnext101_32x8d(pretrained: bool = False, **kwargs) -> ResNet: function seresnext101d_32x8d (line 1991) | def seresnext101d_32x8d(pretrained: bool = False, **kwargs) -> ResNet: function seresnext101_64x4d (line 2000) | def seresnext101_64x4d(pretrained: bool = False, **kwargs) -> ResNet: function senet154 (line 2008) | def senet154(pretrained: bool = False, **kwargs) -> ResNet: function resnetblur18 (line 2016) | def resnetblur18(pretrained: bool = False, **kwargs) -> ResNet: function resnetblur50 (line 2024) | def resnetblur50(pretrained: bool = False, **kwargs) -> ResNet: function resnetblur50d (line 2032) | def resnetblur50d(pretrained: bool = False, **kwargs) -> ResNet: function resnetblur101d (line 2042) | def resnetblur101d(pretrained: bool = False, **kwargs) -> ResNet: function resnetaa34d (line 2052) | def resnetaa34d(pretrained: bool = False, **kwargs) -> ResNet: function resnetaa50 (line 2061) | def resnetaa50(pretrained: bool = False, **kwargs) -> ResNet: function resnetaa50d (line 2069) | def resnetaa50d(pretrained: bool = False, **kwargs) -> ResNet: function resnetaa101d (line 2079) | def resnetaa101d(pretrained: bool = False, **kwargs) -> ResNet: function seresnetaa50d (line 2089) | def seresnetaa50d(pretrained: bool = False, **kwargs) -> ResNet: function seresnextaa101d_32x8d (line 2099) | def seresnextaa101d_32x8d(pretrained: bool = False, **kwargs) -> ResNet: function seresnextaa201d_32x8d (line 2110) | def seresnextaa201d_32x8d(pretrained: bool = False, **kwargs): function resnetrs50 (line 2121) | def resnetrs50(pretrained: bool = False, **kwargs) -> ResNet: function resnetrs101 (line 2134) | def resnetrs101(pretrained: bool = False, **kwargs) -> ResNet: function resnetrs152 (line 2147) | def resnetrs152(pretrained: bool = False, **kwargs) -> ResNet: function resnetrs200 (line 2160) | def resnetrs200(pretrained: bool = False, **kwargs) -> ResNet: function resnetrs270 (line 2173) | def resnetrs270(pretrained: bool = False, **kwargs) -> ResNet: function resnetrs350 (line 2187) | def resnetrs350(pretrained: bool = False, **kwargs) -> ResNet: function resnetrs420 (line 2200) | def resnetrs420(pretrained: bool = False, **kwargs) -> ResNet: function test_resnet (line 2213) | def test_resnet(pretrained: bool = False, **kwargs) -> ResNet: FILE: timm/models/resnetv2.py class PreActBasic (line 50) | class PreActBasic(nn.Module): method __init__ (line 53) | def __init__( method zero_init_last (line 115) | def zero_init_last(self) -> None: method forward (line 119) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PreActBottleneck (line 142) | class PreActBottleneck(nn.Module): method __init__ (line 151) | def __init__( method zero_init_last (line 215) | def zero_init_last(self) -> None: method forward (line 219) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Bottleneck (line 243) | class Bottleneck(nn.Module): method __init__ (line 246) | def __init__( method zero_init_last (line 295) | def zero_init_last(self) -> None: method forward (line 300) | def forward(self, x: torch.Tensor) -> torch.Tensor: class DownsampleConv (line 326) | class DownsampleConv(nn.Module): method __init__ (line 329) | def __init__( method forward (line 347) | def forward(self, x: torch.Tensor) -> torch.Tensor: class DownsampleAvg (line 359) | class DownsampleAvg(nn.Module): method __init__ (line 362) | def __init__( method forward (line 386) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ResNetStage (line 398) | class ResNetStage(nn.Module): method __init__ (line 400) | def __init__( method forward (line 445) | def forward(self, x: torch.Tensor) -> torch.Tensor: function is_stem_deep (line 461) | def is_stem_deep(stem_type: str) -> bool: function create_resnetv2_stem (line 473) | def create_resnetv2_stem( class ResNetV2 (line 521) | class ResNetV2(nn.Module): method __init__ (line 525) | def __init__( method init_weights (line 642) | def init_weights(self, zero_init_last: bool = True) -> None: method load_pretrained (line 647) | def load_pretrained(self, checkpoint_path: str, prefix: str = 'resnet/... method group_matcher (line 652) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 664) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 670) | def get_classifier(self) -> nn.Module: method reset_classifier (line 674) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 684) | def forward_intermediates( method prune_intermediate_layers (line 741) | def prune_intermediate_layers( method forward_features (line 757) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 771) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 783) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _init_weights (line 797) | def _init_weights(module: nn.Module, name: str = '', zero_init_last: boo... function _load_weights (line 820) | def _load_weights(model: nn.Module, checkpoint_path: str, prefix: str = ... function _create_resnetv2 (line 857) | def _create_resnetv2(variant: str, pretrained: bool = False, **kwargs: A... function _create_resnetv2_bit (line 876) | def _create_resnetv2_bit(variant: str, pretrained: bool = False, **kwarg... function _cfg (line 896) | def _cfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function resnetv2_50x1_bit (line 1009) | def resnetv2_50x1_bit(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_50x3_bit (line 1016) | def resnetv2_50x3_bit(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_101x1_bit (line 1023) | def resnetv2_101x1_bit(pretrained: bool = False, **kwargs: Any) -> ResNe... function resnetv2_101x3_bit (line 1030) | def resnetv2_101x3_bit(pretrained: bool = False, **kwargs: Any) -> ResNe... function resnetv2_152x2_bit (line 1037) | def resnetv2_152x2_bit(pretrained: bool = False, **kwargs: Any) -> ResNe... function resnetv2_152x4_bit (line 1044) | def resnetv2_152x4_bit(pretrained: bool = False, **kwargs: Any) -> ResNe... function resnetv2_18 (line 1051) | def resnetv2_18(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_18d (line 1061) | def resnetv2_18d(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_34 (line 1071) | def resnetv2_34(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_34d (line 1081) | def resnetv2_34d(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_50 (line 1091) | def resnetv2_50(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_50d (line 1098) | def resnetv2_50d(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_50t (line 1107) | def resnetv2_50t(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_101 (line 1116) | def resnetv2_101(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_101d (line 1123) | def resnetv2_101d(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_152 (line 1132) | def resnetv2_152(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_152d (line 1139) | def resnetv2_152d(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_50d_gn (line 1150) | def resnetv2_50d_gn(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_50d_evos (line 1159) | def resnetv2_50d_evos(pretrained: bool = False, **kwargs: Any) -> ResNetV2: function resnetv2_50d_frn (line 1168) | def resnetv2_50d_frn(pretrained: bool = False, **kwargs: Any) -> ResNetV2: FILE: timm/models/rexnet.py class LinearBottleneck (line 34) | class LinearBottleneck(nn.Module): method __init__ (line 40) | def __init__( method feat_channels (line 101) | def feat_channels(self, exp: bool = False) -> int: method forward (line 112) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _block_cfg (line 136) | def _block_cfg( function _build_blocks (line 176) | def _build_blocks( class RexNet (line 243) | class RexNet(nn.Module): method __init__ (line 250) | def __init__( method group_matcher (line 319) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 335) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 344) | def get_classifier(self) -> nn.Module: method reset_classifier (line 352) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 367) | def forward_intermediates( method prune_intermediate_layers (line 415) | def prune_intermediate_layers( method forward_features (line 439) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 455) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 467) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _create_rexnet (line 481) | def _create_rexnet(variant: str, pretrained: bool, **kwargs) -> RexNet: function _cfg (line 502) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function rexnet_100 (line 548) | def rexnet_100(pretrained: bool = False, **kwargs) -> RexNet: function rexnet_130 (line 554) | def rexnet_130(pretrained: bool = False, **kwargs) -> RexNet: function rexnet_150 (line 560) | def rexnet_150(pretrained: bool = False, **kwargs) -> RexNet: function rexnet_200 (line 566) | def rexnet_200(pretrained: bool = False, **kwargs) -> RexNet: function rexnet_300 (line 572) | def rexnet_300(pretrained: bool = False, **kwargs) -> RexNet: function rexnetr_100 (line 578) | def rexnetr_100(pretrained: bool = False, **kwargs) -> RexNet: function rexnetr_130 (line 584) | def rexnetr_130(pretrained: bool = False, **kwargs) -> RexNet: function rexnetr_150 (line 590) | def rexnetr_150(pretrained: bool = False, **kwargs) -> RexNet: function rexnetr_200 (line 596) | def rexnetr_200(pretrained: bool = False, **kwargs) -> RexNet: function rexnetr_300 (line 602) | def rexnetr_300(pretrained: bool = False, **kwargs) -> RexNet: FILE: timm/models/selecsls.py class SequentialList (line 25) | class SequentialList(nn.Sequential): method __init__ (line 27) | def __init__(self, *args): method forward (line 30) | def forward(self, x) -> List[torch.Tensor]: class SelectSeq (line 36) | class SelectSeq(nn.Module): method __init__ (line 37) | def __init__(self, mode='index', index=0): method forward (line 42) | def forward(self, x) -> torch.Tensor: function conv_bn (line 49) | def conv_bn(in_chs, out_chs, k=3, stride=1, padding=None, dilation=1, de... class SelecSlsBlock (line 60) | class SelecSlsBlock(nn.Module): method __init__ (line 61) | def __init__( method forward (line 87) | def forward(self, x: List[torch.Tensor]) -> List[torch.Tensor]: class SelecSls (line 102) | class SelecSls(nn.Module): method __init__ (line 118) | def __init__( method group_matcher (line 153) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 161) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 165) | def get_classifier(self) -> nn.Module: method reset_classifier (line 168) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 178) | def forward_features(self, x): method forward_head (line 184) | def forward_head(self, x, pre_logits: bool = False): method forward (line 189) | def forward(self, x): function _create_selecsls (line 195) | def _create_selecsls(variant, pretrained, **kwargs): function _cfg (line 328) | def _cfg(url='', **kwargs): function selecsls42 (line 358) | def selecsls42(pretrained=False, **kwargs) -> SelecSls: function selecsls42b (line 365) | def selecsls42b(pretrained=False, **kwargs) -> SelecSls: function selecsls60 (line 372) | def selecsls60(pretrained=False, **kwargs) -> SelecSls: function selecsls60b (line 379) | def selecsls60b(pretrained=False, **kwargs) -> SelecSls: function selecsls84 (line 386) | def selecsls84(pretrained=False, **kwargs) -> SelecSls: FILE: timm/models/senet.py function _weight_init (line 30) | def _weight_init(m): class SEModule (line 38) | class SEModule(nn.Module): method __init__ (line 40) | def __init__(self, channels: int, reduction: int, device=None, dtype=N... method forward (line 48) | def forward(self, x): class Bottleneck (line 58) | class Bottleneck(nn.Module): method forward (line 63) | def forward(self, x): class SEBottleneck (line 86) | class SEBottleneck(Bottleneck): method __init__ (line 92) | def __init__( class SEResNetBottleneck (line 126) | class SEResNetBottleneck(Bottleneck): method __init__ (line 134) | def __init__( class SEResNeXtBottleneck (line 159) | class SEResNeXtBottleneck(Bottleneck): method __init__ (line 165) | def __init__( class SEResNetBlock (line 192) | class SEResNetBlock(nn.Module): method __init__ (line 195) | def __init__( method forward (line 217) | def forward(self, x): class SENet (line 237) | class SENet(nn.Module): method __init__ (line 239) | def __init__( method _make_layer (line 385) | def _make_layer(self, block, planes, blocks, groups, reduction, stride=1, method group_matcher (line 405) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 410) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 414) | def get_classifier(self) -> nn.Module: method reset_classifier (line 417) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 422) | def forward_features(self, x): method forward_head (line 431) | def forward_head(self, x, pre_logits: bool = False): method forward (line 437) | def forward(self, x): function _create_senet (line 443) | def _create_senet(variant, pretrained=False, **kwargs): function _cfg (line 447) | def _cfg(url='', **kwargs): function legacy_seresnet18 (line 482) | def legacy_seresnet18(pretrained=False, **kwargs) -> SENet: function legacy_seresnet34 (line 489) | def legacy_seresnet34(pretrained=False, **kwargs) -> SENet: function legacy_seresnet50 (line 496) | def legacy_seresnet50(pretrained=False, **kwargs) -> SENet: function legacy_seresnet101 (line 503) | def legacy_seresnet101(pretrained=False, **kwargs) -> SENet: function legacy_seresnet152 (line 510) | def legacy_seresnet152(pretrained=False, **kwargs) -> SENet: function legacy_senet154 (line 517) | def legacy_senet154(pretrained=False, **kwargs) -> SENet: function legacy_seresnext26_32x4d (line 525) | def legacy_seresnext26_32x4d(pretrained=False, **kwargs) -> SENet: function legacy_seresnext50_32x4d (line 532) | def legacy_seresnext50_32x4d(pretrained=False, **kwargs) -> SENet: function legacy_seresnext101_32x4d (line 539) | def legacy_seresnext101_32x4d(pretrained=False, **kwargs) -> SENet: FILE: timm/models/sequencer.py function _init_weights (line 26) | def _init_weights(module: nn.Module, name: str, head_bias: float = 0., f... class RNNIdentity (line 59) | class RNNIdentity(nn.Module): method __init__ (line 60) | def __init__(self, *args, **kwargs): method forward (line 63) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, None]: class RNN2dBase (line 67) | class RNN2dBase(nn.Module): method __init__ (line 69) | def __init__( method forward (line 129) | def forward(self, x): class LSTM2d (line 164) | class LSTM2d(RNN2dBase): method __init__ (line 166) | def __init__( class Sequencer2dBlock (line 202) | class Sequencer2dBlock(nn.Module): method __init__ (line 203) | def __init__( method forward (line 238) | def forward(self, x): class Shuffle (line 244) | class Shuffle(nn.Module): method __init__ (line 245) | def __init__(self): method forward (line 248) | def forward(self, x): class Downsample2d (line 257) | class Downsample2d(nn.Module): method __init__ (line 258) | def __init__( method forward (line 270) | def forward(self, x): class Sequencer2dStage (line 277) | class Sequencer2dStage(nn.Module): method __init__ (line 278) | def __init__( method forward (line 329) | def forward(self, x): class Sequencer2d (line 335) | class Sequencer2d(nn.Module): method __init__ (line 336) | def __init__( method init_weights (line 427) | def init_weights(self, nlhb=False): method group_matcher (line 432) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 446) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 450) | def get_classifier(self) -> nn.Module: method reset_classifier (line 453) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 457) | def forward_features(self, x): method forward_head (line 463) | def forward_head(self, x, pre_logits: bool = False): method forward (line 466) | def forward(self, x): function checkpoint_filter_fn (line 472) | def checkpoint_filter_fn(state_dict, model): function _create_sequencer2d (line 490) | def _create_sequencer2d(variant, pretrained=False, **kwargs): function _cfg (line 505) | def _cfg(url='', **kwargs): function sequencer2d_s (line 525) | def sequencer2d_s(pretrained=False, **kwargs) -> Sequencer2d: function sequencer2d_m (line 542) | def sequencer2d_m(pretrained=False, **kwargs) -> Sequencer2d: function sequencer2d_l (line 559) | def sequencer2d_l(pretrained=False, **kwargs) -> Sequencer2d: FILE: timm/models/shvit.py class Residual (line 30) | class Residual(nn.Module): method __init__ (line 31) | def __init__(self, m: nn.Module): method forward (line 35) | def forward(self, x: torch.Tensor) -> torch.Tensor: method fuse (line 39) | def fuse(self) -> nn.Module: class Conv2dNorm (line 51) | class Conv2dNorm(nn.Sequential): method __init__ (line 52) | def __init__( method fuse (line 73) | def fuse(self) -> nn.Conv2d: class NormLinear (line 94) | class NormLinear(nn.Sequential): method __init__ (line 95) | def __init__( method fuse (line 113) | def fuse(self) -> nn.Linear: class PatchMerging (line 128) | class PatchMerging(nn.Module): method __init__ (line 129) | def __init__( method forward (line 147) | def forward(self, x: torch.Tensor) -> torch.Tensor: class FFN (line 157) | class FFN(nn.Module): method __init__ (line 158) | def __init__( method forward (line 172) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SHSA (line 179) | class SHSA(nn.Module): method __init__ (line 181) | def __init__( method forward (line 203) | def forward(self, x: torch.Tensor) -> torch.Tensor: class BasicBlock (line 218) | class BasicBlock(nn.Module): method __init__ (line 219) | def __init__( method forward (line 239) | def forward(self, x: torch.Tensor) -> torch.Tensor: class StageBlock (line 246) | class StageBlock(nn.Module): method __init__ (line 247) | def __init__( method forward (line 275) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SHViT (line 284) | class SHViT(nn.Module): method __init__ (line 285) | def __init__( method no_weight_decay (line 346) | def no_weight_decay(self) -> Set: method group_matcher (line 350) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 361) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 366) | def get_classifier(self) -> nn.Module: method reset_classifier (line 369) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_intermediates (line 376) | def forward_intermediates( method prune_intermediate_layers (line 418) | def prune_intermediate_layers( method forward_features (line 432) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 437) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 444) | def forward(self, x: torch.Tensor) -> torch.Tensor: method fuse (line 450) | def fuse(self): function checkpoint_filter_fn (line 463) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _cfg (line 496) | def _cfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function _create_shvit (line 531) | def _create_shvit(variant: str, pretrained: bool = False, **kwargs: Any)... function shvit_s1 (line 542) | def shvit_s1(pretrained: bool = False, **kwargs: Any) -> SHViT: function shvit_s2 (line 549) | def shvit_s2(pretrained: bool = False, **kwargs: Any) -> SHViT: function shvit_s3 (line 556) | def shvit_s3(pretrained: bool = False, **kwargs: Any) -> SHViT: function shvit_s4 (line 563) | def shvit_s4(pretrained: bool = False, **kwargs: Any) -> SHViT: FILE: timm/models/sknet.py class SelectiveKernelBasic (line 23) | class SelectiveKernelBasic(nn.Module): method __init__ (line 26) | def __init__( method zero_init_last (line 81) | def zero_init_last(self): method forward (line 85) | def forward(self, x): class SelectiveKernelBottleneck (line 100) | class SelectiveKernelBottleneck(nn.Module): method __init__ (line 103) | def __init__( method zero_init_last (line 152) | def zero_init_last(self): method forward (line 156) | def forward(self, x): function _create_skresnet (line 172) | def _create_skresnet(variant, pretrained=False, **kwargs): function _cfg (line 181) | def _cfg(url='', **kwargs): function skresnet18 (line 204) | def skresnet18(pretrained=False, **kwargs) -> ResNet: function skresnet34 (line 218) | def skresnet34(pretrained=False, **kwargs) -> ResNet: function skresnet50 (line 232) | def skresnet50(pretrained=False, **kwargs) -> ResNet: function skresnet50d (line 246) | def skresnet50d(pretrained=False, **kwargs) -> ResNet: function skresnext50_32x4d (line 260) | def skresnext50_32x4d(pretrained=False, **kwargs) -> ResNet: FILE: timm/models/starnet.py class ConvBN (line 28) | class ConvBN(nn.Sequential): method __init__ (line 29) | def __init__( class Block (line 51) | class Block(nn.Module): method __init__ (line 52) | def __init__( method forward (line 71) | def forward(self, x: torch.Tensor) -> torch.Tensor: class StarNet (line 81) | class StarNet(nn.Module): method __init__ (line 82) | def __init__( method _init_weights (line 137) | def _init_weights(self, m): method no_weight_decay (line 147) | def no_weight_decay(self) -> Set: method group_matcher (line 151) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 162) | def set_grad_checkpointing(self, enable: bool = True): method get_classifier (line 166) | def get_classifier(self) -> nn.Module: method reset_classifier (line 169) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 181) | def forward_intermediates( method prune_intermediate_layers (line 234) | def prune_intermediate_layers( method forward_features (line 250) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 259) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 266) | def forward(self, x: torch.Tensor) -> torch.Tensor: function checkpoint_filter_fn (line 272) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _cfg (line 276) | def _cfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function _create_starnet (line 312) | def _create_starnet(variant: str, pretrained: bool = False, **kwargs: An... function starnet_s1 (line 323) | def starnet_s1(pretrained: bool = False, **kwargs: Any) -> StarNet: function starnet_s2 (line 329) | def starnet_s2(pretrained: bool = False, **kwargs: Any) -> StarNet: function starnet_s3 (line 335) | def starnet_s3(pretrained: bool = False, **kwargs: Any) -> StarNet: function starnet_s4 (line 341) | def starnet_s4(pretrained: bool = False, **kwargs: Any) -> StarNet: function starnet_s050 (line 348) | def starnet_s050(pretrained: bool = False, **kwargs: Any) -> StarNet: function starnet_s100 (line 354) | def starnet_s100(pretrained: bool = False, **kwargs: Any) -> StarNet: function starnet_s150 (line 360) | def starnet_s150(pretrained: bool = False, **kwargs: Any) -> StarNet: FILE: timm/models/swiftformer.py class LayerScale2d (line 30) | class LayerScale2d(nn.Module): method __init__ (line 31) | def __init__(self, dim: int, init_values: float = 1e-5, inplace: bool ... method forward (line 38) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Embedding (line 42) | class Embedding(nn.Module): method __init__ (line 48) | def __init__( method forward (line 67) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ConvEncoder (line 73) | class ConvEncoder(nn.Module): method __init__ (line 79) | def __init__( method forward (line 101) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Mlp (line 113) | class Mlp(nn.Module): method __init__ (line 119) | def __init__( method forward (line 140) | def forward(self, x: torch.Tensor) -> torch.Tensor: class EfficientAdditiveAttention (line 150) | class EfficientAdditiveAttention(nn.Module): method __init__ (line 156) | def __init__( method forward (line 175) | def forward(self, x: torch.Tensor) -> torch.Tensor: class LocalRepresentation (line 190) | class LocalRepresentation(nn.Module): method __init__ (line 196) | def __init__( method forward (line 217) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Block (line 229) | class Block(nn.Module): method __init__ (line 236) | def __init__( method forward (line 273) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Stage (line 280) | class Stage(nn.Module): method __init__ (line 286) | def __init__( method forward (line 335) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SwiftFormer (line 344) | class SwiftFormer(nn.Module): method __init__ (line 345) | def __init__( method _initialize_weights (line 423) | def _initialize_weights(self): method no_weight_decay (line 435) | def no_weight_decay(self) -> Set: method group_matcher (line 439) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 451) | def set_grad_checkpointing(self, enable: bool = True): method get_classifier (line 456) | def get_classifier(self) -> Tuple[nn.Module, nn.Module]: method reset_classifier (line 459) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_distilled_training (line 468) | def set_distilled_training(self, enable: bool = True): method forward_intermediates (line 471) | def forward_intermediates( method prune_intermediate_layers (line 521) | def prune_intermediate_layers( method forward_features (line 537) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 543) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False): method forward (line 557) | def forward(self, x: torch.Tensor): function checkpoint_filter_fn (line 563) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _cfg (line 589) | def _cfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function _create_swiftformer (line 620) | def _create_swiftformer(variant: str, pretrained: bool = False, **kwargs... function swiftformer_xs (line 631) | def swiftformer_xs(pretrained: bool = False, **kwargs: Any) -> SwiftFormer: function swiftformer_s (line 637) | def swiftformer_s(pretrained: bool = False, **kwargs: Any) -> SwiftFormer: function swiftformer_l1 (line 642) | def swiftformer_l1(pretrained: bool = False, **kwargs: Any) -> SwiftFormer: function swiftformer_l3 (line 648) | def swiftformer_l3(pretrained: bool = False, **kwargs: Any) -> SwiftFormer: FILE: timm/models/swin_transformer.py function window_partition (line 42) | def window_partition( function window_reverse (line 62) | def window_reverse(windows: torch.Tensor, window_size: Tuple[int, int], ... function get_relative_position_index (line 80) | def get_relative_position_index(win_h: int, win_w: int, device=None) -> ... class WindowAttention (line 104) | class WindowAttention(nn.Module): method __init__ (line 111) | def __init__( method reset_parameters (line 165) | def reset_parameters(self) -> None: method _init_buffers (line 170) | def _init_buffers(self) -> None: method set_window_size (line 177) | def set_window_size(self, window_size: Tuple[int, int]) -> None: method _get_rel_pos_bias (line 202) | def _get_rel_pos_bias(self) -> torch.Tensor: method forward (line 208) | def forward(self, x: torch.Tensor, mask: Optional[torch.Tensor] = None... method init_non_persistent_buffers (line 250) | def init_non_persistent_buffers(self) -> None: class SwinTransformerBlock (line 255) | class SwinTransformerBlock(nn.Module): method __init__ (line 261) | def __init__( method reset_parameters (line 338) | def reset_parameters(self) -> None: method _init_buffers (line 342) | def _init_buffers(self) -> None: method get_attn_mask (line 350) | def get_attn_mask( method _calc_window_shift (line 390) | def _calc_window_shift( method set_input_size (line 411) | def set_input_size( method _attn (line 437) | def _attn(self, x): method forward (line 476) | def forward(self, x: torch.Tensor) -> torch.Tensor: method init_non_persistent_buffers (line 492) | def init_non_persistent_buffers(self) -> None: class PatchMerging (line 497) | class PatchMerging(nn.Module): method __init__ (line 503) | def __init__( method forward (line 524) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SwinTransformerStage (line 545) | class SwinTransformerStage(nn.Module): method __init__ (line 551) | def __init__( method set_input_size (line 632) | def set_input_size( method forward (line 657) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SwinTransformer (line 675) | class SwinTransformer(nn.Module): method __init__ (line 682) | def __init__( method init_weights (line 815) | def init_weights(self, mode: str = '', needs_reset: bool = True) -> None: method no_weight_decay (line 829) | def no_weight_decay(self) -> Set[str]: method set_input_size (line 837) | def set_input_size( method group_matcher (line 870) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 882) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 888) | def get_classifier(self) -> nn.Module: method reset_classifier (line 892) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 902) | def forward_intermediates( method prune_intermediate_layers (line 953) | def prune_intermediate_layers( method forward_features (line 977) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 984) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 996) | def forward(self, x: torch.Tensor) -> torch.Tensor: function checkpoint_filter_fn (line 1010) | def checkpoint_filter_fn(state_dict: dict, model: nn.Module) -> Dict[str... function _create_swin_transformer (line 1059) | def _create_swin_transformer(variant: str, pretrained: bool = False, **k... function _cfg (line 1082) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function swin_tiny_patch4_window7_224 (line 1170) | def swin_tiny_patch4_window7_224(pretrained=False, **kwargs) -> SwinTran... function swin_small_patch4_window7_224 (line 1179) | def swin_small_patch4_window7_224(pretrained=False, **kwargs) -> SwinTra... function swin_base_patch4_window7_224 (line 1188) | def swin_base_patch4_window7_224(pretrained=False, **kwargs) -> SwinTran... function swin_base_patch4_window12_384 (line 1197) | def swin_base_patch4_window12_384(pretrained=False, **kwargs) -> SwinTra... function swin_large_patch4_window7_224 (line 1206) | def swin_large_patch4_window7_224(pretrained=False, **kwargs) -> SwinTra... function swin_large_patch4_window12_384 (line 1215) | def swin_large_patch4_window12_384(pretrained=False, **kwargs) -> SwinTr... function swin_s3_tiny_224 (line 1224) | def swin_s3_tiny_224(pretrained=False, **kwargs) -> SwinTransformer: function swin_s3_small_224 (line 1233) | def swin_s3_small_224(pretrained=False, **kwargs) -> SwinTransformer: function swin_s3_base_224 (line 1242) | def swin_s3_base_224(pretrained=False, **kwargs) -> SwinTransformer: FILE: timm/models/swin_transformer_v2.py function window_partition (line 37) | def window_partition( function window_reverse (line 57) | def window_reverse( class WindowAttention (line 79) | class WindowAttention(nn.Module): method __init__ (line 86) | def __init__( method reset_parameters (line 158) | def reset_parameters(self) -> None: method _init_buffers (line 166) | def _init_buffers(self) -> None: method _make_pair_wise_relative_positions (line 176) | def _make_pair_wise_relative_positions( method set_window_size (line 218) | def set_window_size(self, window_size: Tuple[int, int]) -> None: method init_non_persistent_buffers (line 235) | def init_non_persistent_buffers(self) -> None: method forward (line 239) | def forward(self, x: torch.Tensor, mask: Optional[torch.Tensor] = None... class SwinTransformerV2Block (line 291) | class SwinTransformerV2Block(nn.Module): method __init__ (line 298) | def __init__( method get_attn_mask (line 377) | def get_attn_mask( method _calc_window_shift (line 418) | def _calc_window_shift( method set_input_size (line 451) | def set_input_size( method _attn (line 479) | def _attn(self, x: torch.Tensor) -> torch.Tensor: method forward (line 525) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PatchMerging (line 534) | class PatchMerging(nn.Module): method __init__ (line 541) | def __init__( method forward (line 562) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SwinTransformerV2Stage (line 575) | class SwinTransformerV2Stage(nn.Module): method __init__ (line 582) | def __init__( method set_input_size (line 666) | def set_input_size( method forward (line 692) | def forward(self, x: torch.Tensor) -> torch.Tensor: method _init_respostnorm (line 710) | def _init_respostnorm(self) -> None: class SwinTransformerV2 (line 719) | class SwinTransformerV2(nn.Module): method __init__ (line 729) | def __init__( method init_weights (line 851) | def init_weights(self, needs_reset: bool = True) -> None: method _init_weights (line 862) | def _init_weights(self, m: nn.Module, needs_reset: bool = True) -> None: method set_input_size (line 876) | def set_input_size( method no_weight_decay (line 909) | def no_weight_decay(self) -> Set[str]: method group_matcher (line 922) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 941) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 951) | def get_classifier(self) -> nn.Module: method reset_classifier (line 959) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 969) | def forward_intermediates( method prune_intermediate_layers (line 1019) | def prune_intermediate_layers( method forward_features (line 1035) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 1049) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 1061) | def forward(self, x: torch.Tensor) -> torch.Tensor: function checkpoint_filter_fn (line 1075) | def checkpoint_filter_fn(state_dict: Dict[str, torch.Tensor], model: nn.... function _create_swin_transformer_v2 (line 1117) | def _create_swin_transformer_v2(variant: str, pretrained: bool = False, ... function _cfg (line 1139) | def _cfg(url='', **kwargs): function swinv2_tiny_window16_256 (line 1209) | def swinv2_tiny_window16_256(pretrained: bool = False, **kwargs) -> Swin... function swinv2_tiny_window8_256 (line 1217) | def swinv2_tiny_window8_256(pretrained: bool = False, **kwargs) -> SwinT... function swinv2_small_window16_256 (line 1225) | def swinv2_small_window16_256(pretrained: bool = False, **kwargs) -> Swi... function swinv2_small_window8_256 (line 1233) | def swinv2_small_window8_256(pretrained: bool = False, **kwargs) -> Swin... function swinv2_base_window16_256 (line 1241) | def swinv2_base_window16_256(pretrained: bool = False, **kwargs) -> Swin... function swinv2_base_window8_256 (line 1249) | def swinv2_base_window8_256(pretrained: bool = False, **kwargs) -> SwinT... function swinv2_base_window12_192 (line 1257) | def swinv2_base_window12_192(pretrained: bool = False, **kwargs) -> Swin... function swinv2_base_window12to16_192to256 (line 1265) | def swinv2_base_window12to16_192to256(pretrained: bool = False, **kwargs... function swinv2_base_window12to24_192to384 (line 1275) | def swinv2_base_window12to24_192to384(pretrained: bool = False, **kwargs... function swinv2_large_window12_192 (line 1285) | def swinv2_large_window12_192(pretrained: bool = False, **kwargs) -> Swi... function swinv2_large_window12to16_192to256 (line 1293) | def swinv2_large_window12to16_192to256(pretrained: bool = False, **kwarg... function swinv2_large_window12to24_192to384 (line 1303) | def swinv2_large_window12to24_192to384(pretrained: bool = False, **kwarg... FILE: timm/models/swin_transformer_v2_cr.py function bchw_to_bhwc (line 52) | def bchw_to_bhwc(x: torch.Tensor) -> torch.Tensor: function bhwc_to_bchw (line 57) | def bhwc_to_bchw(x: torch.Tensor) -> torch.Tensor: function window_partition (line 62) | def window_partition(x: torch.Tensor, window_size: Tuple[int, int]) -> t... function window_reverse (line 79) | def window_reverse(windows: torch.Tensor, window_size: Tuple[int, int], ... class WindowMultiHeadAttention (line 97) | class WindowMultiHeadAttention(nn.Module): method __init__ (line 110) | def __init__( method reset_parameters (line 158) | def reset_parameters(self) -> None: method _init_buffers (line 163) | def _init_buffers(self) -> None: method _make_pair_wise_relative_positions (line 167) | def _make_pair_wise_relative_positions(self) -> None: method set_window_size (line 180) | def set_window_size(self, window_size: Tuple[int, int]) -> None: method _relative_positional_encodings (line 191) | def _relative_positional_encodings(self) -> torch.Tensor: method forward (line 205) | def forward(self, x: torch.Tensor, mask: Optional[torch.Tensor] = None... method init_non_persistent_buffers (line 240) | def init_non_persistent_buffers(self) -> None: class SwinTransformerV2CrBlock (line 245) | class SwinTransformerV2CrBlock(nn.Module): method __init__ (line 263) | def __init__( method reset_parameters (line 328) | def reset_parameters(self) -> None: method _init_buffers (line 336) | def _init_buffers(self) -> None: method _calc_window_shift (line 344) | def _calc_window_shift( method get_attn_mask (line 361) | def get_attn_mask( method set_input_size (line 396) | def set_input_size(self, feat_size: Tuple[int, int], window_size: Tupl... method _shifted_window_attn (line 416) | def _shifted_window_attn(self, x): method forward (line 458) | def forward(self, x: torch.Tensor) -> torch.Tensor: method init_non_persistent_buffers (line 477) | def init_non_persistent_buffers(self) -> None: class PatchMerging (line 482) | class PatchMerging(nn.Module): method __init__ (line 488) | def __init__( method forward (line 506) | def forward(self, x: torch.Tensor) -> torch.Tensor: class PatchEmbed (line 527) | class PatchEmbed(nn.Module): method __init__ (line 529) | def __init__( method set_input_size (line 563) | def set_input_size(self, img_size: Tuple[int, int]) -> None: method forward (line 575) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SwinTransformerV2CrStage (line 593) | class SwinTransformerV2CrStage(nn.Module): method __init__ (line 613) | def __init__( method set_input_size (line 675) | def set_input_size( method forward (line 694) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SwinTransformerV2Cr (line 713) | class SwinTransformerV2Cr(nn.Module): method __init__ (line 739) | def __init__( method init_weights (line 837) | def init_weights(self, needs_reset: bool = True) -> None: method set_input_size (line 854) | def set_input_size( method group_matcher (line 885) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 895) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 900) | def get_classifier(self) -> nn.Module: method reset_classifier (line 907) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 917) | def forward_intermediates( method prune_intermediate_layers (line 959) | def prune_intermediate_layers( method forward_features (line 973) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 978) | def forward_head(self, x, pre_logits: bool = False): method forward (line 981) | def forward(self, x: torch.Tensor) -> torch.Tensor: function init_weights_swin (line 987) | def init_weights_swin(module: nn.Module, name: str = '', needs_reset: bo... function checkpoint_filter_fn (line 1006) | def checkpoint_filter_fn(state_dict, model): function _create_swin_transformer_v2_cr (line 1023) | def _create_swin_transformer_v2_cr(variant, pretrained=False, **kwargs): function _cfg (line 1036) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function swinv2_cr_tiny_384 (line 1106) | def swinv2_cr_tiny_384(pretrained: bool = False, **kwargs) -> SwinTransf... function swinv2_cr_tiny_224 (line 1117) | def swinv2_cr_tiny_224(pretrained: bool = False, **kwargs) -> SwinTransf... function swinv2_cr_tiny_ns_224 (line 1128) | def swinv2_cr_tiny_ns_224(pretrained: bool = False, **kwargs) -> SwinTra... function swinv2_cr_small_384 (line 1143) | def swinv2_cr_small_384(pretrained: bool = False, **kwargs) -> SwinTrans... function swinv2_cr_small_224 (line 1154) | def swinv2_cr_small_224(pretrained: bool = False, **kwargs) -> SwinTrans... function swinv2_cr_small_ns_224 (line 1165) | def swinv2_cr_small_ns_224(pretrained: bool = False, **kwargs) -> SwinTr... function swinv2_cr_small_ns_256 (line 1177) | def swinv2_cr_small_ns_256(pretrained: bool = False, **kwargs) -> SwinTr... function swinv2_cr_base_384 (line 1189) | def swinv2_cr_base_384(pretrained: bool = False, **kwargs) -> SwinTransf... function swinv2_cr_base_224 (line 1200) | def swinv2_cr_base_224(pretrained: bool = False, **kwargs) -> SwinTransf... function swinv2_cr_base_ns_224 (line 1211) | def swinv2_cr_base_ns_224(pretrained: bool = False, **kwargs) -> SwinTra... function swinv2_cr_large_384 (line 1223) | def swinv2_cr_large_384(pretrained: bool = False, **kwargs) -> SwinTrans... function swinv2_cr_large_224 (line 1234) | def swinv2_cr_large_224(pretrained: bool = False, **kwargs) -> SwinTrans... function swinv2_cr_huge_384 (line 1245) | def swinv2_cr_huge_384(pretrained: bool = False, **kwargs) -> SwinTransf... function swinv2_cr_huge_224 (line 1257) | def swinv2_cr_huge_224(pretrained: bool = False, **kwargs) -> SwinTransf... function swinv2_cr_giant_384 (line 1269) | def swinv2_cr_giant_384(pretrained: bool = False, **kwargs) -> SwinTrans... function swinv2_cr_giant_224 (line 1281) | def swinv2_cr_giant_224(pretrained: bool = False, **kwargs) -> SwinTrans... FILE: timm/models/tiny_vit.py class ConvNorm (line 29) | class ConvNorm(torch.nn.Sequential): method __init__ (line 30) | def __init__( method fuse (line 51) | def fuse(self): class PatchEmbed (line 65) | class PatchEmbed(nn.Module): method __init__ (line 66) | def __init__( method forward (line 81) | def forward(self, x): class MBConv (line 88) | class MBConv(nn.Module): method __init__ (line 89) | def __init__( method forward (line 110) | def forward(self, x): class PatchMerging (line 123) | class PatchMerging(nn.Module): method __init__ (line 124) | def __init__( method forward (line 140) | def forward(self, x): class ConvLayer (line 149) | class ConvLayer(nn.Module): method __init__ (line 150) | def __init__( method forward (line 176) | def forward(self, x): class NormMlp (line 181) | class NormMlp(nn.Module): method __init__ (line 182) | def __init__( method forward (line 204) | def forward(self, x): class Attention (line 214) | class Attention(torch.nn.Module): method __init__ (line 218) | def __init__( method train (line 258) | def train(self, mode=True): method get_attention_biases (line 263) | def get_attention_biases(self, device: torch.device) -> torch.Tensor: method forward (line 272) | def forward(self, x): method reset_parameters (line 297) | def reset_parameters(self) -> None: method _init_buffers (line 302) | def _init_buffers(self) -> None: method init_non_persistent_buffers (line 318) | def init_non_persistent_buffers(self) -> None: class TinyVitBlock (line 323) | class TinyVitBlock(nn.Module): method __init__ (line 338) | def __init__( method forward (line 385) | def forward(self, x): method extra_repr (line 425) | def extra_repr(self) -> str: class TinyVitStage (line 433) | class TinyVitStage(nn.Module): method __init__ (line 450) | def __init__( method forward (line 498) | def forward(self, x): method extra_repr (line 505) | def extra_repr(self) -> str: class TinyVit (line 509) | class TinyVit(nn.Module): method __init__ (line 510) | def __init__( method init_weights (line 601) | def init_weights(self, needs_reset: bool = True): method _init_weights (line 604) | def _init_weights(self, m: nn.Module, needs_reset: bool = True): method no_weight_decay_keywords (line 613) | def no_weight_decay_keywords(self): method no_weight_decay (line 617) | def no_weight_decay(self): method group_matcher (line 621) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 632) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 636) | def get_classifier(self) -> nn.Module: method reset_classifier (line 639) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 643) | def forward_intermediates( method prune_intermediate_layers (line 688) | def prune_intermediate_layers( method forward_features (line 702) | def forward_features(self, x): method forward_head (line 710) | def forward_head(self, x, pre_logits: bool = False): method forward (line 714) | def forward(self, x): function checkpoint_filter_fn (line 720) | def checkpoint_filter_fn(state_dict, model): function _cfg (line 735) | def _cfg(url='', **kwargs): function _create_tiny_vit (line 804) | def _create_tiny_vit(variant, pretrained=False, **kwargs): function tiny_vit_5m_224 (line 818) | def tiny_vit_5m_224(pretrained=False, **kwargs): function tiny_vit_11m_224 (line 831) | def tiny_vit_11m_224(pretrained=False, **kwargs): function tiny_vit_21m_224 (line 844) | def tiny_vit_21m_224(pretrained=False, **kwargs): function tiny_vit_21m_384 (line 857) | def tiny_vit_21m_384(pretrained=False, **kwargs): function tiny_vit_21m_512 (line 870) | def tiny_vit_21m_512(pretrained=False, **kwargs): FILE: timm/models/tnt.py class Attention (line 28) | class Attention(nn.Module): method __init__ (line 32) | def __init__( method forward (line 57) | def forward(self, x): class Block (line 73) | class Block(nn.Module): method __init__ (line 77) | def __init__( method forward (line 151) | def forward(self, pixel_embed, patch_embed): class PixelEmbed (line 172) | class PixelEmbed(nn.Module): method __init__ (line 176) | def __init__( method feat_ratio (line 208) | def feat_ratio(self, as_scalar=True) -> Union[Tuple[int, int], int]: method dynamic_feat_size (line 214) | def dynamic_feat_size(self, img_size: Tuple[int, int]) -> Tuple[int, i... method forward (line 217) | def forward(self, x: torch.Tensor, pixel_pos: torch.Tensor) -> torch.T... class TNT (line 239) | class TNT(nn.Module): method __init__ (line 243) | def __init__( method _init_weights (line 333) | def _init_weights(self, m): method no_weight_decay (line 343) | def no_weight_decay(self): method group_matcher (line 347) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 358) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 362) | def get_classifier(self) -> nn.Module: method reset_classifier (line 365) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 374) | def forward_intermediates( method prune_intermediate_layers (line 447) | def prune_intermediate_layers( method forward_features (line 463) | def forward_features(self, x): method forward_head (line 481) | def forward_head(self, x, pre_logits: bool = False): method forward (line 487) | def forward(self, x): function _cfg (line 493) | def _cfg(url='', **kwargs): function checkpoint_filter_fn (line 524) | def checkpoint_filter_fn(state_dict, model): function _create_tnt (line 561) | def _create_tnt(variant, pretrained=False, **kwargs): function tnt_s_legacy_patch16_224 (line 572) | def tnt_s_legacy_patch16_224(pretrained=False, **kwargs) -> TNT: function tnt_s_patch16_224 (line 581) | def tnt_s_patch16_224(pretrained=False, **kwargs) -> TNT: function tnt_b_patch16_224 (line 590) | def tnt_b_patch16_224(pretrained=False, **kwargs) -> TNT: FILE: timm/models/tresnet.py class BasicBlock (line 24) | class BasicBlock(nn.Module): method __init__ (line 27) | def __init__( method forward (line 61) | def forward(self, x): class Bottleneck (line 75) | class Bottleneck(nn.Module): method __init__ (line 78) | def __init__( method forward (line 116) | def forward(self, x): class TResNet (line 131) | class TResNet(nn.Module): method __init__ (line 132) | def __init__( method _make_layer (line 213) | def _make_layer( method group_matcher (line 253) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 258) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 262) | def get_classifier(self) -> nn.Module: method reset_classifier (line 265) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 269) | def forward_intermediates( method prune_intermediate_layers (line 315) | def prune_intermediate_layers( method forward_features (line 331) | def forward_features(self, x): method forward_head (line 345) | def forward_head(self, x, pre_logits: bool = False): method forward (line 348) | def forward(self, x): function checkpoint_filter_fn (line 354) | def checkpoint_filter_fn(state_dict, model): function _create_tresnet (line 376) | def _create_tresnet(variant, pretrained=False, **kwargs): function _cfg (line 387) | def _cfg(url='', **kwargs): function tresnet_m (line 420) | def tresnet_m(pretrained=False, **kwargs) -> TResNet: function tresnet_l (line 426) | def tresnet_l(pretrained=False, **kwargs) -> TResNet: function tresnet_xl (line 432) | def tresnet_xl(pretrained=False, **kwargs) -> TResNet: function tresnet_v2_l (line 438) | def tresnet_v2_l(pretrained=False, **kwargs) -> TResNet: FILE: timm/models/twins.py class LocallyGroupedAttn (line 36) | class LocallyGroupedAttn(nn.Module): method __init__ (line 41) | def __init__( method forward (line 68) | def forward(self, x, size: Size_): class GlobalSubSampleAttn (line 143) | class GlobalSubSampleAttn(nn.Module): method __init__ (line 148) | def __init__( method forward (line 182) | def forward(self, x, size: Size_): class Block (line 212) | class Block(nn.Module): method __init__ (line 214) | def __init__( method forward (line 250) | def forward(self, x, size: Size_): class PosConv (line 256) | class PosConv(nn.Module): method __init__ (line 258) | def __init__( method forward (line 273) | def forward(self, x, size: Size_): method no_weight_decay (line 282) | def no_weight_decay(self): class PatchEmbed (line 286) | class PatchEmbed(nn.Module): method __init__ (line 290) | def __init__( method forward (line 313) | def forward(self, x) -> Tuple[torch.Tensor, Size_]: class Twins (line 323) | class Twins(nn.Module): method __init__ (line 328) | def __init__( method no_weight_decay (line 405) | def no_weight_decay(self): method group_matcher (line 409) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 424) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 428) | def get_classifier(self) -> nn.Module: method reset_classifier (line 431) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method _init_weights (line 440) | def _init_weights(self, m): method forward_intermediates (line 455) | def forward_intermediates( method prune_intermediate_layers (line 510) | def prune_intermediate_layers( method forward_features (line 526) | def forward_features(self, x): method forward_head (line 541) | def forward_head(self, x, pre_logits: bool = False): method forward (line 547) | def forward(self, x): function _create_twins (line 553) | def _create_twins(variant, pretrained=False, **kwargs): function _cfg (line 563) | def _cfg(url='', **kwargs): function twins_pcpvt_small (line 586) | def twins_pcpvt_small(pretrained=False, **kwargs) -> Twins: function twins_pcpvt_base (line 594) | def twins_pcpvt_base(pretrained=False, **kwargs) -> Twins: function twins_pcpvt_large (line 602) | def twins_pcpvt_large(pretrained=False, **kwargs) -> Twins: function twins_svt_small (line 610) | def twins_svt_small(pretrained=False, **kwargs) -> Twins: function twins_svt_base (line 618) | def twins_svt_base(pretrained=False, **kwargs) -> Twins: function twins_svt_large (line 626) | def twins_svt_large(pretrained=False, **kwargs) -> Twins: FILE: timm/models/vgg.py class ConvMlp (line 32) | class ConvMlp(nn.Module): method __init__ (line 38) | def __init__( method forward (line 71) | def forward(self, x: torch.Tensor) -> torch.Tensor: class VGG (line 92) | class VGG(nn.Module): method __init__ (line 99) | def __init__( method group_matcher (line 182) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 195) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 204) | def get_classifier(self) -> nn.Module: method reset_classifier (line 212) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 222) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 234) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 247) | def forward(self, x: torch.Tensor) -> torch.Tensor: method _initialize_weights (line 260) | def _initialize_weights(self) -> None: function _filter_fn (line 275) | def _filter_fn(state_dict: dict) -> Dict[str, torch.Tensor]: function _create_vgg (line 298) | def _create_vgg(variant: str, pretrained: bool, **kwargs: Any) -> VGG: function _cfg (line 324) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function vgg11 (line 358) | def vgg11(pretrained: bool = False, **kwargs: Any) -> VGG: function vgg11_bn (line 367) | def vgg11_bn(pretrained: bool = False, **kwargs: Any) -> VGG: function vgg13 (line 376) | def vgg13(pretrained: bool = False, **kwargs: Any) -> VGG: function vgg13_bn (line 385) | def vgg13_bn(pretrained: bool = False, **kwargs: Any) -> VGG: function vgg16 (line 394) | def vgg16(pretrained: bool = False, **kwargs: Any) -> VGG: function vgg16_bn (line 403) | def vgg16_bn(pretrained: bool = False, **kwargs: Any) -> VGG: function vgg19 (line 412) | def vgg19(pretrained: bool = False, **kwargs: Any) -> VGG: function vgg19_bn (line 421) | def vgg19_bn(pretrained: bool = False, **kwargs: Any) -> VGG: FILE: timm/models/visformer.py class SpatialMlp (line 24) | class SpatialMlp(nn.Module): method __init__ (line 25) | def __init__( method forward (line 66) | def forward(self, x): class Attention (line 78) | class Attention(nn.Module): method __init__ (line 81) | def __init__( method forward (line 105) | def forward(self, x): class Block (line 127) | class Block(nn.Module): method __init__ (line 128) | def __init__( method forward (line 174) | def forward(self, x): class Visformer (line 181) | class Visformer(nn.Module): method __init__ (line 182) | def __init__( method _init_weights (line 396) | def _init_weights(self, m): method group_matcher (line 410) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 421) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 425) | def get_classifier(self) -> nn.Module: method reset_classifier (line 428) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 435) | def forward_features(self, x): method forward_head (line 471) | def forward_head(self, x, pre_logits: bool = False): method forward (line 476) | def forward(self, x): function _create_visformer (line 482) | def _create_visformer(variant, pretrained=False, default_cfg=None, **kwa... function _cfg (line 489) | def _cfg(url='', **kwargs): function visformer_tiny (line 508) | def visformer_tiny(pretrained=False, **kwargs) -> Visformer: function visformer_small (line 518) | def visformer_small(pretrained=False, **kwargs) -> Visformer: FILE: timm/models/vision_transformer.py function _create_attn (line 92) | def _create_attn( class Block (line 128) | class Block(nn.Module): method __init__ (line 131) | def __init__( method forward (line 206) | def forward( class ResPostBlock (line 217) | class ResPostBlock(nn.Module): method __init__ (line 218) | def __init__( method init_weights (line 275) | def init_weights(self) -> None: method forward (line 281) | def forward( class ParallelScalingBlock (line 292) | class ParallelScalingBlock(nn.Module): method __init__ (line 299) | def __init__( method reset_parameters (line 366) | def reset_parameters(self) -> None: method forward (line 371) | def forward( class DiffParallelScalingBlock (line 423) | class DiffParallelScalingBlock(nn.Module): method __init__ (line 432) | def __init__( method set_lambda_init (line 509) | def set_lambda_init(self, depth: int): method reset_parameters (line 512) | def reset_parameters(self) -> None: method _compute_lambda (line 525) | def _compute_lambda(self) -> torch.Tensor: method forward (line 534) | def forward( class ParallelThingsBlock (line 597) | class ParallelThingsBlock(nn.Module): method __init__ (line 602) | def __init__( method forward (line 665) | def forward( function global_pool_nlc (line 686) | def global_pool_nlc( class VisionTransformer (line 711) | class VisionTransformer(nn.Module): method __init__ (line 719) | def __init__( method fix_init_weight (line 912) | def fix_init_weight(self) -> None: method init_weights (line 920) | def init_weights(self, mode: str = '', needs_reset: bool = True) -> None: method _init_weights (line 943) | def _init_weights(self, m: nn.Module) -> None: method load_pretrained (line 949) | def load_pretrained(self, checkpoint_path: str, prefix: str = '') -> N... method no_weight_decay (line 959) | def no_weight_decay(self) -> Set[str]: method group_matcher (line 964) | def group_matcher(self, coarse: bool = False) -> Dict[str, Union[str, ... method set_grad_checkpointing (line 979) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 990) | def get_classifier(self) -> nn.Module: method reset_classifier (line 994) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method set_input_size (line 1013) | def set_input_size( method _pos_embed (line 1038) | def _pos_embed(self, x: torch.Tensor) -> torch.Tensor: method forward_intermediates (line 1077) | def forward_intermediates( method prune_intermediate_layers (line 1174) | def prune_intermediate_layers( method get_intermediate_layers (line 1199) | def get_intermediate_layers( method forward_features (line 1231) | def forward_features( method pool (line 1255) | def pool(self, x: torch.Tensor, pool_type: Optional[str] = None) -> to... method forward_head (line 1279) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 1294) | def forward( function init_weights_vit_timm (line 1305) | def init_weights_vit_timm(module: nn.Module, name: str = '', needs_reset... function init_weights_vit_jax (line 1323) | def init_weights_vit_jax( function init_weights_vit_moco (line 1355) | def init_weights_vit_moco(module: nn.Module, name: str = '', needs_reset... function init_weights_reset_parameters (line 1378) | def init_weights_reset_parameters(module: nn.Module, name: str = '', nee... function get_init_weights_vit (line 1383) | def get_init_weights_vit(mode: str = 'jax', head_bias: float = 0.0, need... function resize_pos_embed (line 1396) | def resize_pos_embed( function _load_weights (line 1422) | def _load_weights(model: VisionTransformer, checkpoint_path: str, prefix... function _convert_openai_clip (line 1576) | def _convert_openai_clip( function _convert_dinov2 (line 1614) | def _convert_dinov2( function _convert_aimv2 (line 1637) | def _convert_aimv2( function _convert_beit3 (line 1655) | def _convert_beit3(state_dict: dict, model): function checkpoint_filter_fn (line 1715) | def checkpoint_filter_fn( function _cfg (line 1794) | def _cfg(url: str = '', **kwargs) -> Dict[str, Any]: function _create_vision_transformer (line 3038) | def _create_vision_transformer( function vit_tiny_patch16_224 (line 3077) | def vit_tiny_patch16_224(pretrained: bool = False, **kwargs) -> VisionTr... function vit_tiny_patch16_384 (line 3086) | def vit_tiny_patch16_384(pretrained: bool = False, **kwargs) -> VisionTr... function vit_small_patch32_224 (line 3095) | def vit_small_patch32_224(pretrained: bool = False, **kwargs) -> VisionT... function vit_small_patch32_384 (line 3104) | def vit_small_patch32_384(pretrained: bool = False, **kwargs) -> VisionT... function vit_small_patch16_224 (line 3113) | def vit_small_patch16_224(pretrained: bool = False, **kwargs) -> VisionT... function vit_small_patch16_384 (line 3122) | def vit_small_patch16_384(pretrained: bool = False, **kwargs) -> VisionT... function vit_small_patch8_224 (line 3131) | def vit_small_patch8_224(pretrained: bool = False, **kwargs) -> VisionTr... function vit_base_patch32_224 (line 3140) | def vit_base_patch32_224(pretrained: bool = False, **kwargs) -> VisionTr... function vit_base_patch32_384 (line 3150) | def vit_base_patch32_384(pretrained: bool = False, **kwargs) -> VisionTr... function vit_base_patch16_224 (line 3160) | def vit_base_patch16_224(pretrained: bool = False, **kwargs) -> VisionTr... function vit_base_patch16_384 (line 3170) | def vit_base_patch16_384(pretrained: bool = False, **kwargs) -> VisionTr... function vit_base_patch8_224 (line 3180) | def vit_base_patch8_224(pretrained: bool = False, **kwargs) -> VisionTra... function vit_large_patch32_224 (line 3190) | def vit_large_patch32_224(pretrained: bool = False, **kwargs) -> VisionT... function vit_large_patch32_384 (line 3199) | def vit_large_patch32_384(pretrained: bool = False, **kwargs) -> VisionT... function vit_large_patch16_224 (line 3209) | def vit_large_patch16_224(pretrained: bool = False, **kwargs) -> VisionT... function vit_large_patch16_384 (line 3219) | def vit_large_patch16_384(pretrained: bool = False, **kwargs) -> VisionT... function vit_large_patch14_224 (line 3229) | def vit_large_patch14_224(pretrained: bool = False, **kwargs) -> VisionT... function vit_huge_patch14_224 (line 3238) | def vit_huge_patch14_224(pretrained: bool = False, **kwargs) -> VisionTr... function vit_giant_patch14_224 (line 3247) | def vit_giant_patch14_224(pretrained: bool = False, **kwargs) -> VisionT... function vit_gigantic_patch14_224 (line 3256) | def vit_gigantic_patch14_224(pretrained: bool = False, **kwargs) -> Visi... function vit_base_patch16_224_miil (line 3266) | def vit_base_patch16_224_miil(pretrained: bool = False, **kwargs) -> Vis... function vit_medium_patch16_gap_240 (line 3277) | def vit_medium_patch16_gap_240(pretrained: bool = False, **kwargs) -> Vi... function vit_medium_patch16_gap_256 (line 3289) | def vit_medium_patch16_gap_256(pretrained: bool = False, **kwargs) -> Vi... function vit_medium_patch16_gap_384 (line 3301) | def vit_medium_patch16_gap_384(pretrained: bool = False, **kwargs) -> Vi... function vit_betwixt_patch16_gap_256 (line 3313) | def vit_betwixt_patch16_gap_256(pretrained: bool = False, **kwargs) -> V... function vit_base_patch16_gap_224 (line 3325) | def vit_base_patch16_gap_224(pretrained: bool = False, **kwargs) -> Visi... function vit_huge_patch14_gap_224 (line 3336) | def vit_huge_patch14_gap_224(pretrained: bool = False, **kwargs) -> Visi... function vit_huge_patch16_gap_448 (line 3347) | def vit_huge_patch16_gap_448(pretrained: bool = False, **kwargs) -> Visi... function vit_giant_patch16_gap_224 (line 3358) | def vit_giant_patch16_gap_224(pretrained: bool = False, **kwargs) -> Vis... function vit_xsmall_patch16_clip_224 (line 3370) | def vit_xsmall_patch16_clip_224(pretrained: bool = False, **kwargs) -> V... function vit_medium_patch32_clip_224 (line 3379) | def vit_medium_patch32_clip_224(pretrained: bool = False, **kwargs) -> V... function vit_medium_patch16_clip_224 (line 3389) | def vit_medium_patch16_clip_224(pretrained: bool = False, **kwargs) -> V... function vit_betwixt_patch32_clip_224 (line 3398) | def vit_betwixt_patch32_clip_224(pretrained: bool = False, **kwargs) -> ... function vit_base_patch32_clip_224 (line 3408) | def vit_base_patch32_clip_224(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch32_clip_256 (line 3419) | def vit_base_patch32_clip_256(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch32_clip_384 (line 3430) | def vit_base_patch32_clip_384(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch32_clip_448 (line 3441) | def vit_base_patch32_clip_448(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch16_clip_224 (line 3452) | def vit_base_patch16_clip_224(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch16_clip_384 (line 3463) | def vit_base_patch16_clip_384(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch16_plus_clip_240 (line 3474) | def vit_base_patch16_plus_clip_240(pretrained: bool = False, **kwargs) -... function vit_large_patch14_clip_224 (line 3485) | def vit_large_patch14_clip_224(pretrained: bool = False, **kwargs) -> Vi... function vit_large_patch14_clip_336 (line 3496) | def vit_large_patch14_clip_336(pretrained: bool = False, **kwargs) -> Vi... function vit_huge_patch14_clip_224 (line 3507) | def vit_huge_patch14_clip_224(pretrained: bool = False, **kwargs) -> Vis... function vit_huge_patch14_clip_336 (line 3518) | def vit_huge_patch14_clip_336(pretrained: bool = False, **kwargs) -> Vis... function vit_huge_patch14_clip_378 (line 3529) | def vit_huge_patch14_clip_378(pretrained: bool = False, **kwargs) -> Vis... function vit_giant_patch14_clip_224 (line 3540) | def vit_giant_patch14_clip_224(pretrained: bool = False, **kwargs) -> Vi... function vit_gigantic_patch14_clip_224 (line 3554) | def vit_gigantic_patch14_clip_224(pretrained: bool = False, **kwargs) ->... function vit_gigantic_patch14_clip_378 (line 3568) | def vit_gigantic_patch14_clip_378(pretrained: bool = False, **kwargs) ->... function vit_base_patch32_clip_quickgelu_224 (line 3582) | def vit_base_patch32_clip_quickgelu_224(pretrained: bool = False, **kwar... function vit_base_patch16_clip_quickgelu_224 (line 3595) | def vit_base_patch16_clip_quickgelu_224(pretrained: bool = False, **kwar... function vit_large_patch14_clip_quickgelu_224 (line 3608) | def vit_large_patch14_clip_quickgelu_224(pretrained: bool = False, **kwa... function vit_large_patch14_clip_quickgelu_336 (line 3621) | def vit_large_patch14_clip_quickgelu_336(pretrained: bool = False, **kwa... function vit_huge_patch14_clip_quickgelu_224 (line 3634) | def vit_huge_patch14_clip_quickgelu_224(pretrained: bool = False, **kwar... function vit_huge_patch14_clip_quickgelu_378 (line 3647) | def vit_huge_patch14_clip_quickgelu_378(pretrained: bool = False, **kwar... function vit_gigantic_patch14_clip_quickgelu_224 (line 3660) | def vit_gigantic_patch14_clip_quickgelu_224(pretrained: bool = False, **... function vit_base_patch32_plus_256 (line 3675) | def vit_base_patch32_plus_256(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch16_plus_240 (line 3685) | def vit_base_patch16_plus_240(pretrained: bool = False, **kwargs) -> Vis... function vit_base_patch16_rpn_224 (line 3695) | def vit_base_patch16_rpn_224(pretrained: bool = False, **kwargs) -> Visi... function vit_small_patch16_36x1_224 (line 3707) | def vit_small_patch16_36x1_224(pretrained: bool = False, **kwargs) -> Vi... function vit_small_patch16_18x2_224 (line 3719) | def vit_small_patch16_18x2_224(pretrained: bool = False, **kwargs) -> Vi... function vit_base_patch16_18x2_224 (line 3732) | def vit_base_patch16_18x2_224(pretrained: bool = False, **kwargs) -> Vis... function eva_large_patch14_196 (line 3744) | def eva_large_patch14_196(pretrained: bool = False, **kwargs) -> VisionT... function eva_large_patch14_336 (line 3753) | def eva_large_patch14_336(pretrained: bool = False, **kwargs) -> VisionT... function flexivit_small (line 3761) | def flexivit_small(pretrained: bool = False, **kwargs) -> VisionTransfor... function flexivit_base (line 3770) | def flexivit_base(pretrained: bool = False, **kwargs) -> VisionTransformer: function flexivit_large (line 3779) | def flexivit_large(pretrained: bool = False, **kwargs) -> VisionTransfor... function vit_base_patch16_xp_224 (line 3788) | def vit_base_patch16_xp_224(pretrained: bool = False, **kwargs) -> Visio... function vit_large_patch14_xp_224 (line 3801) | def vit_large_patch14_xp_224(pretrained: bool = False, **kwargs) -> Visi... function vit_huge_patch14_xp_224 (line 3814) | def vit_huge_patch14_xp_224(pretrained: bool = False, **kwargs) -> Visio... function vit_small_patch14_dinov2 (line 3827) | def vit_small_patch14_dinov2(pretrained: bool = False, **kwargs) -> Visi... function vit_base_patch14_dinov2 (line 3837) | def vit_base_patch14_dinov2(pretrained: bool = False, **kwargs) -> Visio... function vit_large_patch14_dinov2 (line 3847) | def vit_large_patch14_dinov2(pretrained: bool = False, **kwargs) -> Visi... function vit_giant_patch14_dinov2 (line 3857) | def vit_giant_patch14_dinov2(pretrained: bool = False, **kwargs) -> Visi... function vit_small_patch14_reg4_dinov2 (line 3874) | def vit_small_patch14_reg4_dinov2(pretrained: bool = False, **kwargs) ->... function vit_base_patch14_reg4_dinov2 (line 3887) | def vit_base_patch14_reg4_dinov2(pretrained: bool = False, **kwargs) -> ... function vit_large_patch14_reg4_dinov2 (line 3900) | def vit_large_patch14_reg4_dinov2(pretrained: bool = False, **kwargs) ->... function vit_giant_patch14_reg4_dinov2 (line 3913) | def vit_giant_patch14_reg4_dinov2(pretrained: bool = False, **kwargs) ->... function vit_base_patch32_siglip_256 (line 3930) | def vit_base_patch32_siglip_256(pretrained: bool = False, **kwargs) -> V... function vit_base_patch16_siglip_224 (line 3941) | def vit_base_patch16_siglip_224(pretrained: bool = False, **kwargs) -> V... function vit_base_patch16_siglip_256 (line 3951) | def vit_base_patch16_siglip_256(pretrained: bool = False, **kwargs) -> V... function vit_base_patch16_siglip_384 (line 3961) | def vit_base_patch16_siglip_384(pretrained: bool = False, **kwargs) -> V... function vit_base_patch16_siglip_512 (line 3971) | def vit_base_patch16_siglip_512(pretrained: bool = False, **kwargs) -> V... function vit_large_patch16_siglip_256 (line 3981) | def vit_large_patch16_siglip_256(pretrained: bool = False, **kwargs) -> ... function vit_large_patch16_siglip_384 (line 3991) | def vit_large_patch16_siglip_384(pretrained: bool = False, **kwargs) -> ... function vit_large_patch16_siglip_512 (line 4001) | def vit_large_patch16_siglip_512(pretrained: bool = False, **kwargs) -> ... function vit_so400m_patch14_siglip_224 (line 4012) | def vit_so400m_patch14_siglip_224(pretrained: bool = False, **kwargs) ->... function vit_so400m_patch14_siglip_378 (line 4022) | def vit_so400m_patch14_siglip_378(pretrained: bool = False, **kwargs) ->... function vit_so400m_patch14_siglip_384 (line 4033) | def vit_so400m_patch14_siglip_384(pretrained: bool = False, **kwargs) ->... function vit_so400m_patch16_siglip_256 (line 4043) | def vit_so400m_patch16_siglip_256(pretrained: bool = False, **kwargs) ->... function vit_so400m_patch16_siglip_384 (line 4054) | def vit_so400m_patch16_siglip_384(pretrained: bool = False, **kwargs) ->... function vit_so400m_patch16_siglip_512 (line 4065) | def vit_so400m_patch16_siglip_512(pretrained: bool = False, **kwargs) ->... function vit_giantopt_patch16_siglip_256 (line 4076) | def vit_giantopt_patch16_siglip_256(pretrained: bool = False, **kwargs) ... function vit_giantopt_patch16_siglip_384 (line 4087) | def vit_giantopt_patch16_siglip_384(pretrained: bool = False, **kwargs) ... function vit_base_patch32_siglip_gap_256 (line 4098) | def vit_base_patch32_siglip_gap_256(pretrained: bool = False, **kwargs) ... function vit_base_patch16_siglip_gap_224 (line 4109) | def vit_base_patch16_siglip_gap_224(pretrained: bool = False, **kwargs) ... function vit_base_patch16_siglip_gap_256 (line 4120) | def vit_base_patch16_siglip_gap_256(pretrained: bool = False, **kwargs) ... function vit_base_patch16_siglip_gap_384 (line 4131) | def vit_base_patch16_siglip_gap_384(pretrained: bool = False, **kwargs) ... function vit_base_patch16_siglip_gap_512 (line 4142) | def vit_base_patch16_siglip_gap_512(pretrained: bool = False, **kwargs) ... function vit_large_patch16_siglip_gap_256 (line 4153) | def vit_large_patch16_siglip_gap_256(pretrained: bool = False, **kwargs)... function vit_large_patch16_siglip_gap_384 (line 4164) | def vit_large_patch16_siglip_gap_384(pretrained: bool = False, **kwargs)... function vit_large_patch16_siglip_gap_512 (line 4175) | def vit_large_patch16_siglip_gap_512(pretrained: bool = False, **kwargs)... function vit_so400m_patch14_siglip_gap_224 (line 4186) | def vit_so400m_patch14_siglip_gap_224(pretrained: bool = False, **kwargs... function vit_so400m_patch14_siglip_gap_378 (line 4198) | def vit_so400m_patch14_siglip_gap_378(pretrained: bool = False, **kwargs... function vit_so400m_patch14_siglip_gap_384 (line 4210) | def vit_so400m_patch14_siglip_gap_384(pretrained: bool = False, **kwargs... function vit_so400m_patch14_siglip_gap_448 (line 4222) | def vit_so400m_patch14_siglip_gap_448(pretrained: bool = False, **kwargs... function vit_so400m_patch14_siglip_gap_896 (line 4234) | def vit_so400m_patch14_siglip_gap_896(pretrained: bool = False, **kwargs... function vit_so400m_patch16_siglip_gap_256 (line 4246) | def vit_so400m_patch16_siglip_gap_256(pretrained: bool = False, **kwargs... function vit_so400m_patch16_siglip_gap_384 (line 4258) | def vit_so400m_patch16_siglip_gap_384(pretrained: bool = False, **kwargs... function vit_so400m_patch16_siglip_gap_512 (line 4269) | def vit_so400m_patch16_siglip_gap_512(pretrained: bool = False, **kwargs... function vit_giantopt_patch16_siglip_gap_256 (line 4280) | def vit_giantopt_patch16_siglip_gap_256(pretrained: bool = False, **kwar... function vit_giantopt_patch16_siglip_gap_384 (line 4291) | def vit_giantopt_patch16_siglip_gap_384(pretrained: bool = False, **kwar... function vit_wee_patch16_reg1_gap_256 (line 4302) | def vit_wee_patch16_reg1_gap_256(pretrained: bool = False, **kwargs) -> ... function vit_dwee_patch16_reg1_gap_256 (line 4313) | def vit_dwee_patch16_reg1_gap_256(pretrained: bool = False, **kwargs) ->... function vit_pwee_patch16_reg1_gap_256 (line 4324) | def vit_pwee_patch16_reg1_gap_256(pretrained: bool = False, **kwargs) ->... function vit_dpwee_patch16_reg1_gap_256 (line 4335) | def vit_dpwee_patch16_reg1_gap_256(pretrained: bool = False, **kwargs) -... function vit_little_patch16_reg1_gap_256 (line 4346) | def vit_little_patch16_reg1_gap_256(pretrained: bool = False, **kwargs) ... function vit_dlittle_patch16_reg1_gap_256 (line 4357) | def vit_dlittle_patch16_reg1_gap_256(pretrained: bool = False, **kwargs)... function vit_little_patch16_reg4_gap_256 (line 4368) | def vit_little_patch16_reg4_gap_256(pretrained: bool = False, **kwargs) ... function vit_medium_patch16_reg1_gap_256 (line 4379) | def vit_medium_patch16_reg1_gap_256(pretrained: bool = False, **kwargs) ... function vit_medium_patch16_reg4_gap_256 (line 4390) | def vit_medium_patch16_reg4_gap_256(pretrained: bool = False, **kwargs) ... function vit_mediumd_patch16_reg4_gap_256 (line 4401) | def vit_mediumd_patch16_reg4_gap_256(pretrained: bool = False, **kwargs)... function vit_mediumd_patch16_reg4_gap_384 (line 4412) | def vit_mediumd_patch16_reg4_gap_384(pretrained: bool = False, **kwargs)... function vit_betwixt_patch16_reg1_gap_256 (line 4423) | def vit_betwixt_patch16_reg1_gap_256(pretrained: bool = False, **kwargs)... function vit_betwixt_patch16_reg4_gap_256 (line 4434) | def vit_betwixt_patch16_reg4_gap_256(pretrained: bool = False, **kwargs)... function vit_betwixt_patch16_reg4_gap_384 (line 4445) | def vit_betwixt_patch16_reg4_gap_384(pretrained: bool = False, **kwargs)... function vit_base_patch16_reg4_gap_256 (line 4456) | def vit_base_patch16_reg4_gap_256(pretrained: bool = False, **kwargs) ->... function vit_so150m_patch16_reg4_map_256 (line 4467) | def vit_so150m_patch16_reg4_map_256(pretrained: bool = False, **kwargs) ... function vit_so150m_patch16_reg4_gap_256 (line 4479) | def vit_so150m_patch16_reg4_gap_256(pretrained: bool = False, **kwargs) ... function vit_so150m_patch16_reg4_gap_384 (line 4491) | def vit_so150m_patch16_reg4_gap_384(pretrained: bool = False, **kwargs) ... function vit_so150m2_patch16_reg1_gap_256 (line 4503) | def vit_so150m2_patch16_reg1_gap_256(pretrained: bool = False, **kwargs)... function vit_so150m2_patch16_reg1_gap_384 (line 4515) | def vit_so150m2_patch16_reg1_gap_384(pretrained: bool = False, **kwargs)... function vit_so150m2_patch16_reg1_gap_448 (line 4527) | def vit_so150m2_patch16_reg1_gap_448(pretrained: bool = False, **kwargs)... function vit_intern300m_patch14_448 (line 4539) | def vit_intern300m_patch14_448(pretrained: bool = False, **kwargs) -> Vi... function aimv2_large_patch14_224 (line 4550) | def aimv2_large_patch14_224(pretrained: bool = False, **kwargs) -> Visio... function aimv2_huge_patch14_224 (line 4564) | def aimv2_huge_patch14_224(pretrained: bool = False, **kwargs) -> Vision... function aimv2_1b_patch14_224 (line 4579) | def aimv2_1b_patch14_224(pretrained: bool = False, **kwargs) -> VisionTr... function aimv2_3b_patch14_224 (line 4593) | def aimv2_3b_patch14_224(pretrained: bool = False, **kwargs) -> VisionTr... function aimv2_large_patch14_336 (line 4607) | def aimv2_large_patch14_336(pretrained: bool = False, **kwargs) -> Visio... function aimv2_huge_patch14_336 (line 4621) | def aimv2_huge_patch14_336(pretrained: bool = False, **kwargs) -> Vision... function aimv2_1b_patch14_336 (line 4635) | def aimv2_1b_patch14_336(pretrained: bool = False, **kwargs) -> VisionTr... function aimv2_3b_patch14_336 (line 4649) | def aimv2_3b_patch14_336(pretrained: bool = False, **kwargs) -> VisionTr... function aimv2_large_patch14_448 (line 4663) | def aimv2_large_patch14_448(pretrained: bool = False, **kwargs) -> Visio... function aimv2_huge_patch14_448 (line 4677) | def aimv2_huge_patch14_448(pretrained: bool = False, **kwargs) -> Vision... function aimv2_1b_patch14_448 (line 4691) | def aimv2_1b_patch14_448(pretrained: bool = False, **kwargs) -> VisionTr... function aimv2_3b_patch14_448 (line 4705) | def aimv2_3b_patch14_448(pretrained: bool = False, **kwargs) -> VisionTr... function test_vit (line 4719) | def test_vit(pretrained: bool = False, **kwargs) -> VisionTransformer: function test_vit2 (line 4728) | def test_vit2(pretrained: bool = False, **kwargs) -> VisionTransformer: function test_vit3 (line 4739) | def test_vit3(pretrained: bool = False, **kwargs) -> VisionTransformer: function test_vit4 (line 4750) | def test_vit4(pretrained: bool = False, **kwargs) -> VisionTransformer: function beit3_base_patch16_224 (line 4763) | def beit3_base_patch16_224(pretrained: bool = False, **kwargs) -> Vision... function beit3_large_patch16_224 (line 4777) | def beit3_large_patch16_224(pretrained: bool = False, **kwargs) -> Visio... function beit3_giant_patch14_224 (line 4791) | def beit3_giant_patch14_224(pretrained: bool = False, **kwargs) -> Visio... function beit3_giant_patch14_336 (line 4805) | def beit3_giant_patch14_336(pretrained: bool = False, **kwargs) -> Visio... FILE: timm/models/vision_transformer_hybrid.py class ConvStem (line 32) | class ConvStem(nn.Sequential): method __init__ (line 33) | def __init__( function _dd_from_kwargs (line 75) | def _dd_from_kwargs(**kwargs): function _resnetv2 (line 79) | def _resnetv2(layers=(3, 4, 9), **kwargs): function _convert_mobileclip (line 106) | def _convert_mobileclip(state_dict, model, prefix='image_encoder.model.'): function checkpoint_filter_fn (line 136) | def checkpoint_filter_fn( function _create_vision_transformer_hybrid (line 150) | def _create_vision_transformer_hybrid(variant, backbone, embed_args=None... function _cfg (line 166) | def _cfg(url='', **kwargs): function vit_tiny_r_s16_p8_224 (line 266) | def vit_tiny_r_s16_p8_224(pretrained=False, **kwargs) -> VisionTransformer: function vit_tiny_r_s16_p8_384 (line 277) | def vit_tiny_r_s16_p8_384(pretrained=False, **kwargs) -> VisionTransformer: function vit_small_r26_s32_224 (line 288) | def vit_small_r26_s32_224(pretrained=False, **kwargs) -> VisionTransformer: function vit_small_r26_s32_384 (line 299) | def vit_small_r26_s32_384(pretrained=False, **kwargs) -> VisionTransformer: function vit_base_r26_s32_224 (line 310) | def vit_base_r26_s32_224(pretrained=False, **kwargs) -> VisionTransformer: function vit_base_r50_s16_224 (line 321) | def vit_base_r50_s16_224(pretrained=False, **kwargs) -> VisionTransformer: function vit_base_r50_s16_384 (line 332) | def vit_base_r50_s16_384(pretrained=False, **kwargs) -> VisionTransformer: function vit_large_r50_s32_224 (line 344) | def vit_large_r50_s32_224(pretrained=False, **kwargs) -> VisionTransformer: function vit_large_r50_s32_384 (line 355) | def vit_large_r50_s32_384(pretrained=False, **kwargs) -> VisionTransformer: function vit_small_resnet26d_224 (line 366) | def vit_small_resnet26d_224(pretrained=False, **kwargs) -> VisionTransfo... function vit_small_resnet50d_s16_224 (line 383) | def vit_small_resnet50d_s16_224(pretrained=False, **kwargs) -> VisionTra... function vit_base_resnet26d_224 (line 400) | def vit_base_resnet26d_224(pretrained=False, **kwargs) -> VisionTransfor... function vit_base_resnet50d_224 (line 417) | def vit_base_resnet50d_224(pretrained=False, **kwargs) -> VisionTransfor... function vit_base_mci_224 (line 434) | def vit_base_mci_224(pretrained=False, **kwargs) -> VisionTransformer: FILE: timm/models/vision_transformer_relpos.py class RelPosAttention (line 44) | class RelPosAttention(nn.Module): method __init__ (line 47) | def __init__( method forward (line 76) | def forward(self, x, shared_rel_pos: Optional[torch.Tensor] = None): class RelPosBlock (line 113) | class RelPosBlock(nn.Module): method __init__ (line 115) | def __init__( method forward (line 161) | def forward(self, x, shared_rel_pos: Optional[torch.Tensor] = None): class ResPostRelPosBlock (line 167) | class ResPostRelPosBlock(nn.Module): method __init__ (line 169) | def __init__( method init_weights (line 216) | def init_weights(self): method forward (line 222) | def forward(self, x, shared_rel_pos: Optional[torch.Tensor] = None): class VisionTransformerRelPos (line 228) | class VisionTransformerRelPos(nn.Module): method __init__ (line 238) | def __init__( method fix_init_weight (line 372) | def fix_init_weight(self) -> None: method init_weights (line 380) | def init_weights(self, mode: str = '', needs_reset: bool = True) -> None: method no_weight_decay (line 400) | def no_weight_decay(self): method group_matcher (line 404) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 411) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 415) | def get_classifier(self) -> nn.Module: method reset_classifier (line 418) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 426) | def forward_intermediates( method prune_intermediate_layers (line 494) | def prune_intermediate_layers( method forward_features (line 511) | def forward_features(self, x): method forward_head (line 525) | def forward_head(self, x, pre_logits: bool = False): method forward (line 532) | def forward(self, x): function _create_vision_transformer_relpos (line 538) | def _create_vision_transformer_relpos(variant, pretrained=False, **kwargs): function _cfg (line 548) | def _cfg(url='', **kwargs): function vit_relpos_base_patch32_plus_rpn_256 (line 601) | def vit_relpos_base_patch32_plus_rpn_256(pretrained=False, **kwargs) -> ... function vit_relpos_base_patch16_plus_240 (line 611) | def vit_relpos_base_patch16_plus_240(pretrained=False, **kwargs) -> Visi... function vit_relpos_small_patch16_224 (line 621) | def vit_relpos_small_patch16_224(pretrained=False, **kwargs) -> VisionTr... function vit_relpos_medium_patch16_224 (line 631) | def vit_relpos_medium_patch16_224(pretrained=False, **kwargs) -> VisionT... function vit_relpos_base_patch16_224 (line 642) | def vit_relpos_base_patch16_224(pretrained=False, **kwargs) -> VisionTra... function vit_srelpos_small_patch16_224 (line 653) | def vit_srelpos_small_patch16_224(pretrained=False, **kwargs) -> VisionT... function vit_srelpos_medium_patch16_224 (line 665) | def vit_srelpos_medium_patch16_224(pretrained=False, **kwargs) -> Vision... function vit_relpos_medium_patch16_cls_224 (line 677) | def vit_relpos_medium_patch16_cls_224(pretrained=False, **kwargs) -> Vis... function vit_relpos_base_patch16_cls_224 (line 689) | def vit_relpos_base_patch16_cls_224(pretrained=False, **kwargs) -> Visio... function vit_relpos_base_patch16_clsgap_224 (line 700) | def vit_relpos_base_patch16_clsgap_224(pretrained=False, **kwargs) -> Vi... function vit_relpos_small_patch16_rpn_224 (line 713) | def vit_relpos_small_patch16_rpn_224(pretrained=False, **kwargs) -> Visi... function vit_relpos_medium_patch16_rpn_224 (line 724) | def vit_relpos_medium_patch16_rpn_224(pretrained=False, **kwargs) -> Vis... function vit_relpos_base_patch16_rpn_224 (line 735) | def vit_relpos_base_patch16_rpn_224(pretrained=False, **kwargs) -> Visio... FILE: timm/models/vision_transformer_sam.py function get_rel_pos (line 52) | def get_rel_pos(q_size: int, k_size: int, rel_pos: torch.Tensor) -> torc... function get_decomposed_rel_pos_bias (line 87) | def get_decomposed_rel_pos_bias( class Attention (line 121) | class Attention(nn.Module): method __init__ (line 124) | def __init__( method forward (line 164) | def forward(self, x): class Block (line 205) | class Block(nn.Module): method __init__ (line 207) | def __init__( method forward (line 259) | def forward(self, x): function window_partition (line 284) | def window_partition(x: torch.Tensor, window_size: int) -> Tuple[torch.T... function window_unpartition (line 307) | def window_unpartition( class VisionTransformerSAM (line 330) | class VisionTransformerSAM(nn.Module): method __init__ (line 337) | def __init__( method no_weight_decay (line 542) | def no_weight_decay(self): method group_matcher (line 546) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 553) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 557) | def get_classifier(self) -> nn.Module: method reset_classifier (line 560) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 564) | def forward_intermediates( method prune_intermediate_layers (line 623) | def prune_intermediate_layers( method forward_features (line 640) | def forward_features(self, x): method forward_head (line 655) | def forward_head(self, x, pre_logits: bool = False): method forward (line 658) | def forward(self, x): function checkpoint_filter_fn (line 664) | def checkpoint_filter_fn( function _cfg (line 682) | def _cfg(url='', **kwargs): function _create_vision_transformer (line 721) | def _create_vision_transformer(variant, pretrained=False, **kwargs): function samvit_base_patch16 (line 734) | def samvit_base_patch16(pretrained=False, **kwargs) -> VisionTransformer... function samvit_large_patch16 (line 747) | def samvit_large_patch16(pretrained=False, **kwargs) -> VisionTransforme... function samvit_huge_patch16 (line 760) | def samvit_huge_patch16(pretrained=False, **kwargs) -> VisionTransformer... function samvit_base_patch16_224 (line 773) | def samvit_base_patch16_224(pretrained=False, **kwargs) -> VisionTransfo... FILE: timm/models/vitamin.py class VitConvCfg (line 40) | class VitConvCfg: class VitCfg (line 57) | class VitCfg: function _init_conv (line 65) | def _init_conv(module, name, scheme=''): class Stem (line 74) | class Stem(nn.Module): method __init__ (line 75) | def __init__( method forward (line 97) | def forward(self, x): class Downsample2d (line 104) | class Downsample2d(nn.Module): method __init__ (line 105) | def __init__( method forward (line 123) | def forward(self, x): class StridedConv (line 129) | class StridedConv(nn.Module): method __init__ (line 132) | def __init__( method forward (line 149) | def forward(self, x): class MbConvLNBlock (line 155) | class MbConvLNBlock(nn.Module): method __init__ (line 158) | def __init__( method init_weights (line 196) | def init_weights(self, scheme=''): method forward (line 199) | def forward(self, x): class MbConvStages (line 220) | class MbConvStages(nn.Module): method __init__ (line 223) | def __init__( method forward (line 264) | def forward(self, x): class GeGluMlp (line 274) | class GeGluMlp(nn.Module): method __init__ (line 275) | def __init__( method forward (line 296) | def forward(self, x): function _create_vitamin (line 303) | def _create_vitamin(variant, pretrained=False, embed_cfg=None, **kwargs): function _cfg (line 321) | def _cfg(url='', **kwargs): function vitamin_small_224 (line 377) | def vitamin_small_224(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_base_224 (line 397) | def vitamin_base_224(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large_224 (line 416) | def vitamin_large_224(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large_256 (line 436) | def vitamin_large_256(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large_336 (line 455) | def vitamin_large_336(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large_384 (line 475) | def vitamin_large_384(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large2_224 (line 494) | def vitamin_large2_224(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large2_256 (line 514) | def vitamin_large2_256(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large2_336 (line 533) | def vitamin_large2_336(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_large2_384 (line 553) | def vitamin_large2_384(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_xlarge_256 (line 572) | def vitamin_xlarge_256(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_xlarge_336 (line 592) | def vitamin_xlarge_336(pretrained=False, **kwargs) -> VisionTransformer: function vitamin_xlarge_384 (line 611) | def vitamin_xlarge_384(pretrained=False, **kwargs) -> VisionTransformer: FILE: timm/models/volo.py class OutlookAttention (line 39) | class OutlookAttention(nn.Module): method __init__ (line 42) | def __init__( method forward (line 86) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Outlooker (line 121) | class Outlooker(nn.Module): method __init__ (line 124) | def __init__( method forward (line 179) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Attention (line 193) | class Attention(nn.Module): method __init__ (line 197) | def __init__( method forward (line 228) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Transformer (line 261) | class Transformer(nn.Module): method __init__ (line 264) | def __init__( method forward (line 299) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ClassAttention (line 313) | class ClassAttention(nn.Module): method __init__ (line 316) | def __init__( method forward (line 353) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ClassBlock (line 378) | class ClassBlock(nn.Module): method __init__ (line 381) | def __init__( method forward (line 434) | def forward(self, x: torch.Tensor) -> torch.Tensor: function get_block (line 449) | def get_block(block_type: str, **kwargs: Any) -> nn.Module: function rand_bbox (line 465) | def rand_bbox(size: Tuple[int, ...], lam: float, scale: int = 1) -> Tupl... class PatchEmbed (line 498) | class PatchEmbed(nn.Module): method __init__ (line 501) | def __init__( method forward (line 553) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Downsample (line 568) | class Downsample(nn.Module): method __init__ (line 571) | def __init__( method forward (line 590) | def forward(self, x: torch.Tensor) -> torch.Tensor: function outlooker_blocks (line 605) | def outlooker_blocks( function transformer_blocks (line 663) | def transformer_blocks( class VOLO (line 708) | class VOLO(nn.Module): method __init__ (line 711) | def __init__( method _init_weights (line 878) | def _init_weights(self, m: nn.Module) -> None: method no_weight_decay (line 890) | def no_weight_decay(self) -> set: method group_matcher (line 899) | def group_matcher(self, coarse: bool = False) -> Dict[str, Any]: method set_grad_checkpointing (line 922) | def set_grad_checkpointing(self, enable: bool = True) -> None: method get_classifier (line 931) | def get_classifier(self) -> nn.Module: method reset_classifier (line 939) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_tokens (line 957) | def forward_tokens(self, x: torch.Tensor) -> torch.Tensor: method forward_cls (line 980) | def forward_cls(self, x: torch.Tensor) -> torch.Tensor: method forward_train (line 999) | def forward_train(self, x: torch.Tensor) -> Union[torch.Tensor, Tuple[... method forward_intermediates (line 1060) | def forward_intermediates( method prune_intermediate_layers (line 1125) | def prune_intermediate_layers( method forward_features (line 1153) | def forward_features(self, x: torch.Tensor) -> torch.Tensor: method forward_head (line 1173) | def forward_head(self, x: torch.Tensor, pre_logits: bool = False) -> t... method forward (line 1199) | def forward(self, x: torch.Tensor) -> torch.Tensor: function _create_volo (line 1214) | def _create_volo(variant: str, pretrained: bool = False, **kwargs: Any) ... function _cfg (line 1235) | def _cfg(url: str = '', **kwargs: Any) -> Dict[str, Any]: function volo_d1_224 (line 1305) | def volo_d1_224(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d1_384 (line 1313) | def volo_d1_384(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d2_224 (line 1321) | def volo_d2_224(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d2_384 (line 1329) | def volo_d2_384(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d3_224 (line 1337) | def volo_d3_224(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d3_448 (line 1345) | def volo_d3_448(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d4_224 (line 1353) | def volo_d4_224(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d4_448 (line 1361) | def volo_d4_448(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d5_224 (line 1369) | def volo_d5_224(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d5_448 (line 1382) | def volo_d5_448(pretrained: bool = False, **kwargs: Any) -> VOLO: function volo_d5_512 (line 1395) | def volo_d5_512(pretrained: bool = False, **kwargs: Any) -> VOLO: FILE: timm/models/vovnet.py class SequentialAppendList (line 30) | class SequentialAppendList(nn.Sequential): method __init__ (line 31) | def __init__(self, *args, **kwargs): method forward (line 34) | def forward(self, x: torch.Tensor, concat_list: List[torch.Tensor]) ->... class OsaBlock (line 44) | class OsaBlock(nn.Module): method __init__ (line 46) | def __init__( method forward (line 93) | def forward(self, x): class OsaStage (line 108) | class OsaStage(nn.Module): method __init__ (line 110) | def __init__( method forward (line 159) | def forward(self, x): class VovNet (line 169) | class VovNet(nn.Module): method __init__ (line 171) | def __init__( method group_matcher (line 260) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 267) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 272) | def get_classifier(self) -> nn.Module: method reset_classifier (line 275) | def reset_classifier(self, num_classes, global_pool: Optional[str] = N... method forward_intermediates (line 279) | def forward_intermediates( method prune_intermediate_layers (line 326) | def prune_intermediate_layers( method forward_features (line 340) | def forward_features(self, x): method forward_head (line 344) | def forward_head(self, x, pre_logits: bool = False): method forward (line 347) | def forward(self, x): function _create_vovnet (line 464) | def _create_vovnet(variant, pretrained=False, **kwargs): function _cfg (line 475) | def _cfg(url='', **kwargs): function vovnet39a (line 509) | def vovnet39a(pretrained=False, **kwargs) -> VovNet: function vovnet57a (line 514) | def vovnet57a(pretrained=False, **kwargs) -> VovNet: function ese_vovnet19b_slim_dw (line 519) | def ese_vovnet19b_slim_dw(pretrained=False, **kwargs) -> VovNet: function ese_vovnet19b_dw (line 524) | def ese_vovnet19b_dw(pretrained=False, **kwargs) -> VovNet: function ese_vovnet19b_slim (line 529) | def ese_vovnet19b_slim(pretrained=False, **kwargs) -> VovNet: function ese_vovnet39b (line 534) | def ese_vovnet39b(pretrained=False, **kwargs) -> VovNet: function ese_vovnet57b (line 539) | def ese_vovnet57b(pretrained=False, **kwargs) -> VovNet: function ese_vovnet99b (line 544) | def ese_vovnet99b(pretrained=False, **kwargs) -> VovNet: function eca_vovnet39b (line 549) | def eca_vovnet39b(pretrained=False, **kwargs) -> VovNet: function ese_vovnet39b_evos (line 556) | def ese_vovnet39b_evos(pretrained=False, **kwargs) -> VovNet: FILE: timm/models/xception.py class SeparableConv2d (line 36) | class SeparableConv2d(nn.Module): method __init__ (line 37) | def __init__( method forward (line 64) | def forward(self, x): class Block (line 70) | class Block(nn.Module): method __init__ (line 71) | def __init__( method forward (line 112) | def forward(self, inp): class Xception (line 125) | class Xception(nn.Module): method __init__ (line 131) | def __init__( method group_matcher (line 202) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 212) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 216) | def get_classifier(self) -> nn.Module: method reset_classifier (line 219) | def reset_classifier(self, num_classes: int, global_pool: str = 'avg'): method forward_features (line 223) | def forward_features(self, x): method forward_head (line 254) | def forward_head(self, x, pre_logits: bool = False): method forward (line 260) | def forward(self, x): function _xception (line 266) | def _xception(variant, pretrained=False, **kwargs): function legacy_xception (line 292) | def legacy_xception(pretrained=False, **kwargs) -> Xception: FILE: timm/models/xception_aligned.py class SeparableConv2d (line 24) | class SeparableConv2d(nn.Module): method __init__ (line 25) | def __init__( method forward (line 62) | def forward(self, x): class PreSeparableConv2d (line 72) | class PreSeparableConv2d(nn.Module): method __init__ (line 73) | def __init__( method forward (line 109) | def forward(self, x): class XceptionModule (line 116) | class XceptionModule(nn.Module): method __init__ (line 117) | def __init__( method forward (line 171) | def forward(self, x): class PreXceptionModule (line 183) | class PreXceptionModule(nn.Module): method __init__ (line 184) | def __init__( method forward (line 228) | def forward(self, x): class XceptionAligned (line 239) | class XceptionAligned(nn.Module): method __init__ (line 243) | def __init__( method group_matcher (line 310) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 317) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 321) | def get_classifier(self) -> nn.Module: method reset_classifier (line 324) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_features (line 328) | def forward_features(self, x): method forward_head (line 337) | def forward_head(self, x, pre_logits: bool = False): method forward (line 340) | def forward(self, x): function _xception (line 346) | def _xception(variant, pretrained=False, **kwargs): function _cfg (line 356) | def _cfg(url='', **kwargs): function xception41 (line 389) | def xception41(pretrained=False, **kwargs) -> XceptionAligned: function xception65 (line 408) | def xception65(pretrained=False, **kwargs) -> XceptionAligned: function xception71 (line 427) | def xception71(pretrained=False, **kwargs) -> XceptionAligned: function xception41p (line 448) | def xception41p(pretrained=False, **kwargs) -> XceptionAligned: function xception65p (line 467) | def xception65p(pretrained=False, **kwargs) -> XceptionAligned: FILE: timm/models/xcit.py class PositionalEncodingFourier (line 34) | class PositionalEncodingFourier(nn.Module): method __init__ (line 41) | def __init__( method forward (line 58) | def forward(self, B: int, H: int, W: int): function conv3x3 (line 76) | def conv3x3(in_planes, out_planes, stride=1, device=None, dtype=None): class ConvPatchEmbed (line 85) | class ConvPatchEmbed(nn.Module): method __init__ (line 88) | def __init__( method forward (line 127) | def forward(self, x): class LPI (line 134) | class LPI(nn.Module): method __init__ (line 141) | def __init__( method forward (line 162) | def forward(self, x, H: int, W: int): class ClassAttentionBlock (line 173) | class ClassAttentionBlock(nn.Module): method __init__ (line 176) | def __init__( method forward (line 224) | def forward(self, x): class XCA (line 241) | class XCA(nn.Module): method __init__ (line 248) | def __init__( method forward (line 268) | def forward(self, x): method no_weight_decay (line 293) | def no_weight_decay(self): class XCABlock (line 297) | class XCABlock(nn.Module): method __init__ (line 298) | def __init__( method forward (line 344) | def forward(self, x, H: int, W: int): class Xcit (line 353) | class Xcit(nn.Module): method __init__ (line 360) | def __init__( method _init_weights (line 486) | def _init_weights(self, m): method no_weight_decay (line 493) | def no_weight_decay(self): method group_matcher (line 497) | def group_matcher(self, coarse=False): method set_grad_checkpointing (line 505) | def set_grad_checkpointing(self, enable=True): method get_classifier (line 509) | def get_classifier(self) -> nn.Module: method reset_classifier (line 512) | def reset_classifier(self, num_classes: int, global_pool: Optional[str... method forward_intermediates (line 521) | def forward_intermediates( method prune_intermediate_layers (line 589) | def prune_intermediate_layers( method forward_features (line 606) | def forward_features(self, x): method forward_head (line 634) | def forward_head(self, x, pre_logits: bool = False): method forward (line 640) | def forward(self, x): function checkpoint_filter_fn (line 646) | def checkpoint_filter_fn(state_dict, model): function _create_xcit (line 675) | def _create_xcit(variant, pretrained=False, default_cfg=None, **kwargs): function _cfg (line 688) | def _cfg(url='', **kwargs): function xcit_nano_12_p16_224 (line 833) | def xcit_nano_12_p16_224(pretrained=False, **kwargs) -> Xcit: function xcit_nano_12_p16_384 (line 841) | def xcit_nano_12_p16_384(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_12_p16_224 (line 849) | def xcit_tiny_12_p16_224(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_12_p16_384 (line 857) | def xcit_tiny_12_p16_384(pretrained=False, **kwargs) -> Xcit: function xcit_small_12_p16_224 (line 865) | def xcit_small_12_p16_224(pretrained=False, **kwargs) -> Xcit: function xcit_small_12_p16_384 (line 873) | def xcit_small_12_p16_384(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_24_p16_224 (line 881) | def xcit_tiny_24_p16_224(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_24_p16_384 (line 889) | def xcit_tiny_24_p16_384(pretrained=False, **kwargs) -> Xcit: function xcit_small_24_p16_224 (line 897) | def xcit_small_24_p16_224(pretrained=False, **kwargs) -> Xcit: function xcit_small_24_p16_384 (line 905) | def xcit_small_24_p16_384(pretrained=False, **kwargs) -> Xcit: function xcit_medium_24_p16_224 (line 913) | def xcit_medium_24_p16_224(pretrained=False, **kwargs) -> Xcit: function xcit_medium_24_p16_384 (line 921) | def xcit_medium_24_p16_384(pretrained=False, **kwargs) -> Xcit: function xcit_large_24_p16_224 (line 929) | def xcit_large_24_p16_224(pretrained=False, **kwargs) -> Xcit: function xcit_large_24_p16_384 (line 937) | def xcit_large_24_p16_384(pretrained=False, **kwargs) -> Xcit: function xcit_nano_12_p8_224 (line 946) | def xcit_nano_12_p8_224(pretrained=False, **kwargs) -> Xcit: function xcit_nano_12_p8_384 (line 954) | def xcit_nano_12_p8_384(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_12_p8_224 (line 962) | def xcit_tiny_12_p8_224(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_12_p8_384 (line 970) | def xcit_tiny_12_p8_384(pretrained=False, **kwargs) -> Xcit: function xcit_small_12_p8_224 (line 978) | def xcit_small_12_p8_224(pretrained=False, **kwargs) -> Xcit: function xcit_small_12_p8_384 (line 986) | def xcit_small_12_p8_384(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_24_p8_224 (line 994) | def xcit_tiny_24_p8_224(pretrained=False, **kwargs) -> Xcit: function xcit_tiny_24_p8_384 (line 1002) | def xcit_tiny_24_p8_384(pretrained=False, **kwargs) -> Xcit: function xcit_small_24_p8_224 (line 1010) | def xcit_small_24_p8_224(pretrained=False, **kwargs) -> Xcit: function xcit_small_24_p8_384 (line 1018) | def xcit_small_24_p8_384(pretrained=False, **kwargs) -> Xcit: function xcit_medium_24_p8_224 (line 1026) | def xcit_medium_24_p8_224(pretrained=False, **kwargs) -> Xcit: function xcit_medium_24_p8_384 (line 1034) | def xcit_medium_24_p8_384(pretrained=False, **kwargs) -> Xcit: function xcit_large_24_p8_224 (line 1042) | def xcit_large_24_p8_224(pretrained=False, **kwargs) -> Xcit: function xcit_large_24_p8_384 (line 1050) | def xcit_large_24_p8_384(pretrained=False, **kwargs) -> Xcit: FILE: timm/optim/_optim_factory.py function _import_class (line 46) | def _import_class(class_string: str) -> Type: class OptimInfo (line 58) | class OptimInfo: class OptimizerRegistry (line 82) | class OptimizerRegistry: method __init__ (line 89) | def __init__(self) -> None: method register (line 93) | def register(self, info: OptimInfo) -> None: method register_alias (line 104) | def register_alias(self, alias: str, target: str) -> None: method register_foreach_default (line 119) | def register_foreach_default(self, name: str) -> None: method list_optimizers (line 123) | def list_optimizers( method get_optimizer_info (line 160) | def get_optimizer_info(self, name: str) -> OptimInfo: method get_optimizer_class (line 177) | def get_optimizer_class( method create_optimizer (line 228) | def create_optimizer( function _register_sgd_variants (line 352) | def _register_sgd_variants(registry: OptimizerRegistry) -> None: function _register_adam_variants (line 391) | def _register_adam_variants(registry: OptimizerRegistry) -> None: function _register_lamb_lars (line 488) | def _register_lamb_lars(registry: OptimizerRegistry) -> None: function _register_corrected_decay_optimizers (line 550) | def _register_corrected_decay_optimizers(registry: OptimizerRegistry) ->... function _register_cautious_optimizers (line 676) | def _register_cautious_optimizers(registry: OptimizerRegistry) -> None: function _register_other_optimizers (line 801) | def _register_other_optimizers(registry: OptimizerRegistry) -> None: function _register_apex_optimizers (line 960) | def _register_apex_optimizers(registry: OptimizerRegistry) -> None: function _register_bnb_optimizers (line 1003) | def _register_bnb_optimizers(registry: OptimizerRegistry) -> None: function _register_default_optimizers (line 1081) | def _register_default_optimizers() -> None: function list_optimizers (line 1103) | def list_optimizers( function get_optimizer_info (line 1148) | def get_optimizer_info(name: str) -> OptimInfo: function get_optimizer_class (line 1163) | def get_optimizer_class( function create_optimizer_v2 (line 1200) | def create_optimizer_v2( function optimizer_kwargs (line 1301) | def optimizer_kwargs(cfg): function create_optimizer (line 1327) | def create_optimizer( FILE: timm/optim/_param_groups.py function _matches_pattern (line 14) | def _matches_pattern(name: str, patterns: Collection[str]) -> bool: function param_groups_weight_decay (line 19) | def param_groups_weight_decay( function _group (line 68) | def _group(it, size): function auto_group_layers (line 73) | def auto_group_layers(model, layers_per_group=12, num_groups=None): function param_groups_layer_decay (line 102) | def param_groups_layer_decay( FILE: timm/optim/_types.py class OptimizerCallable (line 23) | class OptimizerCallable(Protocol): method __call__ (line 26) | def __call__(self, params: ParamsT, **kwargs) -> torch.optim.Optimizer... FILE: timm/optim/adabelief.py class AdaBelief (line 6) | class AdaBelief(Optimizer): method __init__ (line 42) | def __init__( method __setstate__ (line 83) | def __setstate__(self, state): method reset (line 89) | def reset(self): method step (line 107) | def step(self, closure=None): FILE: timm/optim/adafactor.py class Adafactor (line 21) | class Adafactor(torch.optim.Optimizer): method __init__ (line 46) | def __init__( method __setstate__ (line 82) | def __setstate__(self, state): method _get_lr (line 89) | def _get_lr(param_group, param_state): method _get_options (line 100) | def _get_options(param_group, param_shape, min_size_to_factor=16): method _rms (line 118) | def _rms(tensor): method _approx_sq_grad (line 121) | def _approx_sq_grad(self, exp_avg_sq_row, exp_avg_sq_col, dim_col, dim... method step (line 128) | def step(self, closure=None): FILE: timm/optim/adafactor_bv.py function _get_scalar_dtype (line 22) | def _get_scalar_dtype(): function _factored_dims (line 27) | def _factored_dims( class AdafactorBigVision (line 53) | class AdafactorBigVision(Optimizer): method __init__ (line 60) | def __init__( method __setstate__ (line 107) | def __setstate__(self, state): method step (line 125) | def step(self, closure=None): function _single_tensor_adafactor (line 213) | def _single_tensor_adafactor( function _multi_tensor_adafactor (line 315) | def _multi_tensor_adafactor( FILE: timm/optim/adahessian.py class Adahessian (line 9) | class Adahessian(torch.optim.Optimizer): method __init__ (line 26) | def __init__( method is_second_order (line 71) | def is_second_order(self): method get_params (line 74) | def get_params(self): method zero_hessian (line 81) | def zero_hessian(self): method set_hessian (line 91) | def set_hessian(self): method step (line 119) | def step(self, closure=None): FILE: timm/optim/adamp.py function _channel_view (line 21) | def _channel_view(x) -> torch.Tensor: function _layer_view (line 25) | def _layer_view(x) -> torch.Tensor: function projection (line 29) | def projection(p, grad, perturb, delta: float, wd_ratio: float, eps: flo... class AdamP (line 64) | class AdamP(Optimizer): method __init__ (line 65) | def __init__( method step (line 90) | def step(self, closure=None): FILE: timm/optim/adamw.py class AdamWLegacy (line 20) | class AdamWLegacy(Optimizer): method __init__ (line 49) | def __init__( method __setstate__ (line 85) | def __setstate__(self, state): method step (line 101) | def step(self, closure=None): function adamw (line 175) | def adamw( function _single_tensor_adamw (line 236) | def _single_tensor_adamw( function _multi_tensor_adamw (line 322) | def _multi_tensor_adamw( FILE: timm/optim/adan.py class MultiTensorApply (line 30) | class MultiTensorApply(object): method __init__ (line 34) | def __init__(self, chunk_size): method __call__ (line 42) | def __call__(self, op, noop_flag_buffer, tensor_lists, *args): class Adan (line 46) | class Adan(Optimizer): method __init__ (line 63) | def __init__(self, method __setstate__ (line 95) | def __setstate__(self, state): method restart_opt (line 102) | def restart_opt(self): method step (line 118) | def step(self, closure=None): function _single_tensor_adan (line 206) | def _single_tensor_adan( function _multi_tensor_adan (line 264) | def _multi_tensor_adan( FILE: timm/optim/adopt.py function _view_as_real (line 28) | def _view_as_real(params, *state_and_grads): function _get_scalar_dtype (line 36) | def _get_scalar_dtype(is_fused=None): function _is_compiling (line 44) | def _is_compiling(): function _get_value (line 51) | def _get_value(x): class Adopt (line 59) | class Adopt(Optimizer): method __init__ (line 64) | def __init__( method __setstate__ (line 115) | def __setstate__(self, state): method _init_group (line 139) | def _init_group( method step (line 189) | def step(self, closure=None): function _single_tensor_adopt (line 247) | def _single_tensor_adopt( function _multi_tensor_adopt (line 334) | def _multi_tensor_adopt( function adopt (line 455) | def adopt( FILE: timm/optim/kron.py function precond_update_prob_schedule (line 55) | def precond_update_prob_schedule( class Kron (line 81) | class Kron(torch.optim.Optimizer): method __init__ (line 109) | def __init__( method __setstate__ (line 181) | def __setstate__(self, state): method __getstate__ (line 186) | def __getstate__(self): method state_dict (line 191) | def state_dict(self) -> Dict[str, Any]: method load_state_dict (line 199) | def load_state_dict(self, state_dict: Dict[str, Any]) -> None: method __setstate__ (line 213) | def __setstate__(self, state): method step (line 218) | def step(self, closure=None): function safe_flatten (line 386) | def safe_flatten(tensor, start_dim=0, end_dim=-1): function _init_Q_exprs (line 400) | def _init_Q_exprs( function _lb (line 504) | def _lb(A, max_abs): function _norm_lower_bound (line 517) | def _norm_lower_bound(A): function _solve_triangular_right (line 523) | def _solve_triangular_right(X, A): function _balance_Q (line 532) | def _balance_Q(Q_in): function _precond_grad (line 540) | def _precond_grad(Q, exprs, G): function _calc_A_and_conjB (line 545) | def _calc_A_and_conjB(exprA, G, Q, V): function _q_terms (line 557) | def _q_terms(exprGs, A, conjB): FILE: timm/optim/lamb.py class Lamb (line 67) | class Lamb(Optimizer): method __init__ (line 90) | def __init__( method __setstate__ (line 122) | def __setstate__(self, state): method _get_clip_grad_norm (line 129) | def _get_clip_grad_norm(self): method step (line 148) | def step(self, closure=None): FILE: timm/optim/laprop.py class LaProp (line 27) | class LaProp(Optimizer): method __init__ (line 32) | def __init__( method __setstate__ (line 60) | def __setstate__(self, state): method step (line 67) | def step(self, closure=None): FILE: timm/optim/lars.py class Lars (line 17) | class Lars(Optimizer): method __init__ (line 35) | def __init__( method __setstate__ (line 70) | def __setstate__(self, state): method step (line 76) | def step(self, closure=None): FILE: timm/optim/lion.py class Lion (line 31) | class Lion(Optimizer): method __init__ (line 34) | def __init__( method __setstate__ (line 73) | def __setstate__(self, state): method step (line 82) | def step(self, closure=None): function lion (line 135) | def lion( function _single_tensor_lion (line 182) | def _single_tensor_lion( function _multi_tensor_lion (line 223) | def _multi_tensor_lion( FILE: timm/optim/lookahead.py class Lookahead (line 15) | class Lookahead(Optimizer): method __init__ (line 16) | def __init__(self, base_optimizer, alpha=0.5, k=6): method update_slow (line 36) | def update_slow(self, group): method sync_lookahead (line 48) | def sync_lookahead(self): method step (line 53) | def step(self, closure=None): method state_dict (line 61) | def state_dict(self): method load_state_dict (line 64) | def load_state_dict(self, state_dict): FILE: timm/optim/madgrad.py class MADGRAD (line 24) | class MADGRAD(torch.optim.Optimizer): method __init__ (line 55) | def __init__( method supports_memory_efficient_fp16 (line 83) | def supports_memory_efficient_fp16(self) -> bool: method supports_flat_params (line 87) | def supports_flat_params(self) -> bool: method step (line 91) | def step(self, closure: Optional[Callable[[], float]] = None) -> Optio... FILE: timm/optim/mars.py function _mars_single_tensor_step (line 25) | def _mars_single_tensor_step( class Mars (line 91) | class Mars(Optimizer): method __init__ (line 98) | def __init__( method __setstate__ (line 136) | def __setstate__(self, state): method step (line 142) | def step(self, closure=None): FILE: timm/optim/muon.py function scale_eps_for_ns (line 88) | def scale_eps_for_ns( function zeropower_via_newtonschulz (line 112) | def zeropower_via_newtonschulz( function get_lr_scale (line 199) | def get_lr_scale( function get_adamuon_lr_scale (line 228) | def get_adamuon_lr_scale( function _is_suitable_for_muon (line 255) | def _is_suitable_for_muon( function reshape_for_muon (line 327) | def reshape_for_muon( function muon (line 362) | def muon( function adamuon (line 400) | def adamuon( function _single_tensor_muon (line 451) | def _single_tensor_muon( function _single_tensor_adamuon (line 520) | def _single_tensor_adamuon( class Muon (line 636) | class Muon(torch.optim.Optimizer): method __init__ (line 648) | def __init__( method __setstate__ (line 740) | def __setstate__(self, state): method step (line 747) | def step(self, closure=None): function resolve_ns_coefficients (line 970) | def resolve_ns_coefficients( FILE: timm/optim/nadam.py class NAdamLegacy (line 7) | class NAdamLegacy(Optimizer): method __init__ (line 32) | def __init__( method step (line 53) | def step(self, closure=None): FILE: timm/optim/nadamw.py class NAdamW (line 21) | class NAdamW(torch.optim.Optimizer): method __init__ (line 42) | def __init__( method __setstate__ (line 78) | def __setstate__(self, state): method step (line 90) | def step(self, closure=None): function nadamw (line 154) | def nadamw( function _single_tensor_nadamw (line 211) | def _single_tensor_nadamw( function _multi_tensor_nadamw (line 294) | def _multi_tensor_nadamw( FILE: timm/optim/nvnovograd.py class NvNovoGrad (line 13) | class NvNovoGrad(Optimizer): method __init__ (line 32) | def __init__( method __setstate__ (line 61) | def __setstate__(self, state): method step (line 67) | def step(self, closure=None): FILE: timm/optim/radam.py class RAdamLegacy (line 12) | class RAdamLegacy(Optimizer): method __init__ (line 17) | def __init__( method __setstate__ (line 34) | def __setstate__(self, state): method step (line 38) | def step(self, closure=None): FILE: timm/optim/rmsprop_tf.py class RMSpropTF (line 20) | class RMSpropTF(Optimizer): method __init__ (line 51) | def __init__( method __setstate__ (line 90) | def __setstate__(self, state): method step (line 99) | def step(self, closure=None): FILE: timm/optim/sgdp.py class SGDP (line 22) | class SGDP(Optimizer): method __init__ (line 23) | def __init__( method step (line 50) | def step(self, closure=None): FILE: timm/optim/sgdw.py class SGDW (line 25) | class SGDW(Optimizer): method __init__ (line 26) | def __init__( method __setstate__ (line 64) | def __setstate__(self, state): method _init_group (line 74) | def _init_group(self, group, params_with_grad, grads, momentum_buffer_... method step (line 95) | def step(self, closure=None): function sgdw (line 138) | def sgdw( function _single_tensor_sgdw (line 195) | def _single_tensor_sgdw( function _multi_tensor_sgdw (line 241) | def _multi_tensor_sgdw( FILE: timm/scheduler/cosine_lr.py class CosineLRScheduler (line 19) | class CosineLRScheduler(Scheduler): method __init__ (line 30) | def __init__( method _get_lr (line 81) | def _get_lr(self, t: int) -> List[float]: method get_cycle_length (line 111) | def get_cycle_length(self, cycles=0): FILE: timm/scheduler/multistep_lr.py class MultiStepLRScheduler (line 10) | class MultiStepLRScheduler(Scheduler): method __init__ (line 14) | def __init__( method get_curr_decay_steps (line 51) | def get_curr_decay_steps(self, t): method _get_lr (line 56) | def _get_lr(self, t: int) -> List[float]: FILE: timm/scheduler/plateau_lr.py class PlateauLRScheduler (line 13) | class PlateauLRScheduler(Scheduler): method __init__ (line 16) | def __init__( method state_dict (line 64) | def state_dict(self) -> Dict[str, Any]: method load_state_dict (line 70) | def load_state_dict(self, state_dict: Dict[str, Any]) -> None: method step (line 76) | def step(self, epoch: int, metric: Optional[float] = None) -> None: method step_update (line 94) | def step_update(self, num_updates: int, metric: Optional[float] = None): method _apply_noise (line 97) | def _apply_noise(self, epoch: int) -> None: method _get_lr (line 110) | def _get_lr(self, t: int) -> List[float]: FILE: timm/scheduler/poly_lr.py class PolyLRScheduler (line 19) | class PolyLRScheduler(Scheduler): method __init__ (line 25) | def __init__( method _get_lr (line 77) | def _get_lr(self, t: int) -> List[float]: method get_cycle_length (line 107) | def get_cycle_length(self, cycles=0): FILE: timm/scheduler/scheduler.py class Scheduler (line 8) | class Scheduler(ABC): method __init__ (line 27) | def __init__( method state_dict (line 61) | def state_dict(self) -> Dict[str, Any]: method load_state_dict (line 64) | def load_state_dict(self, state_dict: Dict[str, Any]) -> None: method _get_lr (line 68) | def _get_lr(self, t: int) -> List[float]: method _get_values (line 71) | def _get_values(self, t: int, on_epoch: bool = True) -> Optional[List[... method step (line 77) | def step(self, epoch: int, metric: Optional[float] = None) -> None: method step_update (line 84) | def step_update(self, num_updates: int, metric: Optional[float] = None... method update_groups (line 91) | def update_groups(self, values: Union[float, List[float]]) -> None: method _add_noise (line 100) | def _add_noise(self, lrs: List[float], t: int) -> List[float]: method _is_apply_noise (line 106) | def _is_apply_noise(self, t: int) -> bool: method _calculate_noise (line 116) | def _calculate_noise(self, t) -> float: FILE: timm/scheduler/scheduler_factory.py function scheduler_kwargs (line 16) | def scheduler_kwargs(cfg, decreasing_metric: Optional[bool] = None): function create_scheduler (line 51) | def create_scheduler( function create_scheduler_v2 (line 63) | def create_scheduler_v2( FILE: timm/scheduler/step_lr.py class StepLRScheduler (line 15) | class StepLRScheduler(Scheduler): method __init__ (line 19) | def __init__( method _get_lr (line 56) | def _get_lr(self, t: int) -> List[float]: FILE: timm/scheduler/tanh_lr.py class TanhLRScheduler (line 19) | class TanhLRScheduler(Scheduler): method __init__ (line 25) | def __init__( method _get_lr (line 79) | def _get_lr(self, t: int) -> List[float]: method get_cycle_length (line 108) | def get_cycle_length(self, cycles=0): FILE: timm/task/classification.py class ClassificationTask (line 13) | class ClassificationTask(TrainingTask): method __init__ (line 32) | def __init__( method prepare_distributed (line 48) | def prepare_distributed( method forward (line 68) | def forward( FILE: timm/task/distillation.py class DistillationTeacher (line 18) | class DistillationTeacher(nn.Module): method __init__ (line 37) | def __init__( method forward (line 90) | def forward( method normalize_input (line 115) | def normalize_input( function _resolve_teacher (line 138) | def _resolve_teacher( class LogitDistillationTask (line 175) | class LogitDistillationTask(TrainingTask): method __init__ (line 215) | def __init__( method prepare_distributed (line 298) | def prepare_distributed( method forward (line 323) | def forward( class FeatureDistillationTrainableModule (line 362) | class FeatureDistillationTrainableModule(nn.Module): method __init__ (line 370) | def __init__( method forward (line 385) | def forward(self, input: torch.Tensor) -> Tuple[torch.Tensor, torch.Te... class FeatureDistillationTask (line 405) | class FeatureDistillationTask(TrainingTask): method __init__ (line 440) | def __init__( method _detect_feature_dim (line 539) | def _detect_feature_dim(model: nn.Module) -> int: method prepare_distributed (line 554) | def prepare_distributed( method forward (line 579) | def forward( FILE: timm/task/task.py class TrainingTask (line 13) | class TrainingTask(nn.Module): method __init__ (line 41) | def __init__( method to (line 52) | def to(self, *args, **kwargs): method prepare_distributed (line 59) | def prepare_distributed( method forward (line 86) | def forward( FILE: timm/task/token_distillation.py class TokenDistillationTeacher (line 17) | class TokenDistillationTeacher(nn.Module): method __init__ (line 36) | def __init__( method forward (line 89) | def forward(self, input: torch.Tensor) -> torch.Tensor: method normalize_input (line 100) | def normalize_input( class TokenDistillationTask (line 123) | class TokenDistillationTask(TrainingTask): method __init__ (line 169) | def __init__( method prepare_distributed (line 274) | def prepare_distributed( method forward (line 299) | def forward( FILE: timm/utils/agc.py function unitwise_norm (line 21) | def unitwise_norm(x, norm_type=2.0): function adaptive_clip_grad (line 30) | def adaptive_clip_grad(parameters, clip_factor=0.01, eps=1e-3, norm_type... FILE: timm/utils/attention_extract.py class AttentionExtract (line 9) | class AttentionExtract(torch.nn.Module): method __init__ (line 14) | def __init__( method forward (line 79) | def forward(self, x): FILE: timm/utils/checkpoint_saver.py class CheckpointSaver (line 22) | class CheckpointSaver: method __init__ (line 23) | def __init__( method _replace (line 66) | def _replace(self, src, dst): method _duplicate (line 75) | def _duplicate(self, src, dst): method _save (line 87) | def _save(self, save_path, epoch, metric=None): method _cleanup_checkpoints (line 106) | def _cleanup_checkpoints(self, trim=0): method save_checkpoint (line 120) | def save_checkpoint(self, epoch, metric=None): method save_recovery (line 159) | def save_recovery(self, epoch, batch_idx=0): method find_recovery (line 177) | def find_recovery(self): FILE: timm/utils/clip_grad.py function dispatch_clip_grad (line 6) | def dispatch_clip_grad(parameters, value: float, mode: str = 'norm', nor... FILE: timm/utils/cuda.py class ApexScaler (line 17) | class ApexScaler: method __call__ (line 20) | def __call__( method state_dict (line 37) | def state_dict(self): method load_state_dict (line 41) | def load_state_dict(self, state_dict): class NativeScaler (line 46) | class NativeScaler: method __init__ (line 49) | def __init__(self, device='cuda'): method __call__ (line 55) | def __call__( method state_dict (line 74) | def state_dict(self): method load_state_dict (line 77) | def load_state_dict(self, state_dict): FILE: timm/utils/decay_batch.py function decay_batch_step (line 8) | def decay_batch_step(batch_size, num_intra_steps=2, no_odd=False): function check_batch_size_retry (line 32) | def check_batch_size_retry(error_str): FILE: timm/utils/distributed.py function reduce_tensor (line 17) | def reduce_tensor(tensor, n): function distribute_bn (line 24) | def distribute_bn(model, world_size, reduce=False): function is_global_primary (line 37) | def is_global_primary(args): function is_local_primary (line 41) | def is_local_primary(args): function is_primary (line 45) | def is_primary(args, local=False): function is_distributed_env (line 49) | def is_distributed_env(): function world_info_from_env (line 57) | def world_info_from_env(): function init_distributed_device (line 79) | def init_distributed_device(args): function init_distributed_device_so (line 100) | def init_distributed_device_so( FILE: timm/utils/jit.py function set_jit_legacy (line 10) | def set_jit_legacy(): function set_jit_fuser (line 23) | def set_jit_fuser(fuser): FILE: timm/utils/log.py class FormatterNoInfo (line 9) | class FormatterNoInfo(logging.Formatter): method __init__ (line 10) | def __init__(self, fmt='%(levelname)s: %(message)s'): method format (line 13) | def format(self, record): function setup_default_logging (line 19) | def setup_default_logging(default_level=logging.INFO, log_path=''): FILE: timm/utils/metrics.py class AverageMeter (line 7) | class AverageMeter: method __init__ (line 9) | def __init__(self): method reset (line 12) | def reset(self): method update (line 18) | def update(self, val, n=1): function accuracy (line 25) | def accuracy(output, target, topk=(1,)): FILE: timm/utils/misc.py function natural_key (line 10) | def natural_key(string_): function add_bool_arg (line 15) | def add_bool_arg(parser, name, default=False, help=''): class ParseKwargs (line 23) | class ParseKwargs(argparse.Action): method __call__ (line 24) | def __call__(self, parser, namespace, values, option_string=None): FILE: timm/utils/model.py function unwrap_model (line 16) | def unwrap_model(model): function get_state_dict (line 28) | def get_state_dict(model, unwrap_fn=unwrap_model): function avg_sq_ch_mean (line 32) | def avg_sq_ch_mean(model, input, output): function avg_ch_var (line 38) | def avg_ch_var(model, input, output): function avg_ch_var_residual (line 44) | def avg_ch_var_residual(model, input, output): class ActivationStatsHook (line 50) | class ActivationStatsHook: method __init__ (line 68) | def __init__(self, model, hook_fn_locs, hook_fns): method _create_hook (line 79) | def _create_hook(self, hook_fn): method register_hook (line 86) | def register_hook(self, hook_fn_loc, hook_fn): function extract_spp_stats (line 93) | def extract_spp_stats( function _freeze_unfreeze (line 111) | def _freeze_unfreeze(root_module, submodules=[], include_bn_running_stat... function freeze (line 181) | def freeze(root_module, submodules=[], include_bn_running_stats=True): function unfreeze (line 216) | def unfreeze(root_module, submodules=[], include_bn_running_stats=True): function reparameterize_model (line 233) | def reparameterize_model(model: torch.nn.Module, inplace=False) -> torch... FILE: timm/utils/model_ema.py class ModelEma (line 16) | class ModelEma: method __init__ (line 38) | def __init__(self, model, decay=0.9999, device='', resume=''): method _load_checkpoint (line 52) | def _load_checkpoint(self, checkpoint_path): method update (line 69) | def update(self, model): class ModelEmaV2 (line 83) | class ModelEmaV2(nn.Module): method __init__ (line 106) | def __init__(self, model, decay=0.9999, device=None): method _update (line 116) | def _update(self, model, update_fn): method update (line 123) | def update(self, model): method set (line 126) | def set(self, model): method forward (line 129) | def forward(self, *args, **kwargs): class ModelEmaV3 (line 133) | class ModelEmaV3(nn.Module): method __init__ (line 156) | def __init__( method get_decay (line 186) | def get_decay(self, step: Optional[int] = None) -> float: method update (line 206) | def update(self, model, step: Optional[int] = None): method apply_update_ (line 213) | def apply_update_(self, model, decay: float): method apply_update_no_buffers_ (line 237) | def apply_update_no_buffers_(self, model, decay: float): method set (line 255) | def set(self, model): method forward (line 259) | def forward(self, *args, **kwargs): FILE: timm/utils/onnx.py function onnx_forward (line 6) | def onnx_forward(onnx_file, example_input): function onnx_export (line 17) | def onnx_export( FILE: timm/utils/random.py function random_seed (line 6) | def random_seed(seed=42, rank=0): FILE: timm/utils/summary.py function get_outdir (line 14) | def get_outdir(path, *paths, inc=False): function update_summary (line 30) | def update_summary( FILE: train.py function _parse_args (line 437) | def _parse_args(): function main (line 454) | def main(): function train_one_epoch (line 1160) | def train_one_epoch( function validate (line 1374) | def validate( FILE: validate.py function validate (line 172) | def validate(args): function _try_run (line 456) | def _try_run(args, initial_batch_size): function main (line 485) | def main(): function write_results (line 548) | def write_results(results_file, results, format='csv'):