SYMBOL INDEX (190 symbols across 27 files) FILE: data/wiki/tools/remove_accent.py function convert_to_unicode (line 13) | def convert_to_unicode(text): function run_strip_accents (line 29) | def run_strip_accents(text): FILE: tokenization/to_hdf5.py function validate_hdf5 (line 8) | def validate_hdf5(fname, tokenizer_name): function to_hdf5 (line 63) | def to_hdf5(fname, tokenizer_name, validate=True): FILE: tokenization/tokenize_dataset.py function tokenize_dataset (line 12) | def tokenize_dataset(data_dir, fname, tokenizer_name, lines_are_sents=Fa... FILE: vlm/data.py class CoLDataset (line 11) | class CoLDataset(Dataset): method __init__ (line 15) | def __init__(self, file_path, tokenizer_name, tokenizer, block_size=512, method voken_size (line 83) | def voken_size(self): method voken_ids (line 87) | def voken_ids(self): method assert_equal_vokens (line 90) | def assert_equal_vokens(self, dataset): method __len__ (line 95) | def __len__(self): method __getitem__ (line 98) | def __getitem__(self, item): method maybe_do_sent_level (line 122) | def maybe_do_sent_level(self, vokens): method maybe_do_ablation_study (line 138) | def maybe_do_ablation_study(self, vokens, tokens): method get_item_info (line 157) | def get_item_info(self, item): method __del__ (line 162) | def __del__(self): function intersect (line 174) | def intersect(x, y): function manual_filter (line 184) | def manual_filter(batches): function block_check (line 192) | def block_check(batches, block_size, fixed_size=False, manual_filtered=F... function get_voken_feats (line 211) | def get_voken_feats(dataset: CoLDataset, feat_dir: str): FILE: vlm/model.py function _gelu_python (line 20) | def _gelu_python(x): class CoLBertConfig (line 35) | class CoLBertConfig(BertConfig): method __init__ (line 36) | def __init__(self, *args, **kwargs): class BertSharedHead (line 47) | class BertSharedHead(BertOnlyMLMHead): method __init__ (line 50) | def __init__(self, config): method forward (line 62) | def forward(self, features, **kwargs): class BertVLMClassificationHead (line 84) | class BertVLMClassificationHead(nn.Module): method __init__ (line 87) | def __init__(self, config): method forward (line 100) | def forward(self, features, **kwargs): class BertVLMContrastiveHeadNew (line 109) | class BertVLMContrastiveHeadNew(nn.Module): method __init__ (line 112) | def __init__(self, config): method forward (line 123) | def forward(self, bert_output, voken_feats, **kwargs): class BertVLMContrastiveHead (line 139) | class BertVLMContrastiveHead(nn.Module): method __init__ (line 142) | def __init__(self, config): method forward (line 152) | def forward(self, bert_output, voken_feats, **kwargs): class BertVLMRegressionHead (line 168) | class BertVLMRegressionHead(nn.Module): method __init__ (line 171) | def __init__(self, config): method forward (line 178) | def forward(self, features, **kwargs): class CoLwithBert (line 189) | class CoLwithBert(BertForMaskedLM): method __init__ (line 192) | def __init__(self, config): method init_voken_feat_emb (line 250) | def init_voken_feat_emb(self, feats): method to (line 269) | def to(self, *args): method forward (line 274) | def forward( method calculate_shared_loss (line 358) | def calculate_shared_loss(self, sequence_output, masked_lm_labels, vok... class SimpleBertForMaskedLM (line 386) | class SimpleBertForMaskedLM(BertForMaskedLM): method __init__ (line 388) | def __init__(self, config): method forward (line 391) | def forward( FILE: vlm/param.py function process_args (line 4) | def process_args(): FILE: vlm/run_glue.py function set_seed (line 65) | def set_seed(args): function train (line 73) | def train(args, train_dataset, model, tokenizer): function evaluate (line 264) | def evaluate(args, model, tokenizer, prefix=""): function load_and_cache_examples (line 334) | def load_and_cache_examples(args, task, tokenizer, evaluate=False): function main (line 397) | def main(): FILE: vlm/run_glue_epochs.py function get_snap_paths (line 43) | def get_snap_paths(load): function sorted_paths (line 52) | def sorted_paths(paths): function get_test_paths (line 69) | def get_test_paths(paths, snaps): function run_glue (line 92) | def run_glue(): FILE: vlm/run_lm_distributed.py class TextDataset (line 96) | class TextDataset(Dataset): method __init__ (line 97) | def __init__(self, tokenizer: PreTrainedTokenizer, args, file_path: st... method __len__ (line 130) | def __len__(self): method __getitem__ (line 133) | def __getitem__(self, item): class LineByLineTextDataset (line 137) | class LineByLineTextDataset(Dataset): method __init__ (line 138) | def __init__(self, tokenizer: PreTrainedTokenizer, args, file_path: st... method __len__ (line 150) | def __len__(self): method __getitem__ (line 153) | def __getitem__(self, i): function load_and_cache_examples (line 157) | def load_and_cache_examples(args, tokenizer, evaluate=False): function set_seed (line 169) | def set_seed(args): function mask_tokens (line 175) | def mask_tokens(inputs: torch.Tensor, tokenizer: PreTrainedTokenizer, ar... function train (line 209) | def train(args, train_dataset, model: PreTrainedModel, tokenizer: PreTra... function save_model (line 425) | def save_model(args, name, model, tokenizer, optimizer, scheduler): function evaluate (line 443) | def evaluate(args, model: PreTrainedModel, tokenizer: PreTrainedTokenize... function is_port_in_use (line 491) | def is_port_in_use(port): function main (line 497) | def main(): function setup (line 513) | def setup(gpu, args): FILE: vlm/run_vlm_distributed.py function load_and_cache_examples (line 93) | def load_and_cache_examples(args, tokenizer, evaluate=False): function set_seed (line 102) | def set_seed(args): function mask_tokens (line 108) | def mask_tokens(tokens: torch.Tensor, vokens: torch.Tensor, tokenizer: P... function train (line 153) | def train(args, train_dataset: CoLDataset, valid_dataset: CoLDataset, function save_model (line 449) | def save_model(args, name, model, tokenizer, optimizer, scheduler): function evaluate (line 467) | def evaluate(args, eval_dataset: CoLDataset, model: PreTrainedModel, tok... function is_port_in_use (line 531) | def is_port_in_use(port): function main (line 537) | def main(): function setup (line 553) | def setup(gpu, args): FILE: vlm/show_glue_results_epochs.py function print_result (line 29) | def print_result(glue_dir): function search (line 73) | def search(path): FILE: vokenization/create_image_ids.py function write_ids (line 22) | def write_ids(img_set, img_ids): FILE: vokenization/evaluate_diversity.py function load_lang_data (line 25) | def load_lang_data(corpus_name, topk=10000): function load_cc_data (line 42) | def load_cc_data(img_set): function load_lxrt_data (line 54) | def load_lxrt_data(img_set): function analyze (line 66) | def analyze(token2info): FILE: vokenization/evaluate_retrieval.py function load_cc_data (line 21) | def load_cc_data(img_set): function load_lxrt_data (line 34) | def load_lxrt_data(img_set): FILE: vokenization/extract_vision_keys.py function get_img_path (line 22) | def get_img_path(img_set, img_id): function get_img_paths_and_ids (line 38) | def get_img_paths_and_ids(img_set): function save_img_paths_and_ids (line 54) | def save_img_paths_and_ids(img_set, img_paths, img_ids, output): function extract_vision_feature_keys (line 82) | def extract_vision_feature_keys(model, img_transform, img_sets, output, ... function get_visn_arch (line 160) | def get_visn_arch(arch): class VisnModel (line 172) | class VisnModel(nn.Module): method __init__ (line 173) | def __init__(self, arch='resnet50', pretrained=True): method forward (line 188) | def forward(self, img): function img_transform_func (line 234) | def img_transform_func(img): FILE: vokenization/indexing.py class GPUIndexer (line 6) | class GPUIndexer(object): method __init__ (line 7) | def __init__(self, keys, gpus=(0,), fp16=False): method topk (line 14) | def topk(self, query, topk: int = 1): method batch_topk (line 17) | def batch_topk(self, query, topk: int = 1): method batch_top1 (line 20) | def batch_top1(self, query): class TorchGPUIndexer (line 24) | class TorchGPUIndexer(GPUIndexer): method __init__ (line 25) | def __init__(self, keys, gpus=(0,), fp16=False): method topk (line 33) | def topk(self, query, topk: int = 1): method batch_topk (line 43) | def batch_topk(self, query, topk: int = 1): method batch_top1 (line 53) | def batch_top1(self, query): method batch_top1_l2 (line 63) | def batch_top1_l2(self, query): class FaissGPUIndexer (line 76) | class FaissGPUIndexer(GPUIndexer): method __init__ (line 77) | def __init__(self, keys, gpus=(0,), fp16=False): method batch_topk (line 92) | def batch_topk(self, query, topk: int = 1): method batch_top1 (line 102) | def batch_top1(self, query): FILE: vokenization/revokenization.py class ReVokenizer (line 6) | class ReVokenizer: method __init__ (line 10) | def __init__(self, forward_tokenizer_name, backward_tokenizer_name, vo... method vokenize_sent (line 23) | def vokenize_sent(self, sents, topk=None): method vokenize_ids (line 26) | def vokenize_ids(self, input_ids, topk=None, verbose=False): method show_alignments (line 50) | def show_alignments(self, sents, forward_inputs, backward_inputs, alig... method show_input (line 75) | def show_input(self, sents, forward_inputs, backward_inputs, input_ids): method backward_decode (line 94) | def backward_decode(self, input_id): method process (line 103) | def process(self, input_ids): method _safe_guard (line 143) | def _safe_guard(inputs): method _remove_special_tokens (line 150) | def _remove_special_tokens(inputs): method _fix_nouns (line 158) | def _fix_nouns(backward_input): method _fix_length (line 168) | def _fix_length(backward_input, input_ids): method _calibrate_backward_offset (line 185) | def _calibrate_backward_offset(self, backward_input): method prepare_for_unicode (line 215) | def prepare_for_unicode(self): method show (line 242) | def show(self, ids_list): method batch_map_back (line 248) | def batch_map_back(results, alignments): method batch_calculate_alignment (line 263) | def batch_calculate_alignment(batch_forward_offsets, batch_backward_of... function IoU (line 289) | def IoU(a, b): FILE: vokenization/revokenize_corpus_mp.py function processer (line 30) | def processer(args, input_queue, output_queue): function reducer (line 88) | def reducer(output_fname, output_queue, total_tokens): function setup_mp (line 141) | def setup_mp(args, tokens, sent_ranges, vokens_path): function segment_sent (line 184) | def segment_sent( FILE: vokenization/vokenization.py class Vokenizer (line 22) | class Vokenizer: method __init__ (line 23) | def __init__(self, model, tokenizer, keys_dir, img_sets=('coco_minival... method img_num (line 82) | def img_num(self): method dump_img_ids (line 85) | def dump_img_ids(self, fname): method __len__ (line 94) | def __len__(self): method indexing (line 97) | def indexing(self): method vokenize_sents (line 134) | def vokenize_sents(self, sents, topk=None): method vokenize_ids (line 145) | def vokenize_ids(self, input_ids, attention_mask=None, topk=None): function memory_safe_apply (line 300) | def memory_safe_apply(func, *args): function load_model_and_tokenizer (line 329) | def load_model_and_tokenizer(load, cpu=False): FILE: vokenization/vokenize_corpus_mp.py function processer (line 28) | def processer(args, input_queue, output_queue): function reducer (line 86) | def reducer(output_fname, output_queue, total_tokens): function setup_mp (line 139) | def setup_mp(args, tokens, sent_ranges, vokens_path): function segment_sent (line 182) | def segment_sent( FILE: xmatching/data.py function make_uid (line 38) | def make_uid(img_id, source, sent_id): function get_img_path (line 45) | def get_img_path(source, img_id): function make_datum (line 56) | def make_datum(source: str, img_id: str, sent_id: int, sent: str): class ImgSentDataset (line 75) | class ImgSentDataset: method __init__ (line 76) | def __init__(self, img_splits: str, lang_splits: str, tiny=False, fast... method __len__ (line 129) | def __len__(self): method __getitem__ (line 132) | def __getitem__(self, item): method shuffle (line 135) | def shuffle(self): class ImgSentTorchDataset (line 140) | class ImgSentTorchDataset(Dataset): method __init__ (line 141) | def __init__(self, method __len__ (line 152) | def __len__(self): method __getitem__ (line 155) | def __getitem__(self, item: int): FILE: xmatching/frozen_batch_norm.py class FrozenBatchNorm2d (line 11) | class FrozenBatchNorm2d(nn.Module): method __init__ (line 29) | def __init__(self, num_features, eps=1e-5): method forward (line 38) | def forward(self, x): method __repr__ (line 60) | def __repr__(self): method convert_frozen_batchnorm (line 64) | def convert_frozen_batchnorm(cls, module): FILE: xmatching/loss.py function hinge (line 4) | def hinge(x): function paired_hinge_rank_loss (line 8) | def paired_hinge_rank_loss( function batchwise_hinge_rank_loss (line 53) | def batchwise_hinge_rank_loss( FILE: xmatching/main.py function is_port_in_use (line 22) | def is_port_in_use(port): function main (line 28) | def main(): function train (line 46) | def train(gpu, args): function valid (line 285) | def valid(args, model, criterion, valid_loader, use_tqdm=True): FILE: xmatching/metric.py function batchwise_accuracy (line 4) | def batchwise_accuracy(lang_output, visn_output, lang_mask): function batchwise_recall (line 37) | def batchwise_recall(lang_output, visn_output, lang_mask, recalls=(1,)): FILE: xmatching/model.py function get_visn_arch (line 24) | def get_visn_arch(arch): class VisnModel (line 32) | class VisnModel(nn.Module): method __init__ (line 33) | def __init__(self, dim, arch='resnet50', pretrained=True, finetuning=F... method forward (line 76) | def forward(self, img): class LangModel (line 92) | class LangModel(nn.Module): method __init__ (line 93) | def __init__(self, dim, arch='BERT', layers=(-1,), pretrained=True, fi... method forward (line 132) | def forward(self, input_ids, attention_mask, token_type_ids=None): class JointModel (line 175) | class JointModel(nn.Module): method __init__ (line 176) | def __init__(self, lang_model, visn_model): method forward (line 181) | def forward(self, lang_input, visn_input): FILE: xmatching/param.py function get_optimizer (line 12) | def get_optimizer(optim): function parse_args (line 34) | def parse_args():