SYMBOL INDEX (175 symbols across 27 files) FILE: configs/path_cfgs.py class PATH (line 8) | class PATH: method __init__ (line 9) | def __init__(self): FILE: configs/task_cfgs.py class Cfgs (line 16) | class Cfgs(PATH): method __init__ (line 18) | def __init__(self, args): method __repr__ (line 135) | def __repr__(self): method override_from_dict (line 144) | def override_from_dict(self, dict_): method set_silent_attr (line 148) | def set_silent_attr(self): method TRAIN_SPLITS (line 154) | def TRAIN_SPLITS(self): method EVAL_SPLITS (line 158) | def EVAL_SPLITS(self): method FEATURE_SPLIT (line 162) | def FEATURE_SPLIT(self): method EVAL_QUESTION_PATH (line 171) | def EVAL_QUESTION_PATH(self): method EVAL_ANSWER_PATH (line 177) | def EVAL_ANSWER_PATH(self): FILE: configs/task_to_split.py class DictSafe (line 7) | class DictSafe(dict): method __init__ (line 9) | def __init__(self, data={}): method __getitem__ (line 15) | def __getitem__(self, key): FILE: evaluation/ans_punct.py function process_punctuation (line 75) | def process_punctuation(inText): function process_digit_article (line 87) | def process_digit_article(inText): function prep_ans (line 103) | def prep_ans(answer): FILE: evaluation/aok_utils/eval_predictions.py function eval_aokvqa (line 9) | def eval_aokvqa(dataset, preds, multiple_choice=False, strict=True): FILE: evaluation/aok_utils/load_aokvqa.py function load_aokvqa (line 5) | def load_aokvqa(aokvqa_dir, split, version='v1p0'): function get_coco_path (line 12) | def get_coco_path(split, image_id, coco_dir): FILE: evaluation/aok_utils/remap_predictions.py function map_to_choices (line 14) | def map_to_choices(dataset, predictions, device='cpu'): FILE: evaluation/aokvqa_evaluate.py class AOKEvaluater (line 12) | class AOKEvaluater: method __init__ (line 13) | def __init__(self, annotation_path: str, question_path: str): method init (line 22) | def init(self): method set_mode (line 25) | def set_mode(self, multiple_choice=None, map_to_mc=None): method prep_ans (line 31) | def prep_ans(self, answer): method add (line 34) | def add(self, qid, answer): method save (line 44) | def save(self, result_path: str): method evaluate (line 53) | def evaluate(self, logfile=None): function _evaluate (line 64) | def _evaluate(dataset, results, direct_answer=True, multiple_choice=True): FILE: evaluation/okvqa_evaluate.py class OKEvaluater (line 12) | class OKEvaluater: method __init__ (line 13) | def __init__(self, annotation_path: str, question_path: str): method init (line 21) | def init(self): method prep_ans (line 24) | def prep_ans(self, answer): method add (line 27) | def add(self, qid, answer): method save (line 34) | def save(self, result_path: str): method evaluate (line 38) | def evaluate(self, logfile=None): function _evaluate (line 48) | def _evaluate(annotation_file: str, question_file: str, result_file: str): FILE: evaluation/vqa_utils/vqa.py class VQA (line 24) | class VQA: method __init__ (line 25) | def __init__(self, annotation_file=None, question_file=None): method createIndex (line 47) | def createIndex(self): method info (line 65) | def info(self): method getQuesIds (line 73) | def getQuesIds(self, imgIds=[], quesTypes=[], ansTypes=[]): method getImgIds (line 97) | def getImgIds(self, quesIds=[], quesTypes=[], ansTypes=[]): method loadQA (line 121) | def loadQA(self, ids=[]): method showQA (line 132) | def showQA(self, anns): method loadRes (line 146) | def loadRes(self, resFile, quesFile): FILE: evaluation/vqa_utils/vqaEval.py class VQAEval (line 10) | class VQAEval: method __init__ (line 11) | def __init__(self, vqa, vqaRes, n=2): method evaluate (line 68) | def evaluate(self, quesIds=None): method processPunctuation (line 122) | def processPunctuation(self, inText): method processDigitArticle (line 134) | def processDigitArticle(self, inText): method setAccuracy (line 149) | def setAccuracy(self, accQA, accQuesType, accAnsType): method setEvalQA (line 154) | def setEvalQA(self, quesId, acc): method setEvalQuesType (line 157) | def setEvalQuesType(self, quesId, quesType, acc): method setEvalAnsType (line 162) | def setEvalAnsType(self, quesId, ansType, acc): method updateProgress (line 167) | def updateProgress(self, progress): FILE: prophet/__init__.py function get_args (line 6) | def get_args(): function get_runner (line 30) | def get_runner(__C, evaluater): FILE: prophet/stage1/finetune.py class Runner (line 27) | class Runner(object): method __init__ (line 28) | def __init__(self, __C, evaluater): method train (line 32) | def train(self, train_set, eval_set=None): method eval (line 151) | def eval(self, dataset, net=None, eval_now=False): method run (line 224) | def run(self): function finetune_login_args (line 262) | def finetune_login_args(parser): FILE: prophet/stage1/heuristics.py class Runner (line 29) | class Runner(object): method __init__ (line 30) | def __init__(self, __C, *args, **kwargs): method eval (line 36) | def eval(self, dataset): method run (line 109) | def run(self): function heuristics_login_args (line 164) | def heuristics_login_args(parser): FILE: prophet/stage1/model/layers.py class AttFlat (line 14) | class AttFlat(nn.Module): method __init__ (line 15) | def __init__(self, __C): method forward (line 32) | def forward(self, x, x_mask): class MHAtt (line 53) | class MHAtt(nn.Module): method __init__ (line 54) | def __init__(self, __C): method forward (line 68) | def forward(self, v, k, q, mask): method att (line 91) | def att(self, value, key, query, mask): class SA_v (line 107) | class SA_v(nn.Module): method __init__ (line 108) | def __init__(self, __C): method forward (line 127) | def forward(self, *args): method att (line 155) | def att(self, value, key, query, mask): class FFN (line 171) | class FFN(nn.Module): method __init__ (line 172) | def __init__(self, __C): method forward (line 185) | def forward(self, x, *args): class SA (line 192) | class SA(nn.Module): method __init__ (line 193) | def __init__(self, __C): method forward (line 201) | def forward(self, x, x_mask, *args): class GA (line 209) | class GA(nn.Module): method __init__ (line 210) | def __init__(self, __C): method forward (line 218) | def forward(self, x, y, x_mask, y_mask, *args): FILE: prophet/stage1/model/mcan.py class MCA_ED (line 17) | class MCA_ED(nn.Module): method __init__ (line 21) | def __init__(self, __C): method forward (line 29) | def forward(self, x, y, x_mask, y_mask): class MCAN (line 40) | class MCAN(nn.Module): method __init__ (line 49) | def __init__(self, __C, answer_size): method forward (line 79) | def forward(self, input_tuple, output_answer_latent=False): method make_mask (line 124) | def make_mask(self, feature): FILE: prophet/stage1/model/mcan_for_finetune.py class MCANForFinetune (line 14) | class MCANForFinetune(MCAN): method __init__ (line 20) | def __init__(self, __C, answer_size, base_answer_size=3129): method parameter_init (line 26) | def parameter_init(self): method forward (line 30) | def forward(self, input_tuple, output_answer_latent=False): FILE: prophet/stage1/model/net_utils.py class FC (line 9) | class FC(nn.Module): method __init__ (line 10) | def __init__(self, in_size, out_size, dropout_r=0., use_relu=True): method forward (line 23) | def forward(self, x): class MLP (line 35) | class MLP(nn.Module): method __init__ (line 36) | def __init__(self, in_size, mid_size, out_size, dropout_r=0., use_relu... method forward (line 42) | def forward(self, x): function flatten (line 46) | def flatten(x): function unflatten (line 52) | def unflatten(x, shape): class Identity (line 58) | class Identity(nn.Module): method __init__ (line 59) | def __init__(self): method forward (line 62) | def forward(self, x): FILE: prophet/stage1/model/rope2d.py function rotate_every_two (line 14) | def rotate_every_two(x): function apply_rotary_pos_emb (line 22) | def apply_rotary_pos_emb(q, k, sinu_pos): class RoPE2d (line 28) | class RoPE2d(nn.Module): method __init__ (line 29) | def __init__(self, in_dim, size): method forward (line 53) | def forward(self, k, q): FILE: prophet/stage1/pretrain.py class Runner (line 27) | class Runner(object): method __init__ (line 28) | def __init__(self, __C, *args, **kwargs): method train (line 31) | def train(self, train_set, eval_set=None): method run (line 148) | def run(self): function pretrain_login_args (line 164) | def pretrain_login_args(parser): FILE: prophet/stage1/utils/load_data.py function soft_target (line 22) | def soft_target(answers, ans_to_ix, preprocess=True): class CommonData (line 32) | class CommonData: method __init__ (line 39) | def __init__(self, __C) -> None: class DataSet (line 69) | class DataSet(Data.Dataset): method __init__ (line 70) | def __init__(self, __C, common_data, split_name_list): method __getitem__ (line 116) | def __getitem__(self, idx): method __len__ (line 161) | def __len__(self): method bert_tokenize (line 164) | def bert_tokenize(self, text, max_token): FILE: prophet/stage1/utils/optim.py class OptimizerWrapper (line 10) | class OptimizerWrapper(object): method __init__ (line 15) | def __init__(self, optimizers, method zero_grad (line 40) | def zero_grad(self): method step (line 43) | def step(self, step=None, schd_step=False): method schedule_step (line 57) | def schedule_step(self, schd_step): method current_lr (line 71) | def current_lr(self): method state_dict (line 74) | def state_dict(self): method load_state_dict (line 77) | def load_state_dict(self, state_dict): function get_optim (line 81) | def get_optim(__C, model): function get_optim_for_finetune (line 105) | def get_optim_for_finetune(__C, model, new_params_name='proj1'): FILE: prophet/stage2/prompt.py class Runner (line 25) | class Runner: method __init__ (line 26) | def __init__(self, __C, evaluater): method gpt3_infer (line 31) | def gpt3_infer(self, prompt_text, _retry=0): method sample_make (line 73) | def sample_make(self, ques, capt, cands, ans=None): method get_context (line 86) | def get_context(self, example_qids): method run (line 100) | def run(self): function prompt_login_args (line 200) | def prompt_login_args(parser): FILE: prophet/stage2/utils/data_utils.py function ok_score (line 12) | def ok_score(gt_answers): function aok_score (line 30) | def aok_score(gt_answers): class Qid2Data (line 47) | class Qid2Data(Dict): method __init__ (line 48) | def __init__(self, __C, splits, annotated=False, similar_examples=None): method __getitem__ (line 134) | def __getitem__(self, __key): method get_caption (line 138) | def get_caption(self, qid): method get_question (line 145) | def get_question(self, qid): method get_gt_answers (line 149) | def get_gt_answers(self, qid): method get_most_answer (line 154) | def get_most_answer(self, qid): method get_topk_candidates (line 159) | def get_topk_candidates(self, qid, k=None): method get_similar_qids (line 165) | def get_similar_qids(self, qid, k=None): method evaluate_by_threshold (line 171) | def evaluate_by_threshold(self, ans_set, threshold=1.0): method topk_accuracy (line 189) | def topk_accuracy(self, k=1, sub_set=None): method rt_evaluate (line 205) | def rt_evaluate(self, answer_set): FILE: prophet/stage2/utils/fancy_pbar.py class RichColumn (line 12) | class RichColumn(ProgressColumn): method __init__ (line 13) | def __init__(self, table_column: Optional[Column] = None) -> None: method render (line 22) | def render(self, task: "Task") -> Text: function exit_progress (line 57) | def exit_progress(): FILE: tools/extract_img_feats.py function _extract_feat (line 25) | def _extract_feat(img_path, net, T, save_path): class ExtractModel (line 41) | class ExtractModel: method __init__ (line 42) | def __init__(self, encoder) -> None: method __call__ (line 49) | def __call__(self, img): function main (line 54) | def main(__C, dataset): FILE: tools/transforms.py function Pad (line 21) | def Pad(): function _convert_image_to_rgb (line 35) | def _convert_image_to_rgb(image): function identity (line 38) | def identity(x): function _transform (line 41) | def _transform(n_px, pad=False, crop=False):