SYMBOL INDEX (1795 symbols across 175 files) FILE: src/benchmark/pretrain_ssl/datasets/SSL4EO/ssl4eo_dataset.py function normalize (line 36) | def normalize(img, mean, std): class SSL4EO (line 45) | class SSL4EO(torch.utils.data.Dataset): method __init__ (line 47) | def __init__(self,root, normalize=False, mode=['s1','s2a','s2c'], dtyp... method __getitem__ (line 56) | def __getitem__(self,index): method __len__ (line 75) | def __len__(self): method get_array (line 78) | def get_array(self, patch_id, mode): class Subset (line 127) | class Subset(Dataset): method __init__ (line 129) | def __init__(self, dataset, indices): method __getitem__ (line 133) | def __getitem__(self, idx): method __len__ (line 136) | def __len__(self): method __getattr__ (line 139) | def __getattr__(self, name): function random_subset (line 143) | def random_subset(dataset, frac, seed=None): class _RepeatSampler (line 149) | class _RepeatSampler(object): method __init__ (line 156) | def __init__(self, sampler): method __iter__ (line 159) | def __iter__(self): class InfiniteDataLoader (line 164) | class InfiniteDataLoader(DataLoader): method __init__ (line 170) | def __init__(self, *args, **kwargs): method __len__ (line 175) | def __len__(self): method __iter__ (line 178) | def __iter__(self): function make_lmdb (line 183) | def make_lmdb(dataset, lmdb_file, num_workers=6,mode=['s1','s2a','s2c']): FILE: src/benchmark/pretrain_ssl/datasets/SSL4EO/ssl4eo_dataset_lmdb.py function normalize (line 23) | def normalize(img, mean, std): class Subset (line 32) | class Subset(Dataset): method __init__ (line 34) | def __init__(self, dataset, indices): method __getitem__ (line 38) | def __getitem__(self, idx): method __len__ (line 41) | def __len__(self): method __getattr__ (line 44) | def __getattr__(self, name): function random_subset (line 48) | def random_subset(dataset, frac, seed=None): class _RepeatSampler (line 54) | class _RepeatSampler(object): method __init__ (line 61) | def __init__(self, sampler): method __iter__ (line 64) | def __iter__(self): class InfiniteDataLoader (line 69) | class InfiniteDataLoader(DataLoader): method __init__ (line 75) | def __init__(self, *args, **kwargs): method __len__ (line 80) | def __len__(self): method __iter__ (line 83) | def __iter__(self): function make_lmdb (line 88) | def make_lmdb(dataset, lmdb_file, num_workers=6,mode=['s1','s2a','s2c']): class LMDBDataset (line 121) | class LMDBDataset(Dataset): method __init__ (line 123) | def __init__(self, lmdb_file, is_slurm_job=False, s1_transform=None, s... method _init_db (line 146) | def _init_db(self): method __getitem__ (line 152) | def __getitem__(self, index): method __len__ (line 228) | def __len__(self): class TwoCropsTransform (line 247) | class TwoCropsTransform: method __init__ (line 250) | def __init__(self, base_transform, season='fixed'): method __call__ (line 254) | def __call__(self, x): class GaussianBlur (line 276) | class GaussianBlur(object): method __init__ (line 279) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 282) | def __call__(self, x): class RandomBrightness (line 289) | class RandomBrightness(object): method __init__ (line 292) | def __init__(self, brightness=0.4): method __call__ (line 295) | def __call__(self, sample): class RandomContrast (line 301) | class RandomContrast(object): method __init__ (line 304) | def __init__(self, contrast=0.4): method __call__ (line 307) | def __call__(self, sample): class ToGray (line 313) | class ToGray(object): method __init__ (line 314) | def __init__(self, out_channels): method __call__ (line 316) | def __call__(self,sample): class RandomChannelDrop (line 323) | class RandomChannelDrop(object): method __init__ (line 326) | def __init__(self, min_n_drop=1, max_n_drop=8): method __call__ (line 330) | def __call__(self, sample): FILE: src/benchmark/pretrain_ssl/models/data2vec/dall_e/__init__.py function load_model (line 9) | def load_model(path: str, device: torch.device = None) -> nn.Module: FILE: src/benchmark/pretrain_ssl/models/data2vec/dall_e/decoder.py class DecoderBlock (line 13) | class DecoderBlock(nn.Module): method __attrs_post_init__ (line 21) | def __attrs_post_init__(self) -> None: method forward (line 38) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Decoder (line 42) | class Decoder(nn.Module): method __attrs_post_init__ (line 54) | def __attrs_post_init__(self) -> None: method forward (line 86) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: src/benchmark/pretrain_ssl/models/data2vec/dall_e/encoder.py class EncoderBlock (line 13) | class EncoderBlock(nn.Module): method __attrs_post_init__ (line 21) | def __attrs_post_init__(self) -> None: method forward (line 38) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Encoder (line 42) | class Encoder(nn.Module): method __attrs_post_init__ (line 53) | def __attrs_post_init__(self) -> None: method forward (line 85) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: src/benchmark/pretrain_ssl/models/data2vec/dall_e/utils.py class Conv2d (line 11) | class Conv2d(nn.Module): method __attrs_post_init__ (line 20) | def __attrs_post_init__(self) -> None: method forward (line 31) | def forward(self, x: torch.Tensor) -> torch.Tensor: function map_pixels (line 45) | def map_pixels(x: torch.Tensor) -> torch.Tensor: function unmap_pixels (line 51) | def unmap_pixels(x: torch.Tensor) -> torch.Tensor: FILE: src/benchmark/pretrain_ssl/models/data2vec/dataset_folder.py function has_file_allowed_extension (line 21) | def has_file_allowed_extension(filename: str, extensions: Tuple[str, ...... function is_image_file (line 34) | def is_image_file(filename: str) -> bool: function make_dataset (line 46) | def make_dataset( class DatasetFolder (line 76) | class DatasetFolder(VisionDataset): method __init__ (line 108) | def __init__( method _find_classes (line 138) | def _find_classes(self, dir: str) -> Tuple[List[str], Dict[str, int]]: method __getitem__ (line 156) | def __getitem__(self, index: int) -> Tuple[Any, Any]: method __len__ (line 180) | def __len__(self) -> int: function pil_loader (line 187) | def pil_loader(path: str) -> Image.Image: function accimage_loader (line 195) | def accimage_loader(path: str) -> Any: function default_loader (line 204) | def default_loader(path: str) -> Any: class ImageFolder (line 234) | class ImageFolder(DatasetFolder): method __init__ (line 261) | def __init__( FILE: src/benchmark/pretrain_ssl/models/data2vec/datasets.py class SeasonTransform (line 35) | class SeasonTransform: method __init__ (line 37) | def __init__(self, base_transform, season='fixed'): method __call__ (line 41) | def __call__(self, x): class DataAugmentations (line 64) | class DataAugmentations(object): method __init__ (line 65) | def __init__(self, args): method __call__ (line 130) | def __call__(self, image): method __repr__ (line 141) | def __repr__(self): function build_beit_pretraining_dataset (line 152) | def build_beit_pretraining_dataset(args): function build_transform (line 167) | def build_transform(is_train, args): FILE: src/benchmark/pretrain_ssl/models/data2vec/engine_for_cyclical.py function train_one_epoch (line 23) | def train_one_epoch(model: torch.nn.Module, model_ema: torch.nn.Module, ... FILE: src/benchmark/pretrain_ssl/models/data2vec/engine_for_cyclical_joint.py function train_one_epoch (line 24) | def train_one_epoch(model: torch.nn.Module, model_ema: torch.nn.Module, ... FILE: src/benchmark/pretrain_ssl/models/data2vec/engine_for_finetuning.py function train_class_batch (line 27) | def train_class_batch(model, samples, target, criterion, bool_masked_pos... function get_loss_scale_for_deepspeed (line 33) | def get_loss_scale_for_deepspeed(model): function train_one_epoch (line 38) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 173) | def evaluate(data_loader, model, device, metric='acc', padd=False, oneho... FILE: src/benchmark/pretrain_ssl/models/data2vec/engine_for_pretraining.py function train_one_epoch (line 22) | def train_one_epoch(model: torch.nn.Module, d_vae: torch.nn.Module, FILE: src/benchmark/pretrain_ssl/models/data2vec/masking_generator.py class MaskingGenerator (line 29) | class MaskingGenerator: method __init__ (line 30) | def __init__( method __repr__ (line 46) | def __repr__(self): method get_shape (line 52) | def get_shape(self): method _mask (line 55) | def _mask(self, mask, max_mask_patches): method __call__ (line 79) | def __call__(self): FILE: src/benchmark/pretrain_ssl/models/data2vec/modeling_cyclical.py function trunc_normal_ (line 22) | def trunc_normal_(tensor, mean=0.0, std=1.0): class VisionTransformerForCyclicalTraining (line 32) | class VisionTransformerForCyclicalTraining(nn.Module): method __init__ (line 33) | def __init__( method fix_init_weight (line 127) | def fix_init_weight(self): method _init_weights (line 135) | def _init_weights(self, m): method no_weight_decay (line 149) | def no_weight_decay(self): method get_num_layers (line 152) | def get_num_layers(self): method forward_features (line 155) | def forward_features(self, x, bool_masked_pos, layer_results): method forward (line 194) | def forward(self, x, bool_masked_pos, return_all_tokens=False, layer_r... function beit_base_patch16_224 (line 214) | def beit_base_patch16_224(pretrained=False, **kwargs): function beit_small_patch16_224 (line 234) | def beit_small_patch16_224(pretrained=False, **kwargs): function beit_large_patch16_224 (line 255) | def beit_large_patch16_224(pretrained=False, **kwargs): function beit_huge_patch16_224 (line 275) | def beit_huge_patch16_224(pretrained=False, **kwargs): FILE: src/benchmark/pretrain_ssl/models/data2vec/modeling_cyclical_joint.py function trunc_normal_ (line 22) | def trunc_normal_(tensor, mean=0.0, std=1.0): class VisionTransformerForCyclicalJointTraining (line 32) | class VisionTransformerForCyclicalJointTraining(nn.Module): method __init__ (line 33) | def __init__( method fix_init_weight (line 126) | def fix_init_weight(self): method _init_weights (line 134) | def _init_weights(self, m): method no_weight_decay (line 148) | def no_weight_decay(self): method get_num_layers (line 151) | def get_num_layers(self): method forward_features (line 154) | def forward_features(self, x, bool_masked_pos, layer_results): method forward (line 183) | def forward(self, x, bool_masked_pos, return_all_tokens=False, layer_r... function beit_base_joint_patch16_224 (line 203) | def beit_base_joint_patch16_224(pretrained=False, **kwargs): FILE: src/benchmark/pretrain_ssl/models/data2vec/modeling_discrete_vae.py function top_k (line 19) | def top_k(logits, thres = 0.5): function exists (line 28) | def exists(val): function default (line 32) | def default(val, d): function eval_decorator (line 36) | def eval_decorator(fn): class BasicVAE (line 46) | class BasicVAE(nn.Module): method get_codebook_indices (line 48) | def get_codebook_indices(self, images): method decode (line 51) | def decode(self, img_seq): method get_codebook_probs (line 54) | def get_codebook_probs(self, img_seq): method get_image_tokens_size (line 57) | def get_image_tokens_size(self): method get_image_size (line 60) | def get_image_size(self): class ResBlock (line 64) | class ResBlock(nn.Module): method __init__ (line 65) | def __init__(self, chan_in, hidden_size, chan_out): method forward (line 75) | def forward(self, x): class DiscreteVAE (line 79) | class DiscreteVAE(BasicVAE): method __init__ (line 80) | def __init__( method get_image_size (line 127) | def get_image_size(self): method get_image_tokens_size (line 130) | def get_image_tokens_size(self): method get_codebook_indices (line 135) | def get_codebook_indices(self, images): method get_codebook_probs (line 142) | def get_codebook_probs(self, images): method decode (line 146) | def decode( method forward (line 158) | def forward( class Dalle_VAE (line 206) | class Dalle_VAE(BasicVAE): method __init__ (line 207) | def __init__(self, image_size): method load_model (line 213) | def load_model(self, model_dir, device): method decode (line 217) | def decode(self, img_seq): method get_codebook_indices (line 223) | def get_codebook_indices(self, images): method get_codebook_probs (line 227) | def get_codebook_probs(self, images): method forward (line 231) | def forward(self, img_seq_prob, no_process=False): FILE: src/benchmark/pretrain_ssl/models/data2vec/modeling_finetune.py function _cfg (line 23) | def _cfg(url='', **kwargs): class DropPath (line 33) | class DropPath(nn.Module): method __init__ (line 36) | def __init__(self, drop_prob=None): method forward (line 40) | def forward(self, x): method extra_repr (line 43) | def extra_repr(self) -> str: class Mlp (line 47) | class Mlp(nn.Module): method __init__ (line 48) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 57) | def forward(self, x): class Attention (line 67) | class Attention(nn.Module): method __init__ (line 68) | def __init__( method forward (line 121) | def forward(self, x, rel_pos_bias=None): class Block (line 154) | class Block(nn.Module): method __init__ (line 156) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 177) | def forward(self, x, rel_pos_bias=None): class PatchEmbed (line 189) | class PatchEmbed(nn.Module): method __init__ (line 192) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 204) | def forward(self, x, **kwargs): class RelativePositionBias (line 213) | class RelativePositionBias(nn.Module): method __init__ (line 215) | def __init__(self, window_size, num_heads): method forward (line 244) | def forward(self): class VisionTransformer (line 252) | class VisionTransformer(nn.Module): method __init__ (line 255) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 315) | def fix_init_weight(self): method _init_weights (line 323) | def _init_weights(self, m): method get_num_layers (line 334) | def get_num_layers(self): method no_weight_decay (line 338) | def no_weight_decay(self): method get_classifier (line 341) | def get_classifier(self): method reset_classifier (line 344) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 348) | def forward_features(self, x, bool_masked_pos=None): method forward (line 391) | def forward(self, x, bool_masked_pos=None): function beit_small_patch16_224 (line 398) | def beit_small_patch16_224(pretrained=False, **kwargs): function beit_base_patch16_224 (line 407) | def beit_base_patch16_224(pretrained=False, **kwargs): function beit_base_patch16_384 (line 416) | def beit_base_patch16_384(pretrained=False, **kwargs): function beit_large_patch16_224 (line 425) | def beit_large_patch16_224(pretrained=False, **kwargs): function beit_large_patch16_384 (line 434) | def beit_large_patch16_384(pretrained=False, **kwargs): function beit_large_patch16_512 (line 443) | def beit_large_patch16_512(pretrained=False, **kwargs): FILE: src/benchmark/pretrain_ssl/models/data2vec/modeling_pretrain.py function trunc_normal_ (line 22) | def trunc_normal_(tensor, mean=0., std=1.): class VisionTransformerForMaskedImageModeling (line 32) | class VisionTransformerForMaskedImageModeling(nn.Module): method __init__ (line 33) | def __init__(self, img_size=224, patch_size=16, in_chans=3, vocab_size... method fix_init_weight (line 79) | def fix_init_weight(self): method _init_weights (line 87) | def _init_weights(self, m): method no_weight_decay (line 101) | def no_weight_decay(self): method get_num_layers (line 104) | def get_num_layers(self): method forward_features (line 107) | def forward_features(self, x, bool_masked_pos): method forward (line 129) | def forward(self, x, bool_masked_pos, return_all_tokens=False): function beit_base_patch16_224_8k_vocab (line 140) | def beit_base_patch16_224_8k_vocab(pretrained=False, **kwargs): function beit_large_patch16_224_8k_vocab (line 155) | def beit_large_patch16_224_8k_vocab(pretrained=False, **kwargs): FILE: src/benchmark/pretrain_ssl/models/data2vec/models.py function _cfg (line 32) | def _cfg(url='', **kwargs): class Attention (line 71) | class Attention(nn.Module): method __init__ (line 72) | def __init__( method forward (line 127) | def forward(self, x, rel_pos_bias: Optional[torch.Tensor] = None): class Block (line 157) | class Block(nn.Module): method __init__ (line 159) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, drop=... method forward (line 179) | def forward(self, x, rel_pos_bias: Optional[torch.Tensor] = None): class RelativePositionBias (line 189) | class RelativePositionBias(nn.Module): method __init__ (line 191) | def __init__(self, window_size, num_heads): method forward (line 220) | def forward(self): class Beit (line 228) | class Beit(nn.Module): method __init__ (line 232) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 281) | def fix_init_weight(self): method _init_weights (line 289) | def _init_weights(self, m): method get_num_layers (line 298) | def get_num_layers(self): method no_weight_decay (line 302) | def no_weight_decay(self): method get_classifier (line 305) | def get_classifier(self): method reset_classifier (line 308) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 312) | def forward_features(self, x): method forward (line 333) | def forward(self, x): function _create_beit (line 339) | def _create_beit(variant, pretrained=False, default_cfg=None, **kwargs): function beit_base_patch16_224 (line 354) | def beit_base_patch16_224(pretrained=False, **kwargs): function beit_base_patch16_384 (line 366) | def beit_base_patch16_384(pretrained=False, **kwargs): function beit_base_patch16_224_in22k (line 375) | def beit_base_patch16_224_in22k(pretrained=False, **kwargs): function beit_large_patch16_224 (line 384) | def beit_large_patch16_224(pretrained=False, **kwargs): function beit_large_patch16_384 (line 393) | def beit_large_patch16_384(pretrained=False, **kwargs): function beit_large_patch16_512 (line 402) | def beit_large_patch16_512(pretrained=False, **kwargs): function beit_large_patch16_224_in22k (line 411) | def beit_large_patch16_224_in22k(pretrained=False, **kwargs): FILE: src/benchmark/pretrain_ssl/models/data2vec/optim_factory.py function get_num_layer_for_vit (line 33) | def get_num_layer_for_vit(var_name, num_max_layer): class LayerDecayValueAssigner (line 47) | class LayerDecayValueAssigner(object): method __init__ (line 48) | def __init__(self, values): method get_scale (line 51) | def get_scale(self, layer_id): method get_layer_id (line 54) | def get_layer_id(self, var_name): function get_parameter_groups (line 58) | def get_parameter_groups(model, weight_decay=1e-5, skip_list=(), get_num... function create_optimizer (line 100) | def create_optimizer(args, model, get_num_layer=None, get_layer_scale=No... FILE: src/benchmark/pretrain_ssl/models/data2vec/run_beit_pretraining.py function get_args (line 34) | def get_args(): function get_model (line 139) | def get_model(args): function main (line 154) | def main(args): FILE: src/benchmark/pretrain_ssl/models/data2vec/run_class_finetuning.py function get_args (line 39) | def get_args(): function main (line 241) | def main(args, ds_init): FILE: src/benchmark/pretrain_ssl/models/data2vec/run_cyclical.py function get_args (line 37) | def get_args(): function get_model (line 280) | def get_model(args): function main (line 304) | def main(args): FILE: src/benchmark/pretrain_ssl/models/data2vec/run_cyclical_joint.py function get_args (line 36) | def get_args(): function get_model (line 264) | def get_model(args): function main (line 279) | def main(args): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/backbone/beit.py class DropPath (line 26) | class DropPath(nn.Module): method __init__ (line 29) | def __init__(self, drop_prob=None): method forward (line 33) | def forward(self, x): method extra_repr (line 36) | def extra_repr(self) -> str: class Mlp (line 40) | class Mlp(nn.Module): method __init__ (line 41) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 50) | def forward(self, x): class Attention (line 60) | class Attention(nn.Module): method __init__ (line 61) | def __init__( method forward (line 117) | def forward(self, x, rel_pos_bias=None): class Block (line 150) | class Block(nn.Module): method __init__ (line 152) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 172) | def forward(self, x, rel_pos_bias=None): class PatchEmbed (line 182) | class PatchEmbed(nn.Module): method __init__ (line 185) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 197) | def forward(self, x, **kwargs): class HybridEmbed (line 209) | class HybridEmbed(nn.Module): method __init__ (line 213) | def __init__(self, backbone, img_size=224, feature_size=None, in_chans... method forward (line 237) | def forward(self, x): class RelativePositionBias (line 244) | class RelativePositionBias(nn.Module): method __init__ (line 246) | def __init__(self, window_size, num_heads): method forward (line 275) | def forward(self): class BEiT (line 284) | class BEiT(nn.Module): method __init__ (line 287) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 366) | def fix_init_weight(self): method _init_weights (line 374) | def _init_weights(self, m): method init_weights (line 383) | def init_weights(self, pretrained=None): method get_num_layers (line 409) | def get_num_layers(self): method no_weight_decay (line 413) | def no_weight_decay(self): method forward_features (line 416) | def forward_features(self, x): method forward (line 441) | def forward(self, x): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/mmcv_custom/apex_runner/apex_iter_based_runner.py class IterBasedRunnerAmp (line 20) | class IterBasedRunnerAmp(IterBasedRunner): method save_checkpoint (line 26) | def save_checkpoint(self, method resume (line 68) | def resume(self, FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/mmcv_custom/apex_runner/checkpoint.py function save_checkpoint (line 19) | def save_checkpoint(model, filename, optimizer=None, meta=None): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/mmcv_custom/apex_runner/optimizer.py class DistOptimizerHook (line 9) | class DistOptimizerHook(OptimizerHook): method __init__ (line 12) | def __init__(self, update_interval=1, grad_clip=None, coalesce=True, b... method before_run (line 19) | def before_run(self, runner): method after_train_iter (line 22) | def after_train_iter(self, runner): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/mmcv_custom/checkpoint.py function _get_mmcv_home (line 34) | def _get_mmcv_home(): function load_state_dict (line 45) | def load_state_dict(module, state_dict, strict=False, logger=None): function load_url_dist (line 113) | def load_url_dist(url, model_dir=None, map_location="cpu"): function load_pavimodel_dist (line 127) | def load_pavimodel_dist(model_path, map_location=None): function load_fileclient_dist (line 155) | def load_fileclient_dist(filename, backend, map_location): function get_torchvision_models (line 176) | def get_torchvision_models(): function get_external_models (line 188) | def get_external_models(): function get_mmcls_models (line 202) | def get_mmcls_models(): function get_deprecated_model_names (line 209) | def get_deprecated_model_names(): function _process_mmcls_checkpoint (line 218) | def _process_mmcls_checkpoint(checkpoint): function _load_checkpoint (line 229) | def _load_checkpoint(filename, map_location=None): function cosine_scheduler (line 290) | def cosine_scheduler(base_value, final_value, epochs, niter_per_ep, warm... function load_checkpoint (line 310) | def load_checkpoint(model, function weights_to_cpu (line 476) | def weights_to_cpu(state_dict): function _save_to_state_dict (line 491) | def _save_to_state_dict(module, destination, prefix, keep_vars): function get_state_dict (line 511) | def get_state_dict(module, destination=None, prefix='', keep_vars=False): function save_checkpoint (line 555) | def save_checkpoint(model, filename, optimizer=None, meta=None): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/mmcv_custom/layer_decay_optimizer_constructor.py function get_num_layer_for_vit (line 6) | def get_num_layer_for_vit(var_name, num_max_layer): class LayerDecayOptimizerConstructor (line 19) | class LayerDecayOptimizerConstructor(DefaultOptimizerConstructor): method add_params (line 20) | def add_params(self, params, module, prefix='', is_dcn_module=None): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/mmcv_custom/resize_transform.py class SETR_Resize (line 8) | class SETR_Resize(object): method __init__ (line 35) | def __init__(self, method random_select (line 66) | def random_select(img_scales): method random_sample (line 84) | def random_sample(img_scales): method random_sample_ratio (line 111) | def random_sample_ratio(img_scale, ratio_range): method _random_scale (line 137) | def _random_scale(self, results): method _resize_img (line 170) | def _resize_img(self, results): method _resize_seg (line 206) | def _resize_seg(self, results): method __call__ (line 217) | def __call__(self, results): method __repr__ (line 235) | def __repr__(self): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/mmcv_custom/train_api.py function set_random_seed (line 18) | def set_random_seed(seed, deterministic=False): function train_segmentor (line 37) | def train_segmentor(model, FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/tools/test.py function parse_args (line 17) | def parse_args(): function main (line 67) | def main(): FILE: src/benchmark/pretrain_ssl/models/data2vec/semantic_segmentation/tools/train.py function parse_args (line 23) | def parse_args(): function main (line 67) | def main(): FILE: src/benchmark/pretrain_ssl/models/data2vec/transforms.py class ToNumpy (line 20) | class ToNumpy: method __call__ (line 22) | def __call__(self, pil_img): class ToTensor (line 30) | class ToTensor: method __init__ (line 32) | def __init__(self, dtype=torch.float32): method __call__ (line 35) | def __call__(self, pil_img): function _pil_interp (line 53) | def _pil_interp(method): class RandomResizedCropAndInterpolationWithTwoPic (line 68) | class RandomResizedCropAndInterpolationWithTwoPic: method __init__ (line 83) | def __init__(self, size, second_size=None, scale=(0.08, 1.0), ratio=(3... method get_params (line 109) | def get_params(img, scale, ratio): method __call__ (line 151) | def __call__(self, img): method __repr__ (line 170) | def __repr__(self): FILE: src/benchmark/pretrain_ssl/models/data2vec/utils.py class SmoothedValue (line 33) | class SmoothedValue(object): method __init__ (line 38) | def __init__(self, window_size=20, fmt=None): method update (line 46) | def update(self, value, n=1): method synchronize_between_processes (line 51) | def synchronize_between_processes(self): method median (line 65) | def median(self): method avg (line 70) | def avg(self): method global_avg (line 75) | def global_avg(self): method max (line 79) | def max(self): method value (line 83) | def value(self): method __str__ (line 86) | def __str__(self): class MetricLogger (line 95) | class MetricLogger(object): method __init__ (line 96) | def __init__(self, delimiter="\t"): method update (line 100) | def update(self, **kwargs): method __getattr__ (line 109) | def __getattr__(self, attr): method __str__ (line 117) | def __str__(self): method synchronize_between_processes (line 125) | def synchronize_between_processes(self): method add_meter (line 129) | def add_meter(self, name, meter): method log_every (line 132) | def log_every(self, iterable, print_freq, header=None): class TensorboardLogger (line 179) | class TensorboardLogger(object): method __init__ (line 180) | def __init__(self, log_dir): method set_step (line 184) | def set_step(self, step=None): method update (line 190) | def update(self, head='scalar', step=None, **kwargs): method flush (line 199) | def flush(self): function _load_checkpoint_for_ema (line 203) | def _load_checkpoint_for_ema(model_ema, checkpoint): function setup_for_distributed (line 217) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 232) | def is_dist_avail_and_initialized(): function get_world_size (line 240) | def get_world_size(): function get_rank (line 246) | def get_rank(): function is_main_process (line 252) | def is_main_process(): function save_on_master (line 256) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 261) | def init_distributed_mode(args): function load_state_dict (line 314) | def load_state_dict(model, state_dict, prefix='', ignore_missing="relati... class NativeScalerWithGradNormCount (line 363) | class NativeScalerWithGradNormCount: method __init__ (line 366) | def __init__(self): method __call__ (line 369) | def __call__(self, loss, optimizer, clip_grad=None, parameters=None, c... method state_dict (line 385) | def state_dict(self): method load_state_dict (line 388) | def load_state_dict(self, state_dict): function get_grad_norm_ (line 392) | def get_grad_norm_(parameters, norm_type: float = 2.0) -> torch.Tensor: function cosine_scheduler (line 407) | def cosine_scheduler(base_value, final_value, epochs, niter_per_ep, warm... function tri_phase_scheduler (line 426) | def tri_phase_scheduler(base_value, final_value, epochs, niter_per_ep, w... function save_model (line 461) | def save_model(args, epoch, model, model_without_ddp, optimizer, loss_sc... function auto_load_model (line 486) | def auto_load_model(args, model, model_without_ddp, optimizer, loss_scal... function create_d_vae (line 541) | def create_d_vae(weight_path, d_vae_type, image_size, device): function get_dalle_vae (line 550) | def get_dalle_vae(weight_path, image_size, device): function get_d_vae (line 556) | def get_d_vae(weight_path, image_size, device): function create_ds_config (line 576) | def create_ds_config(args): FILE: src/benchmark/pretrain_ssl/models/dino/utils.py class GaussianBlur (line 37) | class GaussianBlur(object): method __init__ (line 41) | def __init__(self, p=0.5, radius_min=0.1, radius_max=2.): method __call__ (line 46) | def __call__(self, img): class cvGaussianBlur (line 58) | class cvGaussianBlur(object): method __init__ (line 61) | def __init__(self, p=0.5, sigma=[.1, 2.]): method __call__ (line 65) | def __call__(self, x): class Solarization (line 78) | class Solarization(object): method __init__ (line 82) | def __init__(self, p): method __call__ (line 85) | def __call__(self, img): function load_pretrained_weights (line 92) | def load_pretrained_weights(model, pretrained_weights, checkpoint_key, m... function load_pretrained_linear_weights (line 133) | def load_pretrained_linear_weights(linear_classifier, model_name, patch_... function clip_gradients (line 153) | def clip_gradients(model, clip): function cancel_gradients_last_layer (line 165) | def cancel_gradients_last_layer(epoch, model, freeze_last_layer): function restart_from_checkpoint (line 173) | def restart_from_checkpoint(ckp_path, run_variables=None, **kwargs): function cosine_scheduler (line 208) | def cosine_scheduler(base_value, final_value, epochs, niter_per_ep, warm... function bool_flag (line 222) | def bool_flag(s): function fix_random_seeds (line 236) | def fix_random_seeds(seed=31): class SmoothedValue (line 245) | class SmoothedValue(object): method __init__ (line 250) | def __init__(self, window_size=20, fmt=None): method update (line 258) | def update(self, value, n=1): method synchronize_between_processes (line 263) | def synchronize_between_processes(self): method median (line 277) | def median(self): method avg (line 282) | def avg(self): method global_avg (line 287) | def global_avg(self): method max (line 291) | def max(self): method value (line 295) | def value(self): method __str__ (line 298) | def __str__(self): function reduce_dict (line 307) | def reduce_dict(input_dict, average=True): class MetricLogger (line 334) | class MetricLogger(object): method __init__ (line 335) | def __init__(self, delimiter="\t"): method update (line 339) | def update(self, **kwargs): method __getattr__ (line 346) | def __getattr__(self, attr): method __str__ (line 354) | def __str__(self): method synchronize_between_processes (line 362) | def synchronize_between_processes(self): method add_meter (line 366) | def add_meter(self, name, meter): method log_every (line 369) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 424) | def get_sha(): function is_dist_avail_and_initialized (line 444) | def is_dist_avail_and_initialized(): function get_world_size (line 452) | def get_world_size(): function get_rank (line 458) | def get_rank(): function is_main_process (line 464) | def is_main_process(): function save_on_master (line 468) | def save_on_master(*args, **kwargs): function setup_for_distributed (line 473) | def setup_for_distributed(is_master): function init_distributed_mode (line 488) | def init_distributed_mode(args): function accuracy (line 526) | def accuracy(output, target, topk=(1,)): function _no_grad_trunc_normal_ (line 536) | def _no_grad_trunc_normal_(tensor, mean, std, a, b): function trunc_normal_ (line 572) | def trunc_normal_(tensor, mean=0., std=1., a=-2., b=2.): class LARS (line 577) | class LARS(torch.optim.Optimizer): method __init__ (line 581) | def __init__(self, params, lr=0, weight_decay=0, momentum=0.9, eta=0.001, method step (line 589) | def step(self): class MultiCropWrapper (line 618) | class MultiCropWrapper(nn.Module): method __init__ (line 627) | def __init__(self, backbone, head): method forward (line 634) | def forward(self, x): function get_params_groups (line 656) | def get_params_groups(model): function has_batchnorms (line 670) | def has_batchnorms(model): class PCA (line 678) | class PCA(): method __init__ (line 682) | def __init__(self, dim=256, whit=0.5): method train_pca (line 687) | def train_pca(self, cov): method apply (line 713) | def apply(self, x): function compute_ap (line 732) | def compute_ap(ranks, nres): function compute_map (line 767) | def compute_map(ranks, gnd, kappas=[]): function multi_scale (line 839) | def multi_scale(samples, model): FILE: src/benchmark/pretrain_ssl/models/dino/vision_transformer.py function drop_path (line 27) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 38) | class DropPath(nn.Module): method __init__ (line 41) | def __init__(self, drop_prob=None): method forward (line 45) | def forward(self, x): class Mlp (line 49) | class Mlp(nn.Module): method __init__ (line 50) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 59) | def forward(self, x): class Attention (line 68) | class Attention(nn.Module): method __init__ (line 69) | def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, at... method forward (line 80) | def forward(self, x): class Block (line 95) | class Block(nn.Module): method __init__ (line 96) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 107) | def forward(self, x, return_attention=False): class PatchEmbed (line 116) | class PatchEmbed(nn.Module): method __init__ (line 119) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 128) | def forward(self, x): class VisionTransformer (line 134) | class VisionTransformer(nn.Module): method __init__ (line 136) | def __init__(self, img_size=[224], patch_size=16, in_chans=3, num_clas... method _init_weights (line 165) | def _init_weights(self, m): method interpolate_pos_encoding (line 174) | def interpolate_pos_encoding(self, x, w, h): method prepare_tokens (line 196) | def prepare_tokens(self, x): method forward (line 209) | def forward(self, x): method get_last_selfattention (line 216) | def get_last_selfattention(self, x): method get_intermediate_layers (line 225) | def get_intermediate_layers(self, x, n=1): function vit_tiny (line 236) | def vit_tiny(patch_size=16, **kwargs): function vit_small (line 243) | def vit_small(patch_size=16, **kwargs): function vit_base (line 250) | def vit_base(patch_size=16, **kwargs): class DINOHead (line 257) | class DINOHead(nn.Module): method __init__ (line 258) | def __init__(self, in_dim, out_dim, use_bn=False, norm_last_layer=True... method _init_weights (line 281) | def _init_weights(self, m): method forward (line 287) | def forward(self, x): FILE: src/benchmark/pretrain_ssl/models/mae/engine_finetune.py function train_one_epoch (line 25) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 99) | def evaluate(data_loader, model, device): FILE: src/benchmark/pretrain_ssl/models/mae/engine_finetune_BE.py function train_one_epoch (line 29) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 107) | def evaluate(data_loader, model, device, criterion): FILE: src/benchmark/pretrain_ssl/models/mae/engine_finetune_EU.py function train_one_epoch (line 29) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 104) | def evaluate(data_loader, model, device, criterion): FILE: src/benchmark/pretrain_ssl/models/mae/engine_finetune_SS.py function train_one_epoch (line 29) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 104) | def evaluate(data_loader, model, device, criterion): FILE: src/benchmark/pretrain_ssl/models/mae/engine_pretrain.py function train_one_epoch (line 23) | def train_one_epoch(model: torch.nn.Module, FILE: src/benchmark/pretrain_ssl/models/mae/main_finetune.py function get_args_parser (line 42) | def get_args_parser(): function main (line 158) | def main(args): FILE: src/benchmark/pretrain_ssl/models/mae/main_linprobe.py function get_args_parser (line 47) | def get_args_parser(): function main (line 121) | def main(args): FILE: src/benchmark/pretrain_ssl/models/mae/main_pretrain.py class SeasonTransform (line 41) | class SeasonTransform: method __init__ (line 43) | def __init__(self, base_transform, season='fixed'): method __call__ (line 47) | def __call__(self, x): function get_args_parser (line 72) | def get_args_parser(): function main (line 151) | def main(args): FILE: src/benchmark/pretrain_ssl/models/mae/models_mae.py class MaskedAutoencoderViT (line 22) | class MaskedAutoencoderViT(nn.Module): method __init__ (line 25) | def __init__(self, img_size=224, patch_size=16, in_chans=3, method initialize_weights (line 67) | def initialize_weights(self): method _init_weights (line 87) | def _init_weights(self, m): method patchify (line 97) | def patchify(self, imgs): method unpatchify (line 111) | def unpatchify(self, x): method random_masking (line 125) | def random_masking(self, x, mask_ratio): method forward_encoder (line 152) | def forward_encoder(self, x, mask_ratio): method forward_decoder (line 174) | def forward_decoder(self, x, ids_restore): method forward_loss (line 200) | def forward_loss(self, imgs, pred, mask): method forward (line 218) | def forward(self, imgs, mask_ratio=0.75): function mae_vit_small_patch16_dec512d8b (line 225) | def mae_vit_small_patch16_dec512d8b(**kwargs): function mae_vit_base_patch16_dec512d8b (line 232) | def mae_vit_base_patch16_dec512d8b(**kwargs): function mae_vit_large_patch16_dec512d8b (line 240) | def mae_vit_large_patch16_dec512d8b(**kwargs): function mae_vit_huge_patch14_dec512d8b (line 248) | def mae_vit_huge_patch14_dec512d8b(**kwargs): FILE: src/benchmark/pretrain_ssl/models/mae/models_vit.py class VisionTransformer (line 20) | class VisionTransformer(timm.models.vision_transformer.VisionTransformer): method __init__ (line 23) | def __init__(self, global_pool=False, **kwargs): method forward_features (line 34) | def forward_features(self, x): function vit_small_patch16 (line 55) | def vit_small_patch16(**kwargs): function vit_base_patch16 (line 61) | def vit_base_patch16(**kwargs): function vit_large_patch16 (line 68) | def vit_large_patch16(**kwargs): function vit_huge_patch14 (line 75) | def vit_huge_patch14(**kwargs): FILE: src/benchmark/pretrain_ssl/models/mae/submitit_finetune.py function parse_args (line 19) | def parse_args(): function get_shared_folder (line 33) | def get_shared_folder() -> Path: function get_init_file (line 42) | def get_init_file(): class Trainer (line 51) | class Trainer(object): method __init__ (line 52) | def __init__(self, args): method __call__ (line 55) | def __call__(self): method checkpoint (line 61) | def checkpoint(self): method _setup_gpu_args (line 73) | def _setup_gpu_args(self): function main (line 86) | def main(): FILE: src/benchmark/pretrain_ssl/models/mae/submitit_linprobe.py function parse_args (line 19) | def parse_args(): function get_shared_folder (line 33) | def get_shared_folder() -> Path: function get_init_file (line 42) | def get_init_file(): class Trainer (line 51) | class Trainer(object): method __init__ (line 52) | def __init__(self, args): method __call__ (line 55) | def __call__(self): method checkpoint (line 61) | def checkpoint(self): method _setup_gpu_args (line 73) | def _setup_gpu_args(self): function main (line 86) | def main(): FILE: src/benchmark/pretrain_ssl/models/mae/submitit_pretrain.py function parse_args (line 19) | def parse_args(): function get_shared_folder (line 33) | def get_shared_folder() -> Path: function get_init_file (line 42) | def get_init_file(): class Trainer (line 51) | class Trainer(object): method __init__ (line 52) | def __init__(self, args): method __call__ (line 55) | def __call__(self): method checkpoint (line 61) | def checkpoint(self): method _setup_gpu_args (line 73) | def _setup_gpu_args(self): function main (line 86) | def main(): FILE: src/benchmark/pretrain_ssl/models/mae/util/crop.py class RandomResizedCrop (line 15) | class RandomResizedCrop(transforms.RandomResizedCrop): method get_params (line 23) | def get_params(img, scale, ratio): FILE: src/benchmark/pretrain_ssl/models/mae/util/datasets.py function build_dataset (line 20) | def build_dataset(is_train, args): function build_transform (line 31) | def build_transform(is_train, args): FILE: src/benchmark/pretrain_ssl/models/mae/util/lars.py class LARS (line 14) | class LARS(torch.optim.Optimizer): method __init__ (line 18) | def __init__(self, params, lr=0, weight_decay=0, momentum=0.9, trust_c... method step (line 23) | def step(self): FILE: src/benchmark/pretrain_ssl/models/mae/util/lr_decay.py function param_groups_lrd (line 15) | def param_groups_lrd(model, weight_decay=0.05, no_weight_decay_list=[], ... function get_layer_id_for_vit (line 64) | def get_layer_id_for_vit(name, num_layers): FILE: src/benchmark/pretrain_ssl/models/mae/util/lr_sched.py function adjust_learning_rate (line 9) | def adjust_learning_rate(optimizer, epoch, args): FILE: src/benchmark/pretrain_ssl/models/mae/util/misc.py class SmoothedValue (line 24) | class SmoothedValue(object): method __init__ (line 29) | def __init__(self, window_size=20, fmt=None): method update (line 37) | def update(self, value, n=1): method synchronize_between_processes (line 42) | def synchronize_between_processes(self): method median (line 56) | def median(self): method avg (line 61) | def avg(self): method global_avg (line 66) | def global_avg(self): method max (line 70) | def max(self): method value (line 74) | def value(self): method __str__ (line 77) | def __str__(self): class MetricLogger (line 86) | class MetricLogger(object): method __init__ (line 87) | def __init__(self, delimiter="\t"): method update (line 91) | def update(self, **kwargs): method __getattr__ (line 100) | def __getattr__(self, attr): method __str__ (line 108) | def __str__(self): method synchronize_between_processes (line 116) | def synchronize_between_processes(self): method add_meter (line 120) | def add_meter(self, name, meter): method log_every (line 123) | def log_every(self, iterable, print_freq, header=None): function setup_for_distributed (line 170) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 187) | def is_dist_avail_and_initialized(): function get_world_size (line 195) | def get_world_size(): function get_rank (line 201) | def get_rank(): function is_main_process (line 207) | def is_main_process(): function save_on_master (line 211) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 216) | def init_distributed_mode(args): class NativeScalerWithGradNormCount (line 253) | class NativeScalerWithGradNormCount: method __init__ (line 256) | def __init__(self): method __call__ (line 259) | def __call__(self, loss, optimizer, clip_grad=None, parameters=None, c... method state_dict (line 275) | def state_dict(self): method load_state_dict (line 278) | def load_state_dict(self, state_dict): function get_grad_norm_ (line 282) | def get_grad_norm_(parameters, norm_type: float = 2.0) -> torch.Tensor: function save_model (line 297) | def save_model(args, epoch, model, model_without_ddp, optimizer, loss_sc... function load_model (line 317) | def load_model(args, model_without_ddp, optimizer, loss_scaler): function all_reduce_mean (line 334) | def all_reduce_mean(x): FILE: src/benchmark/pretrain_ssl/models/mae/util/pos_embed.py function get_2d_sincos_pos_embed (line 20) | def get_2d_sincos_pos_embed(embed_dim, grid_size, cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 38) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 49) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): function interpolate_pos_embed (line 75) | def interpolate_pos_embed(model, checkpoint_model): FILE: src/benchmark/pretrain_ssl/models/moco/builder.py class MoCo (line 6) | class MoCo(nn.Module): method __init__ (line 11) | def __init__(self, base_encoder, dim=128, K=65536, m=0.999, T=0.07, ml... method _momentum_update_key_encoder (line 68) | def _momentum_update_key_encoder(self): method _dequeue_and_enqueue (line 76) | def _dequeue_and_enqueue(self, keys): method _batch_shuffle_ddp (line 92) | def _batch_shuffle_ddp(self, x): method _batch_unshuffle_ddp (line 120) | def _batch_unshuffle_ddp(self, x, idx_unshuffle): method forward (line 138) | def forward(self, im_q, im_k): function concat_all_gather (line 188) | def concat_all_gather(tensor): FILE: src/benchmark/pretrain_ssl/models/moco/loader.py class TwoCropsTransform (line 11) | class TwoCropsTransform: method __init__ (line 14) | def __init__(self, base_transform): method __call__ (line 17) | def __call__(self, x): class GaussianBlur (line 23) | class GaussianBlur(object): method __init__ (line 26) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 29) | def __call__(self, x): FILE: src/benchmark/pretrain_ssl/models/moco_v2/builder.py class MoCo (line 6) | class MoCo(nn.Module): method __init__ (line 11) | def __init__(self, base_encoder, dim=128, K=65536, m=0.999, T=0.07, ml... method _momentum_update_key_encoder (line 57) | def _momentum_update_key_encoder(self): method _dequeue_and_enqueue (line 65) | def _dequeue_and_enqueue(self, keys): method _batch_shuffle_ddp (line 81) | def _batch_shuffle_ddp(self, x): method _batch_unshuffle_ddp (line 109) | def _batch_unshuffle_ddp(self, x, idx_unshuffle): method forward (line 127) | def forward(self, im_q, im_k): function concat_all_gather (line 177) | def concat_all_gather(tensor): FILE: src/benchmark/pretrain_ssl/models/moco_v2/detection/train_net.py class Res5ROIHeadsExtraNorm (line 15) | class Res5ROIHeadsExtraNorm(Res5ROIHeads): method _build_res5_block (line 20) | def _build_res5_block(self, cfg): class Trainer (line 28) | class Trainer(DefaultTrainer): method build_evaluator (line 30) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): function setup (line 40) | def setup(args): function main (line 49) | def main(args): FILE: src/benchmark/pretrain_ssl/models/moco_v2/loader.py class TwoCropsTransform (line 11) | class TwoCropsTransform: method __init__ (line 14) | def __init__(self, base_transform): method __call__ (line 17) | def __call__(self, x): class GaussianBlur (line 23) | class GaussianBlur(object): method __init__ (line 26) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 29) | def __call__(self, x): FILE: src/benchmark/pretrain_ssl/models/moco_v2/main_lincls.py function main (line 86) | def main(): function main_worker (line 121) | def main_worker(gpu, ngpus_per_node, args): function train (line 308) | def train(train_loader, model, criterion, optimizer, epoch, args): function validate (line 360) | def validate(val_loader, model, criterion, args): function save_checkpoint (line 404) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): function sanity_check (line 410) | def sanity_check(state_dict, pretrained_weights): class AverageMeter (line 434) | class AverageMeter(object): method __init__ (line 436) | def __init__(self, name, fmt=':f'): method reset (line 441) | def reset(self): method update (line 447) | def update(self, val, n=1): method __str__ (line 453) | def __str__(self): class ProgressMeter (line 458) | class ProgressMeter(object): method __init__ (line 459) | def __init__(self, num_batches, meters, prefix=""): method display (line 464) | def display(self, batch): method _get_batch_fmtstr (line 469) | def _get_batch_fmtstr(self, num_batches): function adjust_learning_rate (line 475) | def adjust_learning_rate(optimizer, epoch, args): function accuracy (line 484) | def accuracy(output, target, topk=(1,)): FILE: src/benchmark/pretrain_ssl/models/moco_v3/builder.py class MoCo (line 11) | class MoCo(nn.Module): method __init__ (line 16) | def __init__(self, base_encoder, dim=256, mlp_dim=4096, T=1.0): method _build_mlp (line 36) | def _build_mlp(self, num_layers, input_dim, mlp_dim, output_dim, last_... method _build_projector_and_predictor_mlps (line 54) | def _build_projector_and_predictor_mlps(self, dim, mlp_dim): method _update_momentum_encoder (line 58) | def _update_momentum_encoder(self, m): method contrastive_loss (line 63) | def contrastive_loss(self, q, k): method forward (line 75) | def forward(self, x1, x2, m): class MoCo_ResNet (line 99) | class MoCo_ResNet(MoCo): method _build_projector_and_predictor_mlps (line 100) | def _build_projector_and_predictor_mlps(self, dim, mlp_dim): class MoCo_ViT (line 112) | class MoCo_ViT(MoCo): method _build_projector_and_predictor_mlps (line 113) | def _build_projector_and_predictor_mlps(self, dim, mlp_dim): function concat_all_gather (line 127) | def concat_all_gather(tensor): FILE: src/benchmark/pretrain_ssl/models/moco_v3/loader.py class TwoCropsTransform (line 14) | class TwoCropsTransform: method __init__ (line 17) | def __init__(self, base_transform1, base_transform2): method __call__ (line 21) | def __call__(self, x): class GaussianBlur (line 27) | class GaussianBlur(object): method __init__ (line 30) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 33) | def __call__(self, x): class Solarize (line 40) | class Solarize(object): method __call__ (line 43) | def __call__(self, x): class cvGaussianBlur (line 50) | class cvGaussianBlur(object): method __init__ (line 53) | def __init__(self, p=0.5, sigma=[.1, 2.]): method __call__ (line 57) | def __call__(self, x): FILE: src/benchmark/pretrain_ssl/models/moco_v3/optimizer.py class LARS (line 10) | class LARS(torch.optim.Optimizer): method __init__ (line 14) | def __init__(self, params, lr=0, weight_decay=0, momentum=0.9, trust_c... method step (line 19) | def step(self): FILE: src/benchmark/pretrain_ssl/models/moco_v3/vits.py class VisionTransformerMoCo (line 25) | class VisionTransformerMoCo(VisionTransformer): method __init__ (line 26) | def __init__(self, stop_grad_conv1=False, **kwargs): method build_2d_sincos_position_embedding (line 53) | def build_2d_sincos_position_embedding(self, temperature=10000.): class ConvStem (line 72) | class ConvStem(nn.Module): method __init__ (line 76) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 104) | def forward(self, x): function vit_small (line 115) | def vit_small(**kwargs): function vit_base (line 122) | def vit_base(**kwargs): function vit_conv_small (line 129) | def vit_conv_small(**kwargs): function vit_conv_base (line 137) | def vit_conv_base(**kwargs): FILE: src/benchmark/pretrain_ssl/models/rs_transforms_float32.py class RandomBrightness (line 7) | class RandomBrightness(object): method __init__ (line 10) | def __init__(self, brightness=0.4): method __call__ (line 13) | def __call__(self, sample): class RandomContrast (line 19) | class RandomContrast(object): method __init__ (line 22) | def __init__(self, contrast=0.4): method __call__ (line 25) | def __call__(self, sample): class ToGray (line 31) | class ToGray(object): method __init__ (line 32) | def __init__(self, out_channels): method __call__ (line 34) | def __call__(self,sample): class RandomChannelDrop (line 41) | class RandomChannelDrop(object): method __init__ (line 44) | def __init__(self, min_n_drop=1, max_n_drop=8): method __call__ (line 48) | def __call__(self, sample): FILE: src/benchmark/pretrain_ssl/models/rs_transforms_uint8.py class RandomBrightness (line 7) | class RandomBrightness(object): method __init__ (line 10) | def __init__(self, brightness=0.4): method __call__ (line 13) | def __call__(self, sample): class RandomContrast (line 19) | class RandomContrast(object): method __init__ (line 22) | def __init__(self, contrast=0.4): method __call__ (line 25) | def __call__(self, sample): class ToGray (line 31) | class ToGray(object): method __init__ (line 32) | def __init__(self, out_channels): method __call__ (line 34) | def __call__(self,sample): class RandomChannelDrop (line 41) | class RandomChannelDrop(object): method __init__ (line 44) | def __init__(self, min_n_drop=1, max_n_drop=8): method __call__ (line 48) | def __call__(self, sample): class GaussianBlur (line 57) | class GaussianBlur(object): method __init__ (line 60) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 63) | def __call__(self, x): class Solarize (line 70) | class Solarize(object): method __init__ (line 72) | def __init__(self, threshold=0.5): method __call__ (line 75) | def __call__(self, x): class RandomSensorDrop_S1S2 (line 82) | class RandomSensorDrop_S1S2(object): method __init__ (line 85) | def __init__(self): method __call__ (line 88) | def __call__(self, sample): class SensorDrop_S1S2 (line 98) | class SensorDrop_S1S2(object): method __init__ (line 99) | def __init__(self, sensor): method __call__ (line 101) | def __call__(self,sample): class RandomSensorDrop_RGBD (line 109) | class RandomSensorDrop_RGBD(object): method __init__ (line 112) | def __init__(self): method __call__ (line 115) | def __call__(self, sample): class SensorDrop_RGBD (line 125) | class SensorDrop_RGBD(object): method __init__ (line 126) | def __init__(self, sensor): method __call__ (line 128) | def __call__(self,sample): FILE: src/benchmark/pretrain_ssl/pretrain_data2vec.py function get_args (line 38) | def get_args(): function get_model (line 293) | def get_model(args): function main (line 317) | def main(args): FILE: src/benchmark/pretrain_ssl/pretrain_dino_s2c.py function get_args_parser (line 54) | def get_args_parser(): function train_dino (line 158) | def train_dino(args): function train_one_epoch (line 369) | def train_one_epoch(student, teacher, teacher_without_ddp, dino_loss, da... class DINOLoss (line 434) | class DINOLoss(nn.Module): method __init__ (line 435) | def __init__(self, out_dim, ncrops, warmup_teacher_temp, teacher_temp, method forward (line 451) | def forward(self, student_output, teacher_output, epoch): method update_center (line 478) | def update_center(self, teacher_output): class DataAugmentationDINO (line 491) | class DataAugmentationDINO(object): method __init__ (line 492) | def __init__(self, global_crops_scale, local_crops_scale, local_crops_... method __call__ (line 534) | def __call__(self, image): class DataAugmentationDINO_S2 (line 549) | class DataAugmentationDINO_S2(object): method __init__ (line 550) | def __init__(self, global_crops_scale, local_crops_scale, local_crops_... method __call__ (line 591) | def __call__(self, image): class DataAugmentationDINO_S1 (line 618) | class DataAugmentationDINO_S1(object): method __init__ (line 619) | def __init__(self, global_crops_scale, local_crops_scale, local_crops_... method __call__ (line 657) | def __call__(self, image): FILE: src/benchmark/pretrain_ssl/pretrain_mae_s2c.py class SeasonTransform (line 41) | class SeasonTransform: method __init__ (line 43) | def __init__(self, base_transform, season='fixed'): method __call__ (line 47) | def __call__(self, x): function get_args_parser (line 72) | def get_args_parser(): function main (line 153) | def main(args): FILE: src/benchmark/pretrain_ssl/pretrain_moco_v2_s2c.py class TwoCropsTransform (line 128) | class TwoCropsTransform: method __init__ (line 131) | def __init__(self, base_transform, season='fixed'): method __call__ (line 135) | def __call__(self, x): function main (line 157) | def main(): function main_worker (line 213) | def main_worker(gpu, ngpus_per_node, args): function train (line 388) | def train(train_loader, model, criterion, optimizer, epoch, args): function save_checkpoint (line 442) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): class AverageMeter (line 448) | class AverageMeter(object): method __init__ (line 450) | def __init__(self, name, fmt=':f'): method reset (line 455) | def reset(self): method update (line 461) | def update(self, val, n=1): method __str__ (line 467) | def __str__(self): class ProgressMeter (line 472) | class ProgressMeter(object): method __init__ (line 473) | def __init__(self, num_batches, meters, prefix=""): method display (line 478) | def display(self, batch): method _get_batch_fmtstr (line 483) | def _get_batch_fmtstr(self, num_batches): function adjust_learning_rate (line 489) | def adjust_learning_rate(optimizer, epoch, args): function accuracy (line 501) | def accuracy(output, target, topk=(1,)): FILE: src/benchmark/pretrain_ssl/pretrain_moco_v2_seco_ms.py class SeCoDataset (line 135) | class SeCoDataset(torch.utils.data.Dataset): method __init__ (line 137) | def __init__(self,root, normalize=False, dtype='uint8'): method __getitem__ (line 145) | def __getitem__(self,index): method __len__ (line 152) | def __len__(self): method get_array (line 155) | def get_array(self, patch_id, season): class LMDBDataset (line 173) | class LMDBDataset(torch.utils.data.Dataset): method __init__ (line 175) | def __init__(self, lmdb_file, is_slurm_job=False, s2a_transform=None): method _init_db (line 189) | def _init_db(self): method __getitem__ (line 195) | def __getitem__(self, index): method __len__ (line 212) | def __len__(self): class TwoCropsTransform (line 217) | class TwoCropsTransform: method __init__ (line 220) | def __init__(self, base_transform): method __call__ (line 223) | def __call__(self, x): function main (line 234) | def main(): function main_worker (line 290) | def main_worker(gpu, ngpus_per_node, args): function train (line 463) | def train(train_loader, model, criterion, optimizer, epoch, args): function save_checkpoint (line 517) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): class AverageMeter (line 523) | class AverageMeter(object): method __init__ (line 525) | def __init__(self, name, fmt=':f'): method reset (line 530) | def reset(self): method update (line 536) | def update(self, val, n=1): method __str__ (line 542) | def __str__(self): class ProgressMeter (line 547) | class ProgressMeter(object): method __init__ (line 548) | def __init__(self, num_batches, meters, prefix=""): method display (line 553) | def display(self, batch): method _get_batch_fmtstr (line 558) | def _get_batch_fmtstr(self, num_batches): function adjust_learning_rate (line 564) | def adjust_learning_rate(optimizer, epoch, args): function accuracy (line 576) | def accuracy(output, target, topk=(1,)): FILE: src/benchmark/pretrain_ssl/pretrain_moco_v2_sen12ms_ms.py class SEN12MSDataset (line 134) | class SEN12MSDataset(torch.utils.data.Dataset): method __init__ (line 135) | def __init__(self, root_dir, mode, transform): method __getitem__ (line 141) | def __getitem__(self,index): method __len__ (line 157) | def __len__(self): class LMDBDataset (line 161) | class LMDBDataset(torch.utils.data.Dataset): method __init__ (line 163) | def __init__(self, lmdb_file, is_slurm_job=False, s2c_transform=None): method _init_db (line 177) | def _init_db(self): method __getitem__ (line 183) | def __getitem__(self, index): method __len__ (line 200) | def __len__(self): class TwoCropsTransform (line 205) | class TwoCropsTransform: method __init__ (line 208) | def __init__(self, base_transform): method __call__ (line 211) | def __call__(self, x): function main (line 222) | def main(): function main_worker (line 278) | def main_worker(gpu, ngpus_per_node, args): function train (line 451) | def train(train_loader, model, criterion, optimizer, epoch, args): function save_checkpoint (line 505) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): class AverageMeter (line 511) | class AverageMeter(object): method __init__ (line 513) | def __init__(self, name, fmt=':f'): method reset (line 518) | def reset(self): method update (line 524) | def update(self, val, n=1): method __str__ (line 530) | def __str__(self): class ProgressMeter (line 535) | class ProgressMeter(object): method __init__ (line 536) | def __init__(self, num_batches, meters, prefix=""): method display (line 541) | def display(self, batch): method _get_batch_fmtstr (line 546) | def _get_batch_fmtstr(self, num_batches): function adjust_learning_rate (line 552) | def adjust_learning_rate(optimizer, epoch, args): function accuracy (line 564) | def accuracy(output, target, topk=(1,)): FILE: src/benchmark/pretrain_ssl/pretrain_moco_v3_s2c.py class TwoCropsTransform (line 141) | class TwoCropsTransform: method __init__ (line 144) | def __init__(self, base_transform1, base_transform2, season='fixed'): method __call__ (line 149) | def __call__(self, x): function main (line 172) | def main(): function main_worker (line 216) | def main_worker(gpu, ngpus_per_node, args): function train (line 447) | def train(train_loader, model, optimizer, scaler, summary_writer, epoch,... function save_checkpoint (line 498) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): class AverageMeter (line 504) | class AverageMeter(object): method __init__ (line 506) | def __init__(self, name, fmt=':f'): method reset (line 511) | def reset(self): method update (line 517) | def update(self, val, n=1): method __str__ (line 523) | def __str__(self): class ProgressMeter (line 528) | class ProgressMeter(object): method __init__ (line 529) | def __init__(self, num_batches, meters, prefix=""): method display (line 534) | def display(self, batch): method _get_batch_fmtstr (line 539) | def _get_batch_fmtstr(self, num_batches): function adjust_learning_rate (line 545) | def adjust_learning_rate(optimizer, epoch, args): function adjust_moco_momentum (line 556) | def adjust_moco_momentum(epoch, args): FILE: src/benchmark/transfer_change_detection/datasets/oscd_datamodule.py class RandomFlip (line 15) | class RandomFlip: method __call__ (line 17) | def __call__(self, *xs): class RandomRotation (line 23) | class RandomRotation: method __init__ (line 25) | def __init__(self): method __call__ (line 28) | def __call__(self, *xs): class RandomSwap (line 33) | class RandomSwap: method __call__ (line 35) | def __call__(self, x1, x2, y): class ToTensor (line 42) | class ToTensor: method __call__ (line 44) | def __call__(self, *xs): class Compose (line 48) | class Compose: method __init__ (line 50) | def __init__(self, transforms): method __call__ (line 53) | def __call__(self, *xs): class ChangeDetectionDataModule (line 59) | class ChangeDetectionDataModule(LightningDataModule): method __init__ (line 61) | def __init__(self, data_dir, RGB_bands=True, BGR_bands=False, S2A_band... method setup (line 79) | def setup(self, stage=None): method train_dataloader (line 97) | def train_dataloader(self): method val_dataloader (line 107) | def val_dataloader(self): FILE: src/benchmark/transfer_change_detection/datasets/oscd_dataset.py function read_image (line 48) | def read_image(path, bands, normalize=True, value_discard=True): class ChangeDetectionDataset (line 81) | class ChangeDetectionDataset(Dataset): method __init__ (line 83) | def __init__(self, root, split='all', bands=None, transform=None, method __getitem__ (line 104) | def __getitem__(self, index): method __len__ (line 128) | def __len__(self): FILE: src/benchmark/transfer_change_detection/main_oscd.py function get_args (line 21) | def get_args(): function dice_loss (line 43) | def dice_loss(out,mask,epsilon=1e-5): class SiamSegment (line 49) | class SiamSegment(LightningModule): method __init__ (line 51) | def __init__(self, backbone, feature_indices, feature_channels): method forward (line 60) | def forward(self, x1, x2): method training_step (line 63) | def training_step(self, batch, batch_idx): method validation_step (line 83) | def validation_step(self, batch, batch_idx): method shared_step (line 103) | def shared_step(self, batch): method configure_optimizers (line 114) | def configure_optimizers(self): function load_ssl_resnet_encoder (line 122) | def load_ssl_resnet_encoder(net, ckp_path, pf_sdict='module.encoder_q.'): FILE: src/benchmark/transfer_change_detection/models/segmentation.py function get_segmentation_model (line 6) | def get_segmentation_model(backbone, feature_indices, feature_channels): class SegmentationEncoder (line 23) | class SegmentationEncoder(torch.nn.Module): method __init__ (line 24) | def __init__(self, backbone, feature_indices, diff=False): method forward (line 39) | def forward(self, x1, x2): method concatenate (line 64) | def concatenate(self, x1, x2): class DoubleConv (line 71) | class DoubleConv(nn.Module): method __init__ (line 72) | def __init__(self, in_channels, out_channels, mid_channels=None): method forward (line 85) | def forward(self, x): class Down (line 89) | class Down(nn.Module): method __init__ (line 92) | def __init__(self, in_channels, out_channels): method forward (line 99) | def forward(self, x): class Up (line 103) | class Up(nn.Module): method __init__ (line 106) | def __init__(self, in_channels, out_channels, bilinear=True): method forward (line 117) | def forward(self, x1, x2): class OutConv (line 132) | class OutConv(nn.Module): method __init__ (line 133) | def __init__(self, in_channels, out_channels): method forward (line 137) | def forward(self, x): class UNet (line 165) | class UNet(nn.Module): method __init__ (line 166) | def __init__(self, encoder, feature_channels, n_classes, concat_mult=2... method forward (line 196) | def forward(self, *in_x): class UNetSmall (line 220) | class UNetSmall(nn.Module): method __init__ (line 221) | def __init__(self, encoder, feature_channels, n_classes, concat_mult=2... method forward (line 245) | def forward(self, *in_x): FILE: src/benchmark/transfer_change_detection/utils/data.py class Subset (line 10) | class Subset(Dataset): method __init__ (line 12) | def __init__(self, dataset, indices): method __getitem__ (line 16) | def __getitem__(self, idx): method __len__ (line 19) | def __len__(self): method __getattr__ (line 22) | def __getattr__(self, name): function random_subset (line 26) | def random_subset(dataset, frac, seed=None): class _RepeatSampler (line 32) | class _RepeatSampler(object): method __init__ (line 39) | def __init__(self, sampler): method __iter__ (line 42) | def __iter__(self): class InfiniteDataLoader (line 47) | class InfiniteDataLoader(DataLoader): method __init__ (line 53) | def __init__(self, *args, **kwargs): method __len__ (line 58) | def __len__(self): method __iter__ (line 61) | def __iter__(self): function make_lmdb (line 66) | def make_lmdb(dataset, lmdb_file, num_workers=8): class LMDBDataset (line 84) | class LMDBDataset(Dataset): method __init__ (line 86) | def __init__(self, lmdb_file, transform=None, target_transform=None): method __getitem__ (line 95) | def __getitem__(self, index): method __len__ (line 111) | def __len__(self): FILE: src/benchmark/transfer_change_detection/utils/transforms.py class Map (line 2) | class Map: method __init__ (line 4) | def __init__(self, transform): method __call__ (line 7) | def __call__(self, inputs): class ApplyN (line 11) | class ApplyN: method __init__ (line 13) | def __init__(self, transform, n): method __call__ (line 17) | def __call__(self, input): class LeaveOneOut (line 21) | class LeaveOneOut: method __init__ (line 23) | def __init__(self, transforms): method __call__ (line 26) | def __call__(self, input): class AddOne (line 37) | class AddOne: method __init__ (line 39) | def __init__(self, transforms): method __call__ (line 42) | def __call__(self, input): FILE: src/benchmark/transfer_change_detection/validate_oscd.py function get_args (line 21) | def get_args(): class SiamSegment (line 44) | class SiamSegment(LightningModule): method __init__ (line 46) | def __init__(self, backbone, feature_indices, feature_channels): method forward (line 54) | def forward(self, x1, x2): method training_step (line 57) | def training_step(self, batch, batch_idx): method validation_step (line 77) | def validation_step(self, batch, batch_idx): method shared_step (line 97) | def shared_step(self, batch): method configure_optimizers (line 107) | def configure_optimizers(self): function load_ssl_resnet_encoder (line 115) | def load_ssl_resnet_encoder(net, ckp_path, pf_sdict='module.encoder_q.'): FILE: src/benchmark/transfer_classification/datasets/BigEarthNet/bigearthnet_dataset_seco.py function normalize (line 117) | def normalize(img, mean, std): class Bigearthnet (line 125) | class Bigearthnet(Dataset): method __init__ (line 138) | def __init__(self, root, split, bands=None, transform=None, target_tra... method __getitem__ (line 165) | def __getitem__(self, index): method __len__ (line 192) | def __len__(self): method get_multihot_old (line 196) | def get_multihot_old(labels): method get_multihot_new (line 203) | def get_multihot_new(labels): FILE: src/benchmark/transfer_classification/datasets/BigEarthNet/bigearthnet_dataset_seco_lmdb_s2_uint8.py function normalize (line 17) | def normalize(img, mean, std): class Subset (line 24) | class Subset(Dataset): method __init__ (line 26) | def __init__(self, dataset, indices): method __getitem__ (line 30) | def __getitem__(self, idx): method __len__ (line 33) | def __len__(self): method __getattr__ (line 36) | def __getattr__(self, name): function random_subset (line 40) | def random_subset(dataset, frac, seed=None): class _RepeatSampler (line 46) | class _RepeatSampler(object): method __init__ (line 53) | def __init__(self, sampler): method __iter__ (line 56) | def __iter__(self): class InfiniteDataLoader (line 61) | class InfiniteDataLoader(DataLoader): method __init__ (line 67) | def __init__(self, *args, **kwargs): method __len__ (line 72) | def __len__(self): method __iter__ (line 75) | def __iter__(self): function make_lmdb (line 80) | def make_lmdb(dataset, lmdb_file, num_workers=6): class LMDBDataset (line 98) | class LMDBDataset(Dataset): method __init__ (line 100) | def __init__(self, lmdb_file, is_slurm_job=False, transform=None, norm... method _init_db (line 122) | def _init_db(self): method __getitem__ (line 128) | def __getitem__(self, index): method __len__ (line 149) | def __len__(self): FILE: src/benchmark/transfer_classification/datasets/EuroSat/eurosat_dataset.py function is_valid_file (line 51) | def is_valid_file(filename): function normalize (line 54) | def normalize(img, mean, std): class EurosatDataset (line 61) | class EurosatDataset(Dataset): method __init__ (line 63) | def __init__(self, root, bands='B13', transform=None, normalize=False): method __getitem__ (line 89) | def __getitem__(self, index): method __len__ (line 123) | def __len__(self): class Subset (line 127) | class Subset(Dataset): method __init__ (line 135) | def __init__(self, dataset, indices, transform=None): method __getitem__ (line 140) | def __getitem__(self, idx): method __len__ (line 146) | def __len__(self): FILE: src/benchmark/transfer_classification/datasets/So2Sat/so2sat_lcz42_dataset.py class Subset (line 52) | class Subset(Dataset): method __init__ (line 54) | def __init__(self, dataset, indices): method __getitem__ (line 58) | def __getitem__(self, idx): method __len__ (line 61) | def __len__(self): method __getattr__ (line 64) | def __getattr__(self, name): function random_subset (line 68) | def random_subset(dataset, frac, seed=None): function normalize (line 90) | def normalize(img, mean, std): class So2SatDataset (line 100) | class So2SatDataset(Dataset): method __init__ (line 101) | def __init__(self,path,bands=None,quantile=None,transform=None, normal... method __getitem__ (line 113) | def __getitem__(self, index): method __len__ (line 161) | def __len__(self): FILE: src/benchmark/transfer_classification/linear_BE_data2vec.py function build_dataset_be (line 41) | def build_dataset_be(is_train, args): function get_args (line 83) | def get_args(): function main (line 292) | def main(args, ds_init): FILE: src/benchmark/transfer_classification/linear_BE_dino.py function eval_linear (line 41) | def eval_linear(args): function train (line 212) | def train(model, linear_classifier, optimizer, loader, epoch, n, avgpool): function validate_network (line 259) | def validate_network(val_loader, model, linear_classifier, n, avgpool): class LinearClassifier (line 311) | class LinearClassifier(nn.Module): method __init__ (line 313) | def __init__(self, dim, num_labels=1000): method forward (line 320) | def forward(self, x): FILE: src/benchmark/transfer_classification/linear_BE_mae.py function get_args_parser (line 47) | def get_args_parser(): function main (line 127) | def main(args): FILE: src/benchmark/transfer_classification/linear_BE_moco.py function init_distributed_mode (line 69) | def init_distributed_mode(args): function fix_random_seeds (line 98) | def fix_random_seeds(seed=42): function adjust_learning_rate (line 106) | def adjust_learning_rate(optimizer, epoch, args): function main (line 118) | def main(): FILE: src/benchmark/transfer_classification/linear_BE_moco_v3.py function main (line 113) | def main(): function main_worker (line 157) | def main_worker(gpu, ngpus_per_node, args): function train (line 407) | def train(train_loader, model, criterion, optimizer, epoch, args): function validate (line 471) | def validate(val_loader, model, criterion, args): function save_checkpoint (line 526) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): function sanity_check (line 532) | def sanity_check(state_dict, pretrained_weights, linear_keyword): class AverageMeter (line 556) | class AverageMeter(object): method __init__ (line 558) | def __init__(self, name, fmt=':f'): method reset (line 563) | def reset(self): method update (line 569) | def update(self, val, n=1): method __str__ (line 575) | def __str__(self): class ProgressMeter (line 580) | class ProgressMeter(object): method __init__ (line 581) | def __init__(self, num_batches, meters, prefix=""): method display (line 586) | def display(self, batch): method _get_batch_fmtstr (line 591) | def _get_batch_fmtstr(self, num_batches): function adjust_learning_rate (line 597) | def adjust_learning_rate(optimizer, epoch, args): function accuracy (line 610) | def accuracy(output, target, topk=(1,)): FILE: src/benchmark/transfer_classification/linear_BE_sup.py function init_distributed_mode (line 71) | def init_distributed_mode(args): function fix_random_seeds (line 100) | def fix_random_seeds(seed=42): function adjust_learning_rate (line 108) | def adjust_learning_rate(optimizer, epoch, args): function main (line 120) | def main(): FILE: src/benchmark/transfer_classification/linear_EU_data2vec.py function build_dataset_eu (line 44) | def build_dataset_eu(is_train, args): function get_args (line 76) | def get_args(): function main (line 285) | def main(args, ds_init): FILE: src/benchmark/transfer_classification/linear_EU_dino.py function eval_linear (line 43) | def eval_linear(args): function train (line 199) | def train(model, linear_classifier, optimizer, loader, epoch, n, avgpool): function validate_network (line 243) | def validate_network(val_loader, model, linear_classifier, n, avgpool): class LinearClassifier (line 293) | class LinearClassifier(nn.Module): method __init__ (line 295) | def __init__(self, dim, num_labels=1000): method forward (line 302) | def forward(self, x): FILE: src/benchmark/transfer_classification/linear_EU_mae.py function get_args_parser (line 48) | def get_args_parser(): function main (line 127) | def main(args): FILE: src/benchmark/transfer_classification/linear_EU_moco.py function init_distributed_mode (line 57) | def init_distributed_mode(args): function fix_random_seeds (line 86) | def fix_random_seeds(seed=42): function adjust_learning_rate (line 94) | def adjust_learning_rate(optimizer, epoch, args): function main (line 106) | def main(): FILE: src/benchmark/transfer_classification/linear_EU_moco_v3.py function init_distributed_mode (line 60) | def init_distributed_mode(args): function fix_random_seeds (line 89) | def fix_random_seeds(seed=42): function adjust_learning_rate (line 97) | def adjust_learning_rate(optimizer, epoch, args): function main (line 109) | def main(): FILE: src/benchmark/transfer_classification/linear_SS_data2vec.py function build_dataset_ss (line 42) | def build_dataset_ss(is_train, args): function get_args (line 76) | def get_args(): function main (line 287) | def main(args, ds_init): FILE: src/benchmark/transfer_classification/linear_SS_dino.py function eval_linear (line 39) | def eval_linear(args): function train (line 201) | def train(model, linear_classifier, optimizer, loader, epoch, n, avgpool): function validate_network (line 245) | def validate_network(val_loader, model, linear_classifier, n, avgpool): class LinearClassifier (line 295) | class LinearClassifier(nn.Module): method __init__ (line 297) | def __init__(self, dim, num_labels=1000): method forward (line 304) | def forward(self, x): FILE: src/benchmark/transfer_classification/linear_SS_mae.py function get_args_parser (line 46) | def get_args_parser(): function main (line 125) | def main(args): FILE: src/benchmark/transfer_classification/linear_SS_moco.py function init_distributed_mode (line 53) | def init_distributed_mode(args): function fix_random_seeds (line 82) | def fix_random_seeds(seed=42): function adjust_learning_rate (line 90) | def adjust_learning_rate(optimizer, epoch, args): function main (line 102) | def main(): FILE: src/benchmark/transfer_classification/linear_SS_moco_v3.py function init_distributed_mode (line 60) | def init_distributed_mode(args): function fix_random_seeds (line 89) | def fix_random_seeds(seed=42): function adjust_learning_rate (line 97) | def adjust_learning_rate(optimizer, epoch, args): function main (line 109) | def main(): FILE: src/benchmark/transfer_classification/models/data2vec/dall_e/__init__.py function load_model (line 9) | def load_model(path: str, device: torch.device = None) -> nn.Module: FILE: src/benchmark/transfer_classification/models/data2vec/dall_e/decoder.py class DecoderBlock (line 13) | class DecoderBlock(nn.Module): method __attrs_post_init__ (line 21) | def __attrs_post_init__(self) -> None: method forward (line 38) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Decoder (line 42) | class Decoder(nn.Module): method __attrs_post_init__ (line 54) | def __attrs_post_init__(self) -> None: method forward (line 86) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: src/benchmark/transfer_classification/models/data2vec/dall_e/encoder.py class EncoderBlock (line 13) | class EncoderBlock(nn.Module): method __attrs_post_init__ (line 21) | def __attrs_post_init__(self) -> None: method forward (line 38) | def forward(self, x: torch.Tensor) -> torch.Tensor: class Encoder (line 42) | class Encoder(nn.Module): method __attrs_post_init__ (line 53) | def __attrs_post_init__(self) -> None: method forward (line 85) | def forward(self, x: torch.Tensor) -> torch.Tensor: FILE: src/benchmark/transfer_classification/models/data2vec/dall_e/utils.py class Conv2d (line 11) | class Conv2d(nn.Module): method __attrs_post_init__ (line 20) | def __attrs_post_init__(self) -> None: method forward (line 31) | def forward(self, x: torch.Tensor) -> torch.Tensor: function map_pixels (line 45) | def map_pixels(x: torch.Tensor) -> torch.Tensor: function unmap_pixels (line 51) | def unmap_pixels(x: torch.Tensor) -> torch.Tensor: FILE: src/benchmark/transfer_classification/models/data2vec/dataset_folder.py function has_file_allowed_extension (line 21) | def has_file_allowed_extension(filename: str, extensions: Tuple[str, ...... function is_image_file (line 34) | def is_image_file(filename: str) -> bool: function make_dataset (line 46) | def make_dataset( class DatasetFolder (line 76) | class DatasetFolder(VisionDataset): method __init__ (line 108) | def __init__( method _find_classes (line 138) | def _find_classes(self, dir: str) -> Tuple[List[str], Dict[str, int]]: method __getitem__ (line 156) | def __getitem__(self, index: int) -> Tuple[Any, Any]: method __len__ (line 180) | def __len__(self) -> int: function pil_loader (line 187) | def pil_loader(path: str) -> Image.Image: function accimage_loader (line 195) | def accimage_loader(path: str) -> Any: function default_loader (line 204) | def default_loader(path: str) -> Any: class ImageFolder (line 234) | class ImageFolder(DatasetFolder): method __init__ (line 261) | def __init__( FILE: src/benchmark/transfer_classification/models/data2vec/datasets.py class SeasonTransform (line 35) | class SeasonTransform: method __init__ (line 37) | def __init__(self, base_transform, season='fixed'): method __call__ (line 41) | def __call__(self, x): class DataAugmentations (line 64) | class DataAugmentations(object): method __init__ (line 65) | def __init__(self, args): method __call__ (line 130) | def __call__(self, image): method __repr__ (line 141) | def __repr__(self): function build_beit_pretraining_dataset (line 152) | def build_beit_pretraining_dataset(args): function build_transform (line 167) | def build_transform(is_train, args): FILE: src/benchmark/transfer_classification/models/data2vec/engine_for_cyclical.py function train_one_epoch (line 23) | def train_one_epoch(model: torch.nn.Module, model_ema: torch.nn.Module, ... FILE: src/benchmark/transfer_classification/models/data2vec/engine_for_cyclical_joint.py function train_one_epoch (line 24) | def train_one_epoch(model: torch.nn.Module, model_ema: torch.nn.Module, ... FILE: src/benchmark/transfer_classification/models/data2vec/engine_for_finetuning.py function train_class_batch (line 27) | def train_class_batch(model, samples, target, criterion, bool_masked_pos... function get_loss_scale_for_deepspeed (line 33) | def get_loss_scale_for_deepspeed(model): function train_one_epoch (line 38) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 173) | def evaluate(data_loader, model, device, metric='acc', padd=False, oneho... FILE: src/benchmark/transfer_classification/models/data2vec/engine_for_pretraining.py function train_one_epoch (line 22) | def train_one_epoch(model: torch.nn.Module, d_vae: torch.nn.Module, FILE: src/benchmark/transfer_classification/models/data2vec/masking_generator.py class MaskingGenerator (line 29) | class MaskingGenerator: method __init__ (line 30) | def __init__( method __repr__ (line 46) | def __repr__(self): method get_shape (line 52) | def get_shape(self): method _mask (line 55) | def _mask(self, mask, max_mask_patches): method __call__ (line 79) | def __call__(self): FILE: src/benchmark/transfer_classification/models/data2vec/modeling_cyclical.py function trunc_normal_ (line 22) | def trunc_normal_(tensor, mean=0.0, std=1.0): class VisionTransformerForCyclicalTraining (line 32) | class VisionTransformerForCyclicalTraining(nn.Module): method __init__ (line 33) | def __init__( method fix_init_weight (line 127) | def fix_init_weight(self): method _init_weights (line 135) | def _init_weights(self, m): method no_weight_decay (line 149) | def no_weight_decay(self): method get_num_layers (line 152) | def get_num_layers(self): method forward_features (line 155) | def forward_features(self, x, bool_masked_pos, layer_results): method forward (line 194) | def forward(self, x, bool_masked_pos, return_all_tokens=False, layer_r... function beit_base_patch16_224 (line 214) | def beit_base_patch16_224(pretrained=False, **kwargs): function beit_small_patch16_224 (line 234) | def beit_small_patch16_224(pretrained=False, **kwargs): function beit_large_patch16_224 (line 255) | def beit_large_patch16_224(pretrained=False, **kwargs): function beit_huge_patch16_224 (line 275) | def beit_huge_patch16_224(pretrained=False, **kwargs): FILE: src/benchmark/transfer_classification/models/data2vec/modeling_cyclical_joint.py function trunc_normal_ (line 22) | def trunc_normal_(tensor, mean=0.0, std=1.0): class VisionTransformerForCyclicalJointTraining (line 32) | class VisionTransformerForCyclicalJointTraining(nn.Module): method __init__ (line 33) | def __init__( method fix_init_weight (line 126) | def fix_init_weight(self): method _init_weights (line 134) | def _init_weights(self, m): method no_weight_decay (line 148) | def no_weight_decay(self): method get_num_layers (line 151) | def get_num_layers(self): method forward_features (line 154) | def forward_features(self, x, bool_masked_pos, layer_results): method forward (line 183) | def forward(self, x, bool_masked_pos, return_all_tokens=False, layer_r... function beit_base_joint_patch16_224 (line 203) | def beit_base_joint_patch16_224(pretrained=False, **kwargs): FILE: src/benchmark/transfer_classification/models/data2vec/modeling_discrete_vae.py function top_k (line 19) | def top_k(logits, thres = 0.5): function exists (line 28) | def exists(val): function default (line 32) | def default(val, d): function eval_decorator (line 36) | def eval_decorator(fn): class BasicVAE (line 46) | class BasicVAE(nn.Module): method get_codebook_indices (line 48) | def get_codebook_indices(self, images): method decode (line 51) | def decode(self, img_seq): method get_codebook_probs (line 54) | def get_codebook_probs(self, img_seq): method get_image_tokens_size (line 57) | def get_image_tokens_size(self): method get_image_size (line 60) | def get_image_size(self): class ResBlock (line 64) | class ResBlock(nn.Module): method __init__ (line 65) | def __init__(self, chan_in, hidden_size, chan_out): method forward (line 75) | def forward(self, x): class DiscreteVAE (line 79) | class DiscreteVAE(BasicVAE): method __init__ (line 80) | def __init__( method get_image_size (line 127) | def get_image_size(self): method get_image_tokens_size (line 130) | def get_image_tokens_size(self): method get_codebook_indices (line 135) | def get_codebook_indices(self, images): method get_codebook_probs (line 142) | def get_codebook_probs(self, images): method decode (line 146) | def decode( method forward (line 158) | def forward( class Dalle_VAE (line 206) | class Dalle_VAE(BasicVAE): method __init__ (line 207) | def __init__(self, image_size): method load_model (line 213) | def load_model(self, model_dir, device): method decode (line 217) | def decode(self, img_seq): method get_codebook_indices (line 223) | def get_codebook_indices(self, images): method get_codebook_probs (line 227) | def get_codebook_probs(self, images): method forward (line 231) | def forward(self, img_seq_prob, no_process=False): FILE: src/benchmark/transfer_classification/models/data2vec/modeling_finetune.py function _cfg (line 23) | def _cfg(url='', **kwargs): class DropPath (line 33) | class DropPath(nn.Module): method __init__ (line 36) | def __init__(self, drop_prob=None): method forward (line 40) | def forward(self, x): method extra_repr (line 43) | def extra_repr(self) -> str: class Mlp (line 47) | class Mlp(nn.Module): method __init__ (line 48) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 57) | def forward(self, x): class Attention (line 67) | class Attention(nn.Module): method __init__ (line 68) | def __init__( method forward (line 121) | def forward(self, x, rel_pos_bias=None): class Block (line 154) | class Block(nn.Module): method __init__ (line 156) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 177) | def forward(self, x, rel_pos_bias=None): class PatchEmbed (line 189) | class PatchEmbed(nn.Module): method __init__ (line 192) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 204) | def forward(self, x, **kwargs): class RelativePositionBias (line 213) | class RelativePositionBias(nn.Module): method __init__ (line 215) | def __init__(self, window_size, num_heads): method forward (line 244) | def forward(self): class VisionTransformer (line 252) | class VisionTransformer(nn.Module): method __init__ (line 255) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 315) | def fix_init_weight(self): method _init_weights (line 323) | def _init_weights(self, m): method get_num_layers (line 334) | def get_num_layers(self): method no_weight_decay (line 338) | def no_weight_decay(self): method get_classifier (line 341) | def get_classifier(self): method reset_classifier (line 344) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 348) | def forward_features(self, x, bool_masked_pos=None): method forward (line 391) | def forward(self, x, bool_masked_pos=None): function beit_small_patch16_224 (line 398) | def beit_small_patch16_224(pretrained=False, **kwargs): function beit_base_patch16_224 (line 407) | def beit_base_patch16_224(pretrained=False, **kwargs): function beit_base_patch16_384 (line 416) | def beit_base_patch16_384(pretrained=False, **kwargs): function beit_large_patch16_224 (line 425) | def beit_large_patch16_224(pretrained=False, **kwargs): function beit_large_patch16_384 (line 434) | def beit_large_patch16_384(pretrained=False, **kwargs): function beit_large_patch16_512 (line 443) | def beit_large_patch16_512(pretrained=False, **kwargs): FILE: src/benchmark/transfer_classification/models/data2vec/modeling_pretrain.py function trunc_normal_ (line 22) | def trunc_normal_(tensor, mean=0., std=1.): class VisionTransformerForMaskedImageModeling (line 32) | class VisionTransformerForMaskedImageModeling(nn.Module): method __init__ (line 33) | def __init__(self, img_size=224, patch_size=16, in_chans=3, vocab_size... method fix_init_weight (line 79) | def fix_init_weight(self): method _init_weights (line 87) | def _init_weights(self, m): method no_weight_decay (line 101) | def no_weight_decay(self): method get_num_layers (line 104) | def get_num_layers(self): method forward_features (line 107) | def forward_features(self, x, bool_masked_pos): method forward (line 129) | def forward(self, x, bool_masked_pos, return_all_tokens=False): function beit_base_patch16_224_8k_vocab (line 140) | def beit_base_patch16_224_8k_vocab(pretrained=False, **kwargs): function beit_large_patch16_224_8k_vocab (line 155) | def beit_large_patch16_224_8k_vocab(pretrained=False, **kwargs): FILE: src/benchmark/transfer_classification/models/data2vec/models.py function _cfg (line 32) | def _cfg(url='', **kwargs): class Attention (line 71) | class Attention(nn.Module): method __init__ (line 72) | def __init__( method forward (line 127) | def forward(self, x, rel_pos_bias: Optional[torch.Tensor] = None): class Block (line 157) | class Block(nn.Module): method __init__ (line 159) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, drop=... method forward (line 179) | def forward(self, x, rel_pos_bias: Optional[torch.Tensor] = None): class RelativePositionBias (line 189) | class RelativePositionBias(nn.Module): method __init__ (line 191) | def __init__(self, window_size, num_heads): method forward (line 220) | def forward(self): class Beit (line 228) | class Beit(nn.Module): method __init__ (line 232) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 281) | def fix_init_weight(self): method _init_weights (line 289) | def _init_weights(self, m): method get_num_layers (line 298) | def get_num_layers(self): method no_weight_decay (line 302) | def no_weight_decay(self): method get_classifier (line 305) | def get_classifier(self): method reset_classifier (line 308) | def reset_classifier(self, num_classes, global_pool=''): method forward_features (line 312) | def forward_features(self, x): method forward (line 333) | def forward(self, x): function _create_beit (line 339) | def _create_beit(variant, pretrained=False, default_cfg=None, **kwargs): function beit_base_patch16_224 (line 354) | def beit_base_patch16_224(pretrained=False, **kwargs): function beit_base_patch16_384 (line 366) | def beit_base_patch16_384(pretrained=False, **kwargs): function beit_base_patch16_224_in22k (line 375) | def beit_base_patch16_224_in22k(pretrained=False, **kwargs): function beit_large_patch16_224 (line 384) | def beit_large_patch16_224(pretrained=False, **kwargs): function beit_large_patch16_384 (line 393) | def beit_large_patch16_384(pretrained=False, **kwargs): function beit_large_patch16_512 (line 402) | def beit_large_patch16_512(pretrained=False, **kwargs): function beit_large_patch16_224_in22k (line 411) | def beit_large_patch16_224_in22k(pretrained=False, **kwargs): FILE: src/benchmark/transfer_classification/models/data2vec/optim_factory.py function get_num_layer_for_vit (line 33) | def get_num_layer_for_vit(var_name, num_max_layer): class LayerDecayValueAssigner (line 47) | class LayerDecayValueAssigner(object): method __init__ (line 48) | def __init__(self, values): method get_scale (line 51) | def get_scale(self, layer_id): method get_layer_id (line 54) | def get_layer_id(self, var_name): function get_parameter_groups (line 58) | def get_parameter_groups(model, weight_decay=1e-5, skip_list=(), get_num... function create_optimizer (line 100) | def create_optimizer(args, model, get_num_layer=None, get_layer_scale=No... FILE: src/benchmark/transfer_classification/models/data2vec/run_beit_pretraining.py function get_args (line 34) | def get_args(): function get_model (line 139) | def get_model(args): function main (line 154) | def main(args): FILE: src/benchmark/transfer_classification/models/data2vec/run_class_finetuning.py function get_args (line 39) | def get_args(): function main (line 241) | def main(args, ds_init): FILE: src/benchmark/transfer_classification/models/data2vec/run_cyclical.py function get_args (line 37) | def get_args(): function get_model (line 280) | def get_model(args): function main (line 304) | def main(args): FILE: src/benchmark/transfer_classification/models/data2vec/run_cyclical_joint.py function get_args (line 36) | def get_args(): function get_model (line 264) | def get_model(args): function main (line 279) | def main(args): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/backbone/beit.py class DropPath (line 26) | class DropPath(nn.Module): method __init__ (line 29) | def __init__(self, drop_prob=None): method forward (line 33) | def forward(self, x): method extra_repr (line 36) | def extra_repr(self) -> str: class Mlp (line 40) | class Mlp(nn.Module): method __init__ (line 41) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 50) | def forward(self, x): class Attention (line 60) | class Attention(nn.Module): method __init__ (line 61) | def __init__( method forward (line 117) | def forward(self, x, rel_pos_bias=None): class Block (line 150) | class Block(nn.Module): method __init__ (line 152) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 172) | def forward(self, x, rel_pos_bias=None): class PatchEmbed (line 182) | class PatchEmbed(nn.Module): method __init__ (line 185) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 197) | def forward(self, x, **kwargs): class HybridEmbed (line 209) | class HybridEmbed(nn.Module): method __init__ (line 213) | def __init__(self, backbone, img_size=224, feature_size=None, in_chans... method forward (line 237) | def forward(self, x): class RelativePositionBias (line 244) | class RelativePositionBias(nn.Module): method __init__ (line 246) | def __init__(self, window_size, num_heads): method forward (line 275) | def forward(self): class BEiT (line 284) | class BEiT(nn.Module): method __init__ (line 287) | def __init__(self, img_size=224, patch_size=16, in_chans=3, num_classe... method fix_init_weight (line 366) | def fix_init_weight(self): method _init_weights (line 374) | def _init_weights(self, m): method init_weights (line 383) | def init_weights(self, pretrained=None): method get_num_layers (line 409) | def get_num_layers(self): method no_weight_decay (line 413) | def no_weight_decay(self): method forward_features (line 416) | def forward_features(self, x): method forward (line 441) | def forward(self, x): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/mmcv_custom/apex_runner/apex_iter_based_runner.py class IterBasedRunnerAmp (line 20) | class IterBasedRunnerAmp(IterBasedRunner): method save_checkpoint (line 26) | def save_checkpoint(self, method resume (line 68) | def resume(self, FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/mmcv_custom/apex_runner/checkpoint.py function save_checkpoint (line 19) | def save_checkpoint(model, filename, optimizer=None, meta=None): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/mmcv_custom/apex_runner/optimizer.py class DistOptimizerHook (line 9) | class DistOptimizerHook(OptimizerHook): method __init__ (line 12) | def __init__(self, update_interval=1, grad_clip=None, coalesce=True, b... method before_run (line 19) | def before_run(self, runner): method after_train_iter (line 22) | def after_train_iter(self, runner): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/mmcv_custom/checkpoint.py function _get_mmcv_home (line 34) | def _get_mmcv_home(): function load_state_dict (line 45) | def load_state_dict(module, state_dict, strict=False, logger=None): function load_url_dist (line 113) | def load_url_dist(url, model_dir=None, map_location="cpu"): function load_pavimodel_dist (line 127) | def load_pavimodel_dist(model_path, map_location=None): function load_fileclient_dist (line 155) | def load_fileclient_dist(filename, backend, map_location): function get_torchvision_models (line 176) | def get_torchvision_models(): function get_external_models (line 188) | def get_external_models(): function get_mmcls_models (line 202) | def get_mmcls_models(): function get_deprecated_model_names (line 209) | def get_deprecated_model_names(): function _process_mmcls_checkpoint (line 218) | def _process_mmcls_checkpoint(checkpoint): function _load_checkpoint (line 229) | def _load_checkpoint(filename, map_location=None): function cosine_scheduler (line 290) | def cosine_scheduler(base_value, final_value, epochs, niter_per_ep, warm... function load_checkpoint (line 310) | def load_checkpoint(model, function weights_to_cpu (line 476) | def weights_to_cpu(state_dict): function _save_to_state_dict (line 491) | def _save_to_state_dict(module, destination, prefix, keep_vars): function get_state_dict (line 511) | def get_state_dict(module, destination=None, prefix='', keep_vars=False): function save_checkpoint (line 555) | def save_checkpoint(model, filename, optimizer=None, meta=None): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/mmcv_custom/layer_decay_optimizer_constructor.py function get_num_layer_for_vit (line 6) | def get_num_layer_for_vit(var_name, num_max_layer): class LayerDecayOptimizerConstructor (line 19) | class LayerDecayOptimizerConstructor(DefaultOptimizerConstructor): method add_params (line 20) | def add_params(self, params, module, prefix='', is_dcn_module=None): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/mmcv_custom/resize_transform.py class SETR_Resize (line 8) | class SETR_Resize(object): method __init__ (line 35) | def __init__(self, method random_select (line 66) | def random_select(img_scales): method random_sample (line 84) | def random_sample(img_scales): method random_sample_ratio (line 111) | def random_sample_ratio(img_scale, ratio_range): method _random_scale (line 137) | def _random_scale(self, results): method _resize_img (line 170) | def _resize_img(self, results): method _resize_seg (line 206) | def _resize_seg(self, results): method __call__ (line 217) | def __call__(self, results): method __repr__ (line 235) | def __repr__(self): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/mmcv_custom/train_api.py function set_random_seed (line 18) | def set_random_seed(seed, deterministic=False): function train_segmentor (line 37) | def train_segmentor(model, FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/tools/test.py function parse_args (line 17) | def parse_args(): function main (line 67) | def main(): FILE: src/benchmark/transfer_classification/models/data2vec/semantic_segmentation/tools/train.py function parse_args (line 23) | def parse_args(): function main (line 67) | def main(): FILE: src/benchmark/transfer_classification/models/data2vec/transforms.py class ToNumpy (line 20) | class ToNumpy: method __call__ (line 22) | def __call__(self, pil_img): class ToTensor (line 30) | class ToTensor: method __init__ (line 32) | def __init__(self, dtype=torch.float32): method __call__ (line 35) | def __call__(self, pil_img): function _pil_interp (line 53) | def _pil_interp(method): class RandomResizedCropAndInterpolationWithTwoPic (line 68) | class RandomResizedCropAndInterpolationWithTwoPic: method __init__ (line 83) | def __init__(self, size, second_size=None, scale=(0.08, 1.0), ratio=(3... method get_params (line 109) | def get_params(img, scale, ratio): method __call__ (line 151) | def __call__(self, img): method __repr__ (line 170) | def __repr__(self): FILE: src/benchmark/transfer_classification/models/data2vec/utils.py class SmoothedValue (line 33) | class SmoothedValue(object): method __init__ (line 38) | def __init__(self, window_size=20, fmt=None): method update (line 46) | def update(self, value, n=1): method synchronize_between_processes (line 51) | def synchronize_between_processes(self): method median (line 65) | def median(self): method avg (line 70) | def avg(self): method global_avg (line 75) | def global_avg(self): method max (line 79) | def max(self): method value (line 83) | def value(self): method __str__ (line 86) | def __str__(self): class MetricLogger (line 95) | class MetricLogger(object): method __init__ (line 96) | def __init__(self, delimiter="\t"): method update (line 100) | def update(self, **kwargs): method __getattr__ (line 109) | def __getattr__(self, attr): method __str__ (line 117) | def __str__(self): method synchronize_between_processes (line 125) | def synchronize_between_processes(self): method add_meter (line 129) | def add_meter(self, name, meter): method log_every (line 132) | def log_every(self, iterable, print_freq, header=None): class TensorboardLogger (line 179) | class TensorboardLogger(object): method __init__ (line 180) | def __init__(self, log_dir): method set_step (line 184) | def set_step(self, step=None): method update (line 190) | def update(self, head='scalar', step=None, **kwargs): method flush (line 199) | def flush(self): function _load_checkpoint_for_ema (line 203) | def _load_checkpoint_for_ema(model_ema, checkpoint): function setup_for_distributed (line 217) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 232) | def is_dist_avail_and_initialized(): function get_world_size (line 240) | def get_world_size(): function get_rank (line 246) | def get_rank(): function is_main_process (line 252) | def is_main_process(): function save_on_master (line 256) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 261) | def init_distributed_mode(args): function load_state_dict (line 314) | def load_state_dict(model, state_dict, prefix='', ignore_missing="relati... class NativeScalerWithGradNormCount (line 363) | class NativeScalerWithGradNormCount: method __init__ (line 366) | def __init__(self): method __call__ (line 369) | def __call__(self, loss, optimizer, clip_grad=None, parameters=None, c... method state_dict (line 385) | def state_dict(self): method load_state_dict (line 388) | def load_state_dict(self, state_dict): function get_grad_norm_ (line 392) | def get_grad_norm_(parameters, norm_type: float = 2.0) -> torch.Tensor: function cosine_scheduler (line 407) | def cosine_scheduler(base_value, final_value, epochs, niter_per_ep, warm... function tri_phase_scheduler (line 426) | def tri_phase_scheduler(base_value, final_value, epochs, niter_per_ep, w... function save_model (line 461) | def save_model(args, epoch, model, model_without_ddp, optimizer, loss_sc... function auto_load_model (line 486) | def auto_load_model(args, model, model_without_ddp, optimizer, loss_scal... function create_d_vae (line 541) | def create_d_vae(weight_path, d_vae_type, image_size, device): function get_dalle_vae (line 550) | def get_dalle_vae(weight_path, image_size, device): function get_d_vae (line 556) | def get_d_vae(weight_path, image_size, device): function create_ds_config (line 576) | def create_ds_config(args): FILE: src/benchmark/transfer_classification/models/dino/utils.py class GaussianBlur (line 37) | class GaussianBlur(object): method __init__ (line 41) | def __init__(self, p=0.5, radius_min=0.1, radius_max=2.): method __call__ (line 46) | def __call__(self, img): class cvGaussianBlur (line 58) | class cvGaussianBlur(object): method __init__ (line 61) | def __init__(self, p=0.5, sigma=[.1, 2.]): method __call__ (line 65) | def __call__(self, x): class Solarization (line 78) | class Solarization(object): method __init__ (line 82) | def __init__(self, p): method __call__ (line 85) | def __call__(self, img): function load_pretrained_weights (line 92) | def load_pretrained_weights(model, pretrained_weights, checkpoint_key, m... function load_pretrained_linear_weights (line 133) | def load_pretrained_linear_weights(linear_classifier, model_name, patch_... function clip_gradients (line 153) | def clip_gradients(model, clip): function cancel_gradients_last_layer (line 165) | def cancel_gradients_last_layer(epoch, model, freeze_last_layer): function restart_from_checkpoint (line 173) | def restart_from_checkpoint(ckp_path, run_variables=None, **kwargs): function cosine_scheduler (line 208) | def cosine_scheduler(base_value, final_value, epochs, niter_per_ep, warm... function bool_flag (line 222) | def bool_flag(s): function fix_random_seeds (line 236) | def fix_random_seeds(seed=31): class SmoothedValue (line 245) | class SmoothedValue(object): method __init__ (line 250) | def __init__(self, window_size=20, fmt=None): method update (line 258) | def update(self, value, n=1): method synchronize_between_processes (line 263) | def synchronize_between_processes(self): method median (line 277) | def median(self): method avg (line 282) | def avg(self): method global_avg (line 287) | def global_avg(self): method max (line 291) | def max(self): method value (line 295) | def value(self): method __str__ (line 298) | def __str__(self): function reduce_dict (line 307) | def reduce_dict(input_dict, average=True): class MetricLogger (line 334) | class MetricLogger(object): method __init__ (line 335) | def __init__(self, delimiter="\t"): method update (line 339) | def update(self, **kwargs): method __getattr__ (line 346) | def __getattr__(self, attr): method __str__ (line 354) | def __str__(self): method synchronize_between_processes (line 362) | def synchronize_between_processes(self): method add_meter (line 366) | def add_meter(self, name, meter): method log_every (line 369) | def log_every(self, iterable, print_freq, header=None): function get_sha (line 424) | def get_sha(): function is_dist_avail_and_initialized (line 444) | def is_dist_avail_and_initialized(): function get_world_size (line 452) | def get_world_size(): function get_rank (line 458) | def get_rank(): function is_main_process (line 464) | def is_main_process(): function save_on_master (line 468) | def save_on_master(*args, **kwargs): function setup_for_distributed (line 473) | def setup_for_distributed(is_master): function init_distributed_mode (line 488) | def init_distributed_mode(args): function accuracy (line 526) | def accuracy(output, target, topk=(1,)): function _no_grad_trunc_normal_ (line 536) | def _no_grad_trunc_normal_(tensor, mean, std, a, b): function trunc_normal_ (line 572) | def trunc_normal_(tensor, mean=0., std=1., a=-2., b=2.): class LARS (line 577) | class LARS(torch.optim.Optimizer): method __init__ (line 581) | def __init__(self, params, lr=0, weight_decay=0, momentum=0.9, eta=0.001, method step (line 589) | def step(self): class MultiCropWrapper (line 618) | class MultiCropWrapper(nn.Module): method __init__ (line 627) | def __init__(self, backbone, head): method forward (line 634) | def forward(self, x): function get_params_groups (line 656) | def get_params_groups(model): function has_batchnorms (line 670) | def has_batchnorms(model): class PCA (line 678) | class PCA(): method __init__ (line 682) | def __init__(self, dim=256, whit=0.5): method train_pca (line 687) | def train_pca(self, cov): method apply (line 713) | def apply(self, x): function compute_ap (line 732) | def compute_ap(ranks, nres): function compute_map (line 767) | def compute_map(ranks, gnd, kappas=[]): function multi_scale (line 839) | def multi_scale(samples, model): FILE: src/benchmark/transfer_classification/models/dino/vision_transformer.py function drop_path (line 27) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 38) | class DropPath(nn.Module): method __init__ (line 41) | def __init__(self, drop_prob=None): method forward (line 45) | def forward(self, x): class Mlp (line 49) | class Mlp(nn.Module): method __init__ (line 50) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 59) | def forward(self, x): class Attention (line 68) | class Attention(nn.Module): method __init__ (line 69) | def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, at... method forward (line 80) | def forward(self, x): class Block (line 95) | class Block(nn.Module): method __init__ (line 96) | def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_sc... method forward (line 107) | def forward(self, x, return_attention=False): class PatchEmbed (line 116) | class PatchEmbed(nn.Module): method __init__ (line 119) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 128) | def forward(self, x): class VisionTransformer (line 134) | class VisionTransformer(nn.Module): method __init__ (line 136) | def __init__(self, img_size=[224], patch_size=16, in_chans=3, num_clas... method _init_weights (line 165) | def _init_weights(self, m): method interpolate_pos_encoding (line 174) | def interpolate_pos_encoding(self, x, w, h): method prepare_tokens (line 196) | def prepare_tokens(self, x): method forward (line 209) | def forward(self, x): method get_last_selfattention (line 216) | def get_last_selfattention(self, x): method get_intermediate_layers (line 225) | def get_intermediate_layers(self, x, n=1): function vit_tiny (line 236) | def vit_tiny(patch_size=16, **kwargs): function vit_small (line 243) | def vit_small(patch_size=16, **kwargs): function vit_base (line 250) | def vit_base(patch_size=16, **kwargs): class DINOHead (line 257) | class DINOHead(nn.Module): method __init__ (line 258) | def __init__(self, in_dim, out_dim, use_bn=False, norm_last_layer=True... method _init_weights (line 281) | def _init_weights(self, m): method forward (line 287) | def forward(self, x): FILE: src/benchmark/transfer_classification/models/mae/engine_finetune.py function train_one_epoch (line 25) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 99) | def evaluate(data_loader, model, device): FILE: src/benchmark/transfer_classification/models/mae/engine_finetune_BE.py function train_one_epoch (line 29) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 107) | def evaluate(data_loader, model, device, criterion): FILE: src/benchmark/transfer_classification/models/mae/engine_finetune_EU.py function train_one_epoch (line 29) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 104) | def evaluate(data_loader, model, device, criterion): FILE: src/benchmark/transfer_classification/models/mae/engine_finetune_SS.py function train_one_epoch (line 29) | def train_one_epoch(model: torch.nn.Module, criterion: torch.nn.Module, function evaluate (line 104) | def evaluate(data_loader, model, device, criterion): FILE: src/benchmark/transfer_classification/models/mae/engine_pretrain.py function train_one_epoch (line 23) | def train_one_epoch(model: torch.nn.Module, FILE: src/benchmark/transfer_classification/models/mae/main_finetune.py function get_args_parser (line 42) | def get_args_parser(): function main (line 158) | def main(args): FILE: src/benchmark/transfer_classification/models/mae/main_linprobe.py function get_args_parser (line 47) | def get_args_parser(): function main (line 121) | def main(args): FILE: src/benchmark/transfer_classification/models/mae/main_pretrain.py class SeasonTransform (line 41) | class SeasonTransform: method __init__ (line 43) | def __init__(self, base_transform, season='fixed'): method __call__ (line 47) | def __call__(self, x): function get_args_parser (line 72) | def get_args_parser(): function main (line 151) | def main(args): FILE: src/benchmark/transfer_classification/models/mae/models_mae.py class MaskedAutoencoderViT (line 22) | class MaskedAutoencoderViT(nn.Module): method __init__ (line 25) | def __init__(self, img_size=224, patch_size=16, in_chans=3, method initialize_weights (line 67) | def initialize_weights(self): method _init_weights (line 87) | def _init_weights(self, m): method patchify (line 97) | def patchify(self, imgs): method unpatchify (line 111) | def unpatchify(self, x): method random_masking (line 125) | def random_masking(self, x, mask_ratio): method forward_encoder (line 152) | def forward_encoder(self, x, mask_ratio): method forward_decoder (line 174) | def forward_decoder(self, x, ids_restore): method forward_loss (line 200) | def forward_loss(self, imgs, pred, mask): method forward (line 218) | def forward(self, imgs, mask_ratio=0.75): function mae_vit_small_patch16_dec512d8b (line 225) | def mae_vit_small_patch16_dec512d8b(**kwargs): function mae_vit_base_patch16_dec512d8b (line 232) | def mae_vit_base_patch16_dec512d8b(**kwargs): function mae_vit_large_patch16_dec512d8b (line 240) | def mae_vit_large_patch16_dec512d8b(**kwargs): function mae_vit_huge_patch14_dec512d8b (line 248) | def mae_vit_huge_patch14_dec512d8b(**kwargs): FILE: src/benchmark/transfer_classification/models/mae/models_vit.py class VisionTransformer (line 20) | class VisionTransformer(timm.models.vision_transformer.VisionTransformer): method __init__ (line 23) | def __init__(self, global_pool=False, **kwargs): method forward_features (line 34) | def forward_features(self, x): function vit_small_patch16 (line 55) | def vit_small_patch16(**kwargs): function vit_base_patch16 (line 61) | def vit_base_patch16(**kwargs): function vit_large_patch16 (line 68) | def vit_large_patch16(**kwargs): function vit_huge_patch14 (line 75) | def vit_huge_patch14(**kwargs): FILE: src/benchmark/transfer_classification/models/mae/submitit_finetune.py function parse_args (line 19) | def parse_args(): function get_shared_folder (line 33) | def get_shared_folder() -> Path: function get_init_file (line 42) | def get_init_file(): class Trainer (line 51) | class Trainer(object): method __init__ (line 52) | def __init__(self, args): method __call__ (line 55) | def __call__(self): method checkpoint (line 61) | def checkpoint(self): method _setup_gpu_args (line 73) | def _setup_gpu_args(self): function main (line 86) | def main(): FILE: src/benchmark/transfer_classification/models/mae/submitit_linprobe.py function parse_args (line 19) | def parse_args(): function get_shared_folder (line 33) | def get_shared_folder() -> Path: function get_init_file (line 42) | def get_init_file(): class Trainer (line 51) | class Trainer(object): method __init__ (line 52) | def __init__(self, args): method __call__ (line 55) | def __call__(self): method checkpoint (line 61) | def checkpoint(self): method _setup_gpu_args (line 73) | def _setup_gpu_args(self): function main (line 86) | def main(): FILE: src/benchmark/transfer_classification/models/mae/submitit_pretrain.py function parse_args (line 19) | def parse_args(): function get_shared_folder (line 33) | def get_shared_folder() -> Path: function get_init_file (line 42) | def get_init_file(): class Trainer (line 51) | class Trainer(object): method __init__ (line 52) | def __init__(self, args): method __call__ (line 55) | def __call__(self): method checkpoint (line 61) | def checkpoint(self): method _setup_gpu_args (line 73) | def _setup_gpu_args(self): function main (line 86) | def main(): FILE: src/benchmark/transfer_classification/models/mae/util/crop.py class RandomResizedCrop (line 15) | class RandomResizedCrop(transforms.RandomResizedCrop): method get_params (line 23) | def get_params(img, scale, ratio): FILE: src/benchmark/transfer_classification/models/mae/util/datasets.py function build_dataset (line 20) | def build_dataset(is_train, args): function build_transform (line 31) | def build_transform(is_train, args): FILE: src/benchmark/transfer_classification/models/mae/util/lars.py class LARS (line 14) | class LARS(torch.optim.Optimizer): method __init__ (line 18) | def __init__(self, params, lr=0, weight_decay=0, momentum=0.9, trust_c... method step (line 23) | def step(self): FILE: src/benchmark/transfer_classification/models/mae/util/lr_decay.py function param_groups_lrd (line 15) | def param_groups_lrd(model, weight_decay=0.05, no_weight_decay_list=[], ... function get_layer_id_for_vit (line 64) | def get_layer_id_for_vit(name, num_layers): FILE: src/benchmark/transfer_classification/models/mae/util/lr_sched.py function adjust_learning_rate (line 9) | def adjust_learning_rate(optimizer, epoch, args): FILE: src/benchmark/transfer_classification/models/mae/util/misc.py class SmoothedValue (line 24) | class SmoothedValue(object): method __init__ (line 29) | def __init__(self, window_size=20, fmt=None): method update (line 37) | def update(self, value, n=1): method synchronize_between_processes (line 42) | def synchronize_between_processes(self): method median (line 56) | def median(self): method avg (line 61) | def avg(self): method global_avg (line 66) | def global_avg(self): method max (line 70) | def max(self): method value (line 74) | def value(self): method __str__ (line 77) | def __str__(self): class MetricLogger (line 86) | class MetricLogger(object): method __init__ (line 87) | def __init__(self, delimiter="\t"): method update (line 91) | def update(self, **kwargs): method __getattr__ (line 100) | def __getattr__(self, attr): method __str__ (line 108) | def __str__(self): method synchronize_between_processes (line 116) | def synchronize_between_processes(self): method add_meter (line 120) | def add_meter(self, name, meter): method log_every (line 123) | def log_every(self, iterable, print_freq, header=None): function setup_for_distributed (line 170) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 187) | def is_dist_avail_and_initialized(): function get_world_size (line 195) | def get_world_size(): function get_rank (line 201) | def get_rank(): function is_main_process (line 207) | def is_main_process(): function save_on_master (line 211) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 216) | def init_distributed_mode(args): class NativeScalerWithGradNormCount (line 253) | class NativeScalerWithGradNormCount: method __init__ (line 256) | def __init__(self): method __call__ (line 259) | def __call__(self, loss, optimizer, clip_grad=None, parameters=None, c... method state_dict (line 275) | def state_dict(self): method load_state_dict (line 278) | def load_state_dict(self, state_dict): function get_grad_norm_ (line 282) | def get_grad_norm_(parameters, norm_type: float = 2.0) -> torch.Tensor: function save_model (line 297) | def save_model(args, epoch, model, model_without_ddp, optimizer, loss_sc... function load_model (line 317) | def load_model(args, model_without_ddp, optimizer, loss_scaler): function all_reduce_mean (line 334) | def all_reduce_mean(x): FILE: src/benchmark/transfer_classification/models/mae/util/pos_embed.py function get_2d_sincos_pos_embed (line 20) | def get_2d_sincos_pos_embed(embed_dim, grid_size, cls_token=False): function get_2d_sincos_pos_embed_from_grid (line 38) | def get_2d_sincos_pos_embed_from_grid(embed_dim, grid): function get_1d_sincos_pos_embed_from_grid (line 49) | def get_1d_sincos_pos_embed_from_grid(embed_dim, pos): function interpolate_pos_embed (line 75) | def interpolate_pos_embed(model, checkpoint_model): FILE: src/benchmark/transfer_classification/models/moco/builder.py class MoCo (line 6) | class MoCo(nn.Module): method __init__ (line 11) | def __init__(self, base_encoder, dim=128, K=65536, m=0.999, T=0.07, ml... method _momentum_update_key_encoder (line 68) | def _momentum_update_key_encoder(self): method _dequeue_and_enqueue (line 76) | def _dequeue_and_enqueue(self, keys): method _batch_shuffle_ddp (line 92) | def _batch_shuffle_ddp(self, x): method _batch_unshuffle_ddp (line 120) | def _batch_unshuffle_ddp(self, x, idx_unshuffle): method forward (line 138) | def forward(self, im_q, im_k): function concat_all_gather (line 188) | def concat_all_gather(tensor): FILE: src/benchmark/transfer_classification/models/moco/loader.py class TwoCropsTransform (line 11) | class TwoCropsTransform: method __init__ (line 14) | def __init__(self, base_transform): method __call__ (line 17) | def __call__(self, x): class GaussianBlur (line 23) | class GaussianBlur(object): method __init__ (line 26) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 29) | def __call__(self, x): FILE: src/benchmark/transfer_classification/models/moco_v2/builder.py class MoCo (line 6) | class MoCo(nn.Module): method __init__ (line 11) | def __init__(self, base_encoder, dim=128, K=65536, m=0.999, T=0.07, ml... method _momentum_update_key_encoder (line 57) | def _momentum_update_key_encoder(self): method _dequeue_and_enqueue (line 65) | def _dequeue_and_enqueue(self, keys): method _batch_shuffle_ddp (line 81) | def _batch_shuffle_ddp(self, x): method _batch_unshuffle_ddp (line 109) | def _batch_unshuffle_ddp(self, x, idx_unshuffle): method forward (line 127) | def forward(self, im_q, im_k): function concat_all_gather (line 177) | def concat_all_gather(tensor): FILE: src/benchmark/transfer_classification/models/moco_v2/detection/train_net.py class Res5ROIHeadsExtraNorm (line 15) | class Res5ROIHeadsExtraNorm(Res5ROIHeads): method _build_res5_block (line 20) | def _build_res5_block(self, cfg): class Trainer (line 28) | class Trainer(DefaultTrainer): method build_evaluator (line 30) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): function setup (line 40) | def setup(args): function main (line 49) | def main(args): FILE: src/benchmark/transfer_classification/models/moco_v2/loader.py class TwoCropsTransform (line 11) | class TwoCropsTransform: method __init__ (line 14) | def __init__(self, base_transform): method __call__ (line 17) | def __call__(self, x): class GaussianBlur (line 23) | class GaussianBlur(object): method __init__ (line 26) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 29) | def __call__(self, x): FILE: src/benchmark/transfer_classification/models/moco_v2/main_lincls.py function main (line 86) | def main(): function main_worker (line 121) | def main_worker(gpu, ngpus_per_node, args): function train (line 308) | def train(train_loader, model, criterion, optimizer, epoch, args): function validate (line 360) | def validate(val_loader, model, criterion, args): function save_checkpoint (line 404) | def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): function sanity_check (line 410) | def sanity_check(state_dict, pretrained_weights): class AverageMeter (line 434) | class AverageMeter(object): method __init__ (line 436) | def __init__(self, name, fmt=':f'): method reset (line 441) | def reset(self): method update (line 447) | def update(self, val, n=1): method __str__ (line 453) | def __str__(self): class ProgressMeter (line 458) | class ProgressMeter(object): method __init__ (line 459) | def __init__(self, num_batches, meters, prefix=""): method display (line 464) | def display(self, batch): method _get_batch_fmtstr (line 469) | def _get_batch_fmtstr(self, num_batches): function adjust_learning_rate (line 475) | def adjust_learning_rate(optimizer, epoch, args): function accuracy (line 484) | def accuracy(output, target, topk=(1,)): FILE: src/benchmark/transfer_classification/models/moco_v3/builder.py class MoCo (line 11) | class MoCo(nn.Module): method __init__ (line 16) | def __init__(self, base_encoder, dim=256, mlp_dim=4096, T=1.0): method _build_mlp (line 36) | def _build_mlp(self, num_layers, input_dim, mlp_dim, output_dim, last_... method _build_projector_and_predictor_mlps (line 54) | def _build_projector_and_predictor_mlps(self, dim, mlp_dim): method _update_momentum_encoder (line 58) | def _update_momentum_encoder(self, m): method contrastive_loss (line 63) | def contrastive_loss(self, q, k): method forward (line 75) | def forward(self, x1, x2, m): class MoCo_ResNet (line 99) | class MoCo_ResNet(MoCo): method _build_projector_and_predictor_mlps (line 100) | def _build_projector_and_predictor_mlps(self, dim, mlp_dim): class MoCo_ViT (line 112) | class MoCo_ViT(MoCo): method _build_projector_and_predictor_mlps (line 113) | def _build_projector_and_predictor_mlps(self, dim, mlp_dim): function concat_all_gather (line 127) | def concat_all_gather(tensor): FILE: src/benchmark/transfer_classification/models/moco_v3/loader.py class TwoCropsTransform (line 14) | class TwoCropsTransform: method __init__ (line 17) | def __init__(self, base_transform1, base_transform2): method __call__ (line 21) | def __call__(self, x): class GaussianBlur (line 27) | class GaussianBlur(object): method __init__ (line 30) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 33) | def __call__(self, x): class Solarize (line 40) | class Solarize(object): method __call__ (line 43) | def __call__(self, x): class cvGaussianBlur (line 50) | class cvGaussianBlur(object): method __init__ (line 53) | def __init__(self, p=0.5, sigma=[.1, 2.]): method __call__ (line 57) | def __call__(self, x): FILE: src/benchmark/transfer_classification/models/moco_v3/optimizer.py class LARS (line 10) | class LARS(torch.optim.Optimizer): method __init__ (line 14) | def __init__(self, params, lr=0, weight_decay=0, momentum=0.9, trust_c... method step (line 19) | def step(self): FILE: src/benchmark/transfer_classification/models/moco_v3/vits.py class VisionTransformerMoCo (line 25) | class VisionTransformerMoCo(VisionTransformer): method __init__ (line 26) | def __init__(self, stop_grad_conv1=False, **kwargs): method build_2d_sincos_position_embedding (line 53) | def build_2d_sincos_position_embedding(self, temperature=10000.): class ConvStem (line 72) | class ConvStem(nn.Module): method __init__ (line 76) | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=... method forward (line 104) | def forward(self, x): function vit_small (line 115) | def vit_small(**kwargs): function vit_base (line 122) | def vit_base(**kwargs): function vit_conv_small (line 129) | def vit_conv_small(**kwargs): function vit_conv_base (line 137) | def vit_conv_base(**kwargs): FILE: src/benchmark/transfer_classification/models/rs_transforms_float32.py class RandomBrightness (line 7) | class RandomBrightness(object): method __init__ (line 10) | def __init__(self, brightness=0.4): method __call__ (line 13) | def __call__(self, sample): class RandomContrast (line 19) | class RandomContrast(object): method __init__ (line 22) | def __init__(self, contrast=0.4): method __call__ (line 25) | def __call__(self, sample): class ToGray (line 31) | class ToGray(object): method __init__ (line 32) | def __init__(self, out_channels): method __call__ (line 34) | def __call__(self,sample): class RandomChannelDrop (line 41) | class RandomChannelDrop(object): method __init__ (line 44) | def __init__(self, min_n_drop=1, max_n_drop=8): method __call__ (line 48) | def __call__(self, sample): FILE: src/benchmark/transfer_classification/models/rs_transforms_uint8.py class RandomBrightness (line 7) | class RandomBrightness(object): method __init__ (line 10) | def __init__(self, brightness=0.4): method __call__ (line 13) | def __call__(self, sample): class RandomContrast (line 19) | class RandomContrast(object): method __init__ (line 22) | def __init__(self, contrast=0.4): method __call__ (line 25) | def __call__(self, sample): class ToGray (line 31) | class ToGray(object): method __init__ (line 32) | def __init__(self, out_channels): method __call__ (line 34) | def __call__(self,sample): class RandomChannelDrop (line 41) | class RandomChannelDrop(object): method __init__ (line 44) | def __init__(self, min_n_drop=1, max_n_drop=8): method __call__ (line 48) | def __call__(self, sample): class GaussianBlur (line 57) | class GaussianBlur(object): method __init__ (line 60) | def __init__(self, sigma=[.1, 2.]): method __call__ (line 63) | def __call__(self, x): class Solarize (line 70) | class Solarize(object): method __init__ (line 72) | def __init__(self, threshold=0.5): method __call__ (line 75) | def __call__(self, x): class RandomSensorDrop_S1S2 (line 82) | class RandomSensorDrop_S1S2(object): method __init__ (line 85) | def __init__(self): method __call__ (line 88) | def __call__(self, sample): class SensorDrop_S1S2 (line 98) | class SensorDrop_S1S2(object): method __init__ (line 99) | def __init__(self, sensor): method __call__ (line 101) | def __call__(self,sample): class RandomSensorDrop_RGBD (line 109) | class RandomSensorDrop_RGBD(object): method __init__ (line 112) | def __init__(self): method __call__ (line 115) | def __call__(self, sample): class SensorDrop_RGBD (line 125) | class SensorDrop_RGBD(object): method __init__ (line 126) | def __init__(self, sensor): method __call__ (line 128) | def __call__(self,sample): FILE: src/download_data/convert_rgb.py function normalize (line 73) | def normalize(img,mean,std): function get_array (line 82) | def get_array(patch_id, mode, RGB=False, norm=False): FILE: src/download_data/ssl4eo_downloader.py class UniformSampler (line 98) | class UniformSampler: method sample_point (line 99) | def sample_point(self) -> List[float]: class GaussianSampler (line 105) | class GaussianSampler: method __init__ (line 106) | def __init__( method sample_point (line 119) | def sample_point(self) -> List[float]: method get_world_cities (line 127) | def get_world_cities(download_root: str = "world_cities") -> List[Dict... method get_interest_points (line 143) | def get_interest_points( method km2deg (line 151) | def km2deg(kms: float, radius: float = 6371) -> float: method deg2km (line 155) | def deg2km(deg: float, radius: float = 6371) -> float: class BoundedUniformSampler (line 159) | class BoundedUniformSampler: method __init__ (line 160) | def __init__(self, boundaries: shape = None) -> None: method sample_point (line 166) | def sample_point(self) -> List[float]: method get_country_boundaries (line 177) | def get_country_boundaries( class OverlapError (line 188) | class OverlapError(Exception): function date2str (line 192) | def date2str(date: datetime) -> str: function get_period (line 196) | def get_period(date: datetime, days: int = 5) -> Tuple[str, str, str, str]: function maskS2clouds (line 212) | def maskS2clouds(args: Any, image: ee.Image) -> ee.Image: function get_collection (line 220) | def get_collection( function filter_collection (line 230) | def filter_collection( function center_crop (line 254) | def center_crop( function adjust_coords (line 264) | def adjust_coords( function get_properties (line 280) | def get_properties(image: ee.Image) -> Any: function get_patch (line 284) | def get_patch( function get_random_patches_match (line 329) | def get_random_patches_match( function get_random_patches_rtree (line 366) | def get_random_patches_rtree( function get_random_patches_grid (line 447) | def get_random_patches_grid( function save_geotiff (line 526) | def save_geotiff( function save_patch (line 550) | def save_patch( class Counter (line 567) | class Counter: method __init__ (line 568) | def __init__(self, start: int = 0) -> None: method update (line 572) | def update(self, delta: int = 1) -> int: function fix_random_seeds (line 578) | def fix_random_seeds(seed: int = 42) -> None: function worker (line 756) | def worker(idx: int) -> None: FILE: src/download_data/ssl4eo_s12_downloader.py class GeoSampler (line 59) | class GeoSampler: method sample_point (line 61) | def sample_point(self): class UniformSampler (line 65) | class UniformSampler(GeoSampler): method sample_point (line 67) | def sample_point(self): class GaussianSampler (line 74) | class GaussianSampler(GeoSampler): method __init__ (line 76) | def __init__(self, interest_points=None, num_cities=1000, std=20): method sample_point (line 84) | def sample_point(self,idx): method get_world_cities (line 96) | def get_world_cities(download_root=os.path.expanduser('./world_cities/... method get_interest_points (line 110) | def get_interest_points(cities, size=10000): method km2deg (line 116) | def km2deg(kms, radius=6371): method deg2km (line 119) | def deg2km(deg, radius=6371): class BoundedUniformSampler (line 123) | class BoundedUniformSampler(GeoSampler): method __init__ (line 125) | def __init__(self, boundaries=None): method sample_point (line 131) | def sample_point(self): method get_country_boundaries (line 143) | def get_country_boundaries(download_root=os.path.expanduser('~/.cache/... class OverlapError (line 152) | class OverlapError(Exception): function date2str (line 156) | def date2str(date): function get_period (line 160) | def get_period(date, days=5): function maskS2clouds (line 168) | def maskS2clouds(image): function get_collection_s2a (line 179) | def get_collection_s2a(cloud_pct=20): function get_collection_s2c (line 185) | def get_collection_s2c(cloud_pct=20): function get_collection_s1 (line 191) | def get_collection_s1(): function filter_collection (line 195) | def filter_collection(collection, coords, period=None): function filter_collection_s1 (line 208) | def filter_collection_s1(collection, coords, period=None): function center_crop (line 226) | def center_crop(img, out_size): function adjust_coords (line 234) | def adjust_coords(coords, old_size, new_size): function get_properties (line 245) | def get_properties(image): function get_patch_s1 (line 252) | def get_patch_s1(collection, coords, radius, bands=None, crop=None): function get_patch_s2 (line 286) | def get_patch_s2(collection, coords, radius, bands=None, crop=None): function get_random_patches_grid (line 324) | def get_random_patches_grid(idx, collections, bands, crops, sampler, dat... function get_random_patches_rtree (line 382) | def get_random_patches_rtree(idx, collections, bands, crops, sampler, da... function get_random_patches_match (line 433) | def get_random_patches_match(idx, collections, bands, crops, sampler, da... function save_geotiff (line 471) | def save_geotiff(img, coords, filename): function save_patch (line 491) | def save_patch(raster, coords, metadata, path, preview=False): class Counter (line 509) | class Counter: method __init__ (line 511) | def __init__(self, start=0): method update (line 515) | def update(self, delta=1): function fix_random_seeds (line 521) | def fix_random_seeds(seed=42): function worker (line 639) | def worker(idx):