SYMBOL INDEX (215 symbols across 34 files) FILE: docs/conf.py function linkcode_resolve (line 123) | def linkcode_resolve(domain, info): FILE: hubconf.py function resnet50 (line 10) | def resnet50(pretrained: bool = False, **kwargs): FILE: scripts/build_vocabulary.py function _read_captions (line 41) | def _read_captions(annotations_path: str) -> List[str]: FILE: scripts/clf_linear.py function main (line 70) | def main(_A: argparse.Namespace): FILE: scripts/clf_voc07.py function train_test_single_svm (line 56) | def train_test_single_svm(args): function main (line 108) | def main(_A: argparse.Namespace): FILE: scripts/eval_captioning.py function main (line 44) | def main(_A: argparse.Namespace): FILE: scripts/eval_detectron2.py class Res5ROIHeadsExtraNorm (line 82) | class Res5ROIHeadsExtraNorm(Res5ROIHeads): method _build_res5_block (line 88) | def _build_res5_block(self, cfg): function build_detectron2_config (line 95) | def build_detectron2_config(_C: Config, _A: argparse.Namespace): class DownstreamTrainer (line 119) | class DownstreamTrainer(DefaultTrainer): method __init__ (line 131) | def __init__(self, cfg, weights): method build_evaluator (line 153) | def build_evaluator(cls, cfg, dataset_name, output_folder=None): method test (line 165) | def test(self, cfg=None, model=None, evaluators=None): function main (line 177) | def main(_A: argparse.Namespace): FILE: scripts/pretrain_virtex.py function main (line 44) | def main(_A: argparse.Namespace): FILE: setup.py function get_model_zoo_configs (line 9) | def get_model_zoo_configs() -> List[str]: FILE: virtex/config.py class Config (line 6) | class Config: method __init__ (line 36) | def __init__( method dump (line 221) | def dump(self, file_path: str): method __getattr__ (line 229) | def __getattr__(self, attr: str): method __str__ (line 232) | def __str__(self): method __repr__ (line 235) | def __repr__(self): FILE: virtex/data/datasets/captioning.py class CaptioningDataset (line 13) | class CaptioningDataset(Dataset): method __init__ (line 30) | def __init__( method __len__ (line 48) | def __len__(self): method __getitem__ (line 51) | def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]: method collate_fn (line 79) | def collate_fn( FILE: virtex/data/datasets/classification.py class TokenClassificationDataset (line 19) | class TokenClassificationDataset(Dataset): method __init__ (line 35) | def __init__( method __len__ (line 52) | def __len__(self): method __getitem__ (line 55) | def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]: method collate_fn (line 81) | def collate_fn( class MultiLabelClassificationDataset (line 97) | class MultiLabelClassificationDataset(Dataset): method __init__ (line 110) | def __init__( method __len__ (line 154) | def __len__(self): method __getitem__ (line 157) | def __getitem__(self, idx: int): method collate_fn (line 176) | def collate_fn( FILE: virtex/data/datasets/coco_captions.py class CocoCaptionsDataset (line 11) | class CocoCaptionsDataset(Dataset): method __init__ (line 22) | def __init__(self, data_root: str, split: str): method __len__ (line 53) | def __len__(self): method __getitem__ (line 56) | def __getitem__(self, idx: int): FILE: virtex/data/datasets/downstream.py class ImageNetDataset (line 16) | class ImageNetDataset(ImageNet): method __init__ (line 29) | def __init__( method __getitem__ (line 38) | def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]: method collate_fn (line 50) | def collate_fn(data: List[Dict[str, torch.Tensor]]) -> Dict[str, torch... class INaturalist2018Dataset (line 57) | class INaturalist2018Dataset(Dataset): method __init__ (line 69) | def __init__( method __len__ (line 92) | def __len__(self): method __getitem__ (line 95) | def __getitem__(self, idx: int): method collate_fn (line 111) | def collate_fn(data: List[Dict[str, torch.Tensor]]) -> Dict[str, torch... class VOC07ClassificationDataset (line 118) | class VOC07ClassificationDataset(Dataset): method __init__ (line 131) | def __init__( method __len__ (line 177) | def __len__(self): method __getitem__ (line 180) | def __getitem__(self, idx: int): method collate_fn (line 195) | def collate_fn(data: List[Dict[str, torch.Tensor]]) -> Dict[str, torch... class ImageDirectoryDataset (line 202) | class ImageDirectoryDataset(Dataset): method __init__ (line 214) | def __init__( method __len__ (line 220) | def __len__(self): method __getitem__ (line 223) | def __getitem__(self, idx: int): FILE: virtex/data/datasets/masked_lm.py class MaskedLmDataset (line 15) | class MaskedLmDataset(Dataset): method __init__ (line 16) | def __init__( method __len__ (line 43) | def __len__(self): method __getitem__ (line 46) | def __getitem__(self, idx: int) -> Dict[str, torch.Tensor]: method collate_fn (line 101) | def collate_fn( method _random_token_index (line 124) | def _random_token_index(self) -> int: FILE: virtex/data/tokenizers.py class SentencePieceBPETokenizer (line 6) | class SentencePieceBPETokenizer: method __init__ (line 16) | def __init__(self, model_path: str): method __getstate__ (line 23) | def __getstate__(self): method __setstate__ (line 32) | def __setstate__(self, state_dict: Dict[str, Any]): method get_vocab_size (line 38) | def get_vocab_size(self) -> int: method token_to_id (line 42) | def token_to_id(self, token: str) -> int: method id_to_token (line 48) | def id_to_token(self, token_id: int) -> str: method encode (line 52) | def encode(self, text: str) -> List[int]: method decode (line 56) | def decode(self, token_ids: List[int]) -> str: FILE: virtex/data/transforms.py class HorizontalFlip (line 5) | class HorizontalFlip(alb.BasicTransform): method targets (line 25) | def targets(self): method apply (line 28) | def apply(self, img, **params): method apply_to_caption (line 31) | def apply_to_caption(self, caption, **params): class RandomResizedSquareCrop (line 40) | class RandomResizedSquareCrop(alb.RandomResizedCrop): method __init__ (line 49) | def __init__(self, size: int, *args, **kwargs): class CenterSquareCrop (line 53) | class CenterSquareCrop(alb.CenterCrop): method __init__ (line 62) | def __init__(self, size: int, *args, **kwargs): class SquareResize (line 66) | class SquareResize(alb.Resize): method __init__ (line 75) | def __init__(self, size: int, *args, **kwargs): FILE: virtex/factories.py class Factory (line 40) | class Factory: method __init__ (line 60) | def __init__(self): method create (line 68) | def create(cls, name: str, *args, **kwargs) -> Any: method from_config (line 76) | def from_config(cls, config: Config) -> Any: class TokenizerFactory (line 81) | class TokenizerFactory(Factory): method from_config (line 94) | def from_config(cls, config: Config) -> SentencePieceBPETokenizer: class ImageTransformsFactory (line 111) | class ImageTransformsFactory(Factory): method create (line 158) | def create(cls, name: str, *args, **kwargs) -> Any: method from_config (line 171) | def from_config(cls, config: Config): class PretrainingDatasetFactory (line 176) | class PretrainingDatasetFactory(Factory): method from_config (line 200) | def from_config(cls, config: Config, split: str = "train"): class DownstreamDatasetFactory (line 249) | class DownstreamDatasetFactory(Factory): method from_config (line 264) | def from_config(cls, config: Config, split: str = "train"): class VisualBackboneFactory (line 306) | class VisualBackboneFactory(Factory): method from_config (line 322) | def from_config(cls, config: Config) -> visual_backbones.VisualBackbone: class TextualHeadFactory (line 344) | class TextualHeadFactory(Factory): method from_config (line 369) | def from_config(cls, config: Config) -> nn.Module: class PretrainingModelFactory (line 410) | class PretrainingModelFactory(Factory): method from_config (line 429) | def from_config(cls, config: Config) -> nn.Module: class CaptionDecoderFactory (line 469) | class CaptionDecoderFactory(Factory): method from_config (line 482) | def from_config(cls, config: Config) -> nn.Module: class OptimizerFactory (line 503) | class OptimizerFactory(Factory): method from_config (line 509) | def from_config( class LRSchedulerFactory (line 548) | class LRSchedulerFactory(Factory): method from_config (line 564) | def from_config( FILE: virtex/model_zoo/model_zoo.py class _ModelZooUrls (line 30) | class _ModelZooUrls: function get (line 63) | def get(config_path: str, pretrained: bool = False): FILE: virtex/models/captioning.py class CaptioningModel (line 13) | class CaptioningModel(nn.Module): method __init__ (line 40) | def __init__( method forward (line 71) | def forward(self, batch: Dict[str, torch.Tensor]) -> Dict[str, Any]: method decoding_step (line 165) | def decoding_step( method log_predictions (line 215) | def log_predictions( class ForwardCaptioningModel (line 234) | class ForwardCaptioningModel(CaptioningModel): method __init__ (line 240) | def __init__( class BidirectionalCaptioningModel (line 258) | class BidirectionalCaptioningModel(CaptioningModel): method __init__ (line 264) | def __init__( FILE: virtex/models/classification.py class ClassificationModel (line 12) | class ClassificationModel(nn.Module): method __init__ (line 35) | def __init__( method forward (line 43) | def forward(self, batch: Dict[str, torch.Tensor]): class TokenClassificationModel (line 111) | class TokenClassificationModel(ClassificationModel): method log_predictions (line 120) | def log_predictions( class MultiLabelClassificationModel (line 143) | class MultiLabelClassificationModel(ClassificationModel): method log_predictions (line 152) | def log_predictions( FILE: virtex/models/masked_lm.py class MaskedLMModel (line 11) | class MaskedLMModel(nn.Module): method __init__ (line 28) | def __init__(self, visual: VisualBackbone, textual: TextualHead): method forward (line 35) | def forward(self, batch: Dict[str, torch.Tensor]) -> Dict[str, Any]: method log_predictions (line 88) | def log_predictions( FILE: virtex/modules/embedding.py class WordAndPositionalEmbedding (line 7) | class WordAndPositionalEmbedding(nn.Module): method __init__ (line 24) | def __init__( method forward (line 46) | def forward(self, tokens: torch.Tensor) -> torch.Tensor: method _create_position_indices (line 77) | def _create_position_indices(self, tokens: torch.Tensor): FILE: virtex/modules/textual_heads.py class TextualHead (line 15) | class TextualHead(nn.Module): method __init__ (line 29) | def __init__(self, visual_feature_size: int, vocab_size: int, hidden_s... method textual_feature_size (line 36) | def textual_feature_size(self): class LinearTextualHead (line 46) | class LinearTextualHead(TextualHead): method __init__ (line 57) | def __init__(self, visual_feature_size: int, vocab_size: int, **kwargs): method forward (line 63) | def forward( class TransformerDecoderTextualHead (line 98) | class TransformerDecoderTextualHead(TextualHead): method __init__ (line 146) | def __init__( method _init_weights (line 203) | def _init_weights(module): method forward (line 216) | def forward( method make_future_mask (line 282) | def make_future_mask( FILE: virtex/modules/visual_backbones.py class VisualBackbone (line 8) | class VisualBackbone(nn.Module): method __init__ (line 15) | def __init__(self, visual_feature_size: int): class TorchvisionVisualBackbone (line 20) | class TorchvisionVisualBackbone(VisualBackbone): method __init__ (line 34) | def __init__( method forward (line 55) | def forward(self, image: torch.Tensor) -> torch.Tensor: method detectron2_backbone_state_dict (line 76) | def detectron2_backbone_state_dict(self) -> Dict[str, Any]: FILE: virtex/optim/lookahead.py class Lookahead (line 25) | class Lookahead(Optimizer): method __init__ (line 36) | def __init__(self, optimizer: Optimizer, k: int = 5, alpha: float = 0.8): method __getstate__ (line 52) | def __getstate__(self): method param_groups (line 62) | def param_groups(self): method zero_grad (line 65) | def zero_grad(self): method state_dict (line 69) | def state_dict(self): method load_state_dict (line 72) | def load_state_dict(self, state_dict: Dict[str, Any]): method step (line 82) | def step(self, closure: Callable = None): method load_slow_weights (line 104) | def load_slow_weights(self): method restore_fast_weights (line 120) | def restore_fast_weights(self): FILE: virtex/optim/lr_scheduler.py class LinearWarmupNoDecayLR (line 9) | class LinearWarmupNoDecayLR(LambdaLR): method __init__ (line 23) | def __init__( method _lr_multiplier (line 38) | def _lr_multiplier(self, step: int) -> float: class LinearWarmupMultiStepLR (line 43) | class LinearWarmupMultiStepLR(LambdaLR): method __init__ (line 64) | def __init__( method _lr_multiplier (line 89) | def _lr_multiplier(self, step: int) -> float: class LinearWarmupLinearDecayLR (line 101) | class LinearWarmupLinearDecayLR(LambdaLR): method __init__ (line 115) | def __init__( method _lr_multiplier (line 130) | def _lr_multiplier(self, step: int) -> float: class LinearWarmupCosineAnnealingLR (line 141) | class LinearWarmupCosineAnnealingLR(LambdaLR): method __init__ (line 159) | def __init__( method _lr_multiplier (line 174) | def _lr_multiplier(self, step: int) -> float: FILE: virtex/utils/beam_search.py class AutoRegressiveBeamSearch (line 25) | class AutoRegressiveBeamSearch: method __init__ (line 40) | def __init__( method search (line 52) | def search( FILE: virtex/utils/checkpointing.py class CheckpointManager (line 12) | class CheckpointManager: method __init__ (line 48) | def __init__( method step (line 68) | def step(self, iteration: int, metric: Optional[float] = None): method _state_dict (line 107) | def _state_dict(self): method remove_earliest_checkpoint (line 121) | def remove_earliest_checkpoint(self): method load (line 127) | def load(self, checkpoint_path: str): FILE: virtex/utils/common.py function cycle (line 14) | def cycle(dataloader, device, start_iteration: int = 0): function common_setup (line 39) | def common_setup(_C: Config, _A: argparse.Namespace, job_type: str = "pr... function common_parser (line 102) | def common_parser(description: str = "") -> argparse.ArgumentParser: FILE: virtex/utils/distributed.py function launch (line 15) | def launch( function _job_worker (line 82) | def _job_worker( function synchronize (line 115) | def synchronize() -> None: function get_world_size (line 121) | def get_world_size() -> int: function get_rank (line 126) | def get_rank() -> int: function is_master_process (line 131) | def is_master_process() -> bool: function average_across_processes (line 140) | def average_across_processes(t: Union[torch.Tensor, Dict[str, torch.Tens... function gpu_mem_usage (line 163) | def gpu_mem_usage() -> int: FILE: virtex/utils/metrics.py class TopkAccuracy (line 22) | class TopkAccuracy: method __init__ (line 35) | def __init__(self, k: int = 1): method reset (line 39) | def reset(self): method __call__ (line 43) | def __call__(self, predictions: torch.Tensor, ground_truth: torch.Tens... method get_result (line 70) | def get_result(self): class CocoCaptionsEvaluator (line 75) | class CocoCaptionsEvaluator: method __init__ (line 85) | def __init__(self, gt_annotations_path: str): method evaluate (line 95) | def evaluate(self, preds: List[Dict[str, Any]]) -> Dict[str, float]: function tokenize (line 125) | def tokenize(image_id_to_captions: Dict[int, List[str]]) -> Dict[int, Li... function cider (line 177) | def cider( function spice (line 267) | def spice( FILE: virtex/utils/nucleus_sampling.py class AutoRegressiveNucleusSampling (line 25) | class AutoRegressiveNucleusSampling: method __init__ (line 36) | def __init__( method search (line 47) | def search( FILE: virtex/utils/timer.py class Timer (line 5) | class Timer: method __init__ (line 17) | def __init__( method tic (line 31) | def tic(self) -> None: method toc (line 35) | def toc(self) -> None: method stats (line 42) | def stats(self) -> str: method eta_hhmm (line 50) | def eta_hhmm(self) -> str: