SYMBOL INDEX (207 symbols across 20 files) FILE: commons.py function make_deterministic (line 16) | def make_deterministic(seed=0): function setup_logging (line 30) | def setup_logging(save_dir, console="debug", FILE: datasets_ws.py function path_to_pil_img (line 24) | def path_to_pil_img(path): function collate_fn (line 28) | def collate_fn(batch): class PCADataset (line 52) | class PCADataset(data.Dataset): method __init__ (line 53) | def __init__(self, args, datasets_folder="dataset", dataset_folder="pi... method __getitem__ (line 59) | def __getitem__(self, index): method __len__ (line 62) | def __len__(self): class BaseDataset (line 66) | class BaseDataset(data.Dataset): method __init__ (line 69) | def __init__(self, args, datasets_folder="datasets", dataset_name="pit... method __getitem__ (line 105) | def __getitem__(self, index): method _test_query_transform (line 116) | def _test_query_transform(self, img): method __len__ (line 137) | def __len__(self): method __repr__ (line 140) | def __repr__(self): method get_positives (line 143) | def get_positives(self): class TripletsDataset (line 147) | class TripletsDataset(BaseDataset): method __init__ (line 154) | def __init__(self, args, datasets_folder="datasets", dataset_name="pit... method __getitem__ (line 217) | def __getitem__(self, index): method __len__ (line 231) | def __len__(self): method compute_triplets (line 238) | def compute_triplets(self, args, model): method compute_cache (line 248) | def compute_cache(args, model, subset_ds, cache_shape): method get_query_features (line 266) | def get_query_features(self, query_index, cache): method get_best_positive_index (line 274) | def get_best_positive_index(self, args, query_index, cache, query_feat... method get_hardest_negatives_indexes (line 283) | def get_hardest_negatives_indexes(self, args, cache, query_features, n... method compute_triplets_random (line 293) | def compute_triplets_random(self, args, model): method compute_triplets_full (line 320) | def compute_triplets_full(self, args, model): method compute_triplets_partial (line 349) | def compute_triplets_partial(self, args, model): class RAMEfficient2DMatrix (line 385) | class RAMEfficient2DMatrix: method __init__ (line 391) | def __init__(self, shape, dtype=np.float32): method __setitem__ (line 396) | def __setitem__(self, indexes, vals): method __getitem__ (line 401) | def __getitem__(self, index): FILE: model/aggregation.py class MAC (line 16) | class MAC(nn.Module): method __init__ (line 17) | def __init__(self): method forward (line 19) | def forward(self, x): method __repr__ (line 21) | def __repr__(self): class SPoC (line 24) | class SPoC(nn.Module): method __init__ (line 25) | def __init__(self): method forward (line 27) | def forward(self, x): method __repr__ (line 29) | def __repr__(self): class GeM (line 32) | class GeM(nn.Module): method __init__ (line 33) | def __init__(self, p=3, eps=1e-6, work_with_tokens=False): method forward (line 38) | def forward(self, x): method __repr__ (line 40) | def __repr__(self): class RMAC (line 43) | class RMAC(nn.Module): method __init__ (line 44) | def __init__(self, L=3, eps=1e-6): method forward (line 48) | def forward(self, x): method __repr__ (line 50) | def __repr__(self): class Flatten (line 54) | class Flatten(torch.nn.Module): method __init__ (line 55) | def __init__(self): super().__init__() method forward (line 56) | def forward(self, x): assert x.shape[2] == x.shape[3] == 1; return x[:... class RRM (line 58) | class RRM(nn.Module): method __init__ (line 63) | def __init__(self, dim): method forward (line 73) | def forward(self, x): class NetVLAD (line 85) | class NetVLAD(nn.Module): method __init__ (line 88) | def __init__(self, clusters_num=64, dim=128, normalize_input=True, wor... method init_params (line 112) | def init_params(self, centroids, descriptors): method forward (line 126) | def forward(self, x): method initialize_netvlad_layer (line 148) | def initialize_netvlad_layer(self, args, cluster_ds, backbone): class CRNModule (line 177) | class CRNModule(nn.Module): method __init__ (line 178) | def __init__(self, dim): method _initialize_weights (line 199) | def _initialize_weights(self): method forward (line 213) | def forward(self, x): class CRN (line 230) | class CRN(NetVLAD): method __init__ (line 231) | def __init__(self, clusters_num=64, dim=128, normalize_input=True): method forward (line 235) | def forward(self, x): FILE: model/cct/cct.py class CCT (line 32) | class CCT(nn.Module): method __init__ (line 33) | def __init__(self, method forward (line 89) | def forward(self, x): function _cct (line 102) | def _cct(arch, pretrained, progress, function cct_2 (line 129) | def cct_2(arch, pretrained, progress, aggregation=None, *args, **kwargs): function cct_4 (line 134) | def cct_4(arch, pretrained, progress, aggregation=None, *args, **kwargs): function cct_6 (line 139) | def cct_6(arch, pretrained, progress, aggregation=None, *args, **kwargs): function cct_7 (line 144) | def cct_7(arch, pretrained, progress, aggregation=None, *args, **kwargs): function cct_14 (line 149) | def cct_14(arch, pretrained, progress, aggregation=None, *args, **kwargs): function cct_2_3x2_32 (line 155) | def cct_2_3x2_32(pretrained=False, progress=False, function cct_2_3x2_32_sine (line 166) | def cct_2_3x2_32_sine(pretrained=False, progress=False, function cct_4_3x2_32 (line 177) | def cct_4_3x2_32(pretrained=False, progress=False, function cct_4_3x2_32_sine (line 188) | def cct_4_3x2_32_sine(pretrained=False, progress=False, function cct_6_3x1_32 (line 199) | def cct_6_3x1_32(pretrained=False, progress=False, function cct_6_3x1_32_sine (line 210) | def cct_6_3x1_32_sine(pretrained=False, progress=False, function cct_6_3x2_32 (line 221) | def cct_6_3x2_32(pretrained=False, progress=False, function cct_6_3x2_32_sine (line 232) | def cct_6_3x2_32_sine(pretrained=False, progress=False, function cct_7_3x1_32 (line 243) | def cct_7_3x1_32(pretrained=False, progress=False, function cct_7_3x1_32_sine (line 254) | def cct_7_3x1_32_sine(pretrained=False, progress=False, function cct_7_3x1_32_c100 (line 265) | def cct_7_3x1_32_c100(pretrained=False, progress=False, function cct_7_3x1_32_sine_c100 (line 276) | def cct_7_3x1_32_sine_c100(pretrained=False, progress=False, function cct_7_3x2_32 (line 287) | def cct_7_3x2_32(pretrained=False, progress=False, function cct_7_3x2_32_sine (line 298) | def cct_7_3x2_32_sine(pretrained=False, progress=False, function cct_7_7x2_224 (line 309) | def cct_7_7x2_224(pretrained=False, progress=False, function cct_7_7x2_224_sine (line 320) | def cct_7_7x2_224_sine(pretrained=False, progress=False, function cct_14_7x2_224 (line 331) | def cct_14_7x2_224(pretrained=False, progress=False, function cct_14_7x2_384 (line 342) | def cct_14_7x2_384(pretrained=False, progress=False, function cct_14_7x2_384_fl (line 353) | def cct_14_7x2_384_fl(pretrained=False, progress=False, FILE: model/cct/embedder.py class Embedder (line 4) | class Embedder(nn.Module): method __init__ (line 5) | def __init__(self, method forward_mask (line 18) | def forward_mask(self, mask): method forward (line 25) | def forward(self, x, mask=None): method init_weight (line 31) | def init_weight(m): FILE: model/cct/helpers.py function resize_pos_embed (line 6) | def resize_pos_embed(posemb, posemb_new, num_tokens=1): function pe_check (line 26) | def pe_check(model, state_dict, pe_key='classifier.positional_emb'): FILE: model/cct/stochastic_depth.py function drop_path (line 8) | def drop_path(x, drop_prob: float = 0., training: bool = False): class DropPath (line 28) | class DropPath(nn.Module): method __init__ (line 34) | def __init__(self, drop_prob=None): method forward (line 38) | def forward(self, x): FILE: model/cct/tokenizer.py class Tokenizer (line 6) | class Tokenizer(nn.Module): method __init__ (line 7) | def __init__(self, method sequence_length (line 40) | def sequence_length(self, n_channels=3, height=224, width=224): method forward (line 43) | def forward(self, x): method init_weight (line 47) | def init_weight(m): class TextTokenizer (line 52) | class TextTokenizer(nn.Module): method __init__ (line 53) | def __init__(self, method seq_len (line 79) | def seq_len(self, seq_len=32, embed_dim=300): method forward_mask (line 82) | def forward_mask(self, mask): method forward (line 99) | def forward(self, x, mask=None): method init_weight (line 107) | def init_weight(m): FILE: model/cct/transformers.py class Attention (line 7) | class Attention(Module): method __init__ (line 12) | def __init__(self, dim, num_heads=8, attention_dropout=0.1, projection... method forward (line 23) | def forward(self, x): class MaskedAttention (line 38) | class MaskedAttention(Module): method __init__ (line 39) | def __init__(self, dim, num_heads=8, attention_dropout=0.1, projection... method forward (line 50) | def forward(self, x, mask=None): class TransformerEncoderLayer (line 73) | class TransformerEncoderLayer(Module): method __init__ (line 78) | def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, method forward (line 95) | def forward(self, src: torch.Tensor, *args, **kwargs) -> torch.Tensor: class MaskedTransformerEncoderLayer (line 103) | class MaskedTransformerEncoderLayer(Module): method __init__ (line 108) | def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, method forward (line 125) | def forward(self, src: torch.Tensor, mask=None, *args, **kwargs) -> to... class TransformerClassifier (line 133) | class TransformerClassifier(Module): method __init__ (line 134) | def __init__(self, method forward (line 188) | def forward(self, x): method init_weight (line 213) | def init_weight(m): method sinusoidal_embedding (line 223) | def sinusoidal_embedding(n_channels, dim): class MaskedTransformerClassifier (line 231) | class MaskedTransformerClassifier(Module): method __init__ (line 232) | def __init__(self, method forward (line 290) | def forward(self, x, mask=None): method init_weight (line 319) | def init_weight(m): method sinusoidal_embedding (line 329) | def sinusoidal_embedding(n_channels, dim, padding_idx=False): FILE: model/functional.py function sare_ind (line 6) | def sare_ind(query, positive, negative): function sare_joint (line 18) | def sare_joint(query, positive, negatives): function mac (line 29) | def mac(x): function spoc (line 32) | def spoc(x): function gem (line 35) | def gem(x, p=3, eps=1e-6, work_with_tokens=False): function rmac (line 43) | def rmac(x, L=3, eps=1e-6): FILE: model/network.py class GeoLocalizationNet (line 29) | class GeoLocalizationNet(nn.Module): method __init__ (line 32) | def __init__(self, args): method forward (line 53) | def forward(self, x): function get_aggregation (line 59) | def get_aggregation(args): function get_pretrained_model (line 79) | def get_pretrained_model(args): function get_backbone (line 106) | def get_backbone(args): class VitWrapper (line 189) | class VitWrapper(nn.Module): method __init__ (line 190) | def __init__(self, vit_model, aggregation): method forward (line 194) | def forward(self, x): function get_output_channels_dim (line 201) | def get_output_channels_dim(model): FILE: model/normalization.py class L2Norm (line 5) | class L2Norm(nn.Module): method __init__ (line 6) | def __init__(self, dim=1): method forward (line 9) | def forward(self, x): FILE: model/sync_batchnorm/batchnorm.py function set_sbn_eps_mode (line 41) | def set_sbn_eps_mode(mode): function _sum_ft (line 47) | def _sum_ft(tensor): function _unsqueeze_ft (line 52) | def _unsqueeze_ft(tensor): class _SynchronizedBatchNorm (line 61) | class _SynchronizedBatchNorm(_BatchNorm): method __init__ (line 62) | def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True, ... method forward (line 78) | def forward(self, input): method __data_parallel_replicate__ (line 111) | def __data_parallel_replicate__(self, ctx, copy_id): method _data_parallel_master (line 121) | def _data_parallel_master(self, intermediates): method _compute_mean_std (line 144) | def _compute_mean_std(self, sum_, ssum, size): class SynchronizedBatchNorm1d (line 169) | class SynchronizedBatchNorm1d(_SynchronizedBatchNorm): method _check_input_dim (line 225) | def _check_input_dim(self, input): class SynchronizedBatchNorm2d (line 231) | class SynchronizedBatchNorm2d(_SynchronizedBatchNorm): method _check_input_dim (line 287) | def _check_input_dim(self, input): class SynchronizedBatchNorm3d (line 293) | class SynchronizedBatchNorm3d(_SynchronizedBatchNorm): method _check_input_dim (line 350) | def _check_input_dim(self, input): function patch_sync_batchnorm (line 357) | def patch_sync_batchnorm(): function convert_model (line 371) | def convert_model(module): FILE: model/sync_batchnorm/batchnorm_reimpl.py class BatchNorm2dReimpl (line 18) | class BatchNorm2dReimpl(nn.Module): method __init__ (line 27) | def __init__(self, num_features, eps=1e-5, momentum=0.1): method reset_running_stats (line 39) | def reset_running_stats(self): method reset_parameters (line 43) | def reset_parameters(self): method forward (line 48) | def forward(self, input_): FILE: model/sync_batchnorm/comm.py class FutureResult (line 18) | class FutureResult(object): method __init__ (line 21) | def __init__(self): method put (line 26) | def put(self, result): method get (line 32) | def get(self): class SlavePipe (line 46) | class SlavePipe(_SlavePipeBase): method run_slave (line 49) | def run_slave(self, msg): class SyncMaster (line 56) | class SyncMaster(object): method __init__ (line 67) | def __init__(self, master_callback): method __getstate__ (line 78) | def __getstate__(self): method __setstate__ (line 81) | def __setstate__(self, state): method register_slave (line 84) | def register_slave(self, identifier): method run_master (line 102) | def run_master(self, master_msg): method nr_slaves (line 136) | def nr_slaves(self): FILE: model/sync_batchnorm/replicate.py class CallbackContext (line 23) | class CallbackContext(object): function execute_replication_callbacks (line 27) | def execute_replication_callbacks(modules): class DataParallelWithCallback (line 50) | class DataParallelWithCallback(DataParallel): method replicate (line 64) | def replicate(self, module, device_ids): function patch_replication_callback (line 70) | def patch_replication_callback(data_parallel): FILE: model/sync_batchnorm/unittest.py class TorchTestCase (line 15) | class TorchTestCase(unittest.TestCase): method assertTensorClose (line 16) | def assertTensorClose(self, x, y): FILE: parser.py function parse_arguments (line 7) | def parse_arguments(): FILE: test.py function test_efficient_ram_usage (line 11) | def test_efficient_ram_usage(args, eval_ds, model, test_method="hard_res... function test (line 121) | def test(args, eval_ds, model, test_method="hard_resize", pca=None): function top_n_voting (line 238) | def top_n_voting(topn, predictions, distances, maj_weight): FILE: util.py function get_flops (line 15) | def get_flops(model, input_shape=(480, 640)): function save_checkpoint (line 23) | def save_checkpoint(args, state, is_best, filename): function resume_model (line 30) | def resume_model(args, model): function resume_train (line 46) | def resume_train(args, model, optimizer=None, strict=False): function compute_pca (line 63) | def compute_pca(args, model, pca_dataset_folder, full_features_dim):