SYMBOL INDEX (2560 symbols across 412 files) FILE: conftest.py function handle_timeout (line 32) | def handle_timeout(signum: int, frame: Optional[FrameType] = None) -> None: function pytest_sessionstart (line 39) | def pytest_sessionstart(): function pytest_runtest_logfinish (line 57) | def pytest_runtest_logfinish(nodeid, location): function set_random_seed (line 63) | def set_random_seed(request): FILE: corenet/__init__.py function suppress_known_warnings (line 55) | def suppress_known_warnings() -> None: FILE: corenet/cli/main.py function main (line 19) | def main(args: Optional[List[str]] = None) -> None: FILE: corenet/cli/main_benchmark.py function cpu_timestamp (line 21) | def cpu_timestamp(*args, **kwargs): function cuda_timestamp (line 26) | def cuda_timestamp(cuda_sync=False, device=None, *args, **kwargs): function step (line 33) | def step( function main_benchmark (line 47) | def main_benchmark(): FILE: corenet/cli/main_conversion.py function main_worker_conversion (line 20) | def main_worker_conversion(args: Optional[List[str]] = None): FILE: corenet/cli/main_eval.py function main (line 14) | def main(train_eval_pipeline: BaseTrainEvalPipeline): function main_worker (line 27) | def main_worker(args: Optional[List[str]] = None): function main_worker_segmentation (line 36) | def main_worker_segmentation(args: Optional[List[str]] = None, **kwargs): function main_worker_detection (line 42) | def main_worker_detection(args: Optional[List[str]] = None, **kwargs): FILE: corenet/cli/main_eval_llmadapters.py class CoreNetLMEvalWrapper (line 61) | class CoreNetLMEvalWrapper(HFLM): method __init__ (line 69) | def __init__(self, opts: argparse.Namespace) -> None: function main_eval_llmadapters (line 97) | def main_eval_llmadapters(args: Optional[List[str]] = None) -> None: function main_generation (line 140) | def main_generation( function evaluate_sample_with_generation (line 210) | def evaluate_sample_with_generation( function extract_answer_from_generation (line 265) | def extract_answer_from_generation(dataset: str, sentence: str) -> str: function main_multiple_choice (line 312) | def main_multiple_choice( function evaluate_likelihood (line 390) | def evaluate_likelihood( function get_loglikelihood_inputs (line 430) | def get_loglikelihood_inputs(data: Dict[str, str]) -> List[Request]: FILE: corenet/cli/main_train.py function callback (line 18) | def callback(train_eval_pipeline: BaseTrainEvalPipeline) -> None: function main_worker (line 31) | def main_worker(args: Optional[List[str]] = None): FILE: corenet/constants.py function get_corenet_env (line 43) | def get_corenet_env() -> Literal["pytest", "default", "external"]: function is_test_env (line 83) | def is_test_env() -> bool: function is_external_env (line 99) | def is_external_env() -> bool: function if_test_env (line 108) | def if_test_env(then: Any, otherwise: Any) -> Any: FILE: corenet/data/collate_fns/__init__.py function arguments_collate_fn (line 18) | def arguments_collate_fn(parser: argparse.ArgumentParser) -> argparse.Ar... function build_collate_fn (line 43) | def build_collate_fn(opts, *args, **kwargs): function build_test_collate_fn (line 64) | def build_test_collate_fn(opts, *args, **kwargs): FILE: corenet/data/collate_fns/byteformer_collate_functions.py function byteformer_image_collate_fn (line 29) | def byteformer_image_collate_fn( function apply_padding (line 53) | def apply_padding( function apply_pil_save (line 118) | def apply_pil_save( function apply_shuffle_bytes (line 139) | def apply_shuffle_bytes( function apply_mask_positions (line 160) | def apply_mask_positions( function apply_random_uniform_noise (line 180) | def apply_random_uniform_noise( function apply_byte_permutation (line 200) | def apply_byte_permutation( function apply_torchaudio_save (line 220) | def apply_torchaudio_save( function byteformer_audio_collate_fn (line 241) | def byteformer_audio_collate_fn( FILE: corenet/data/collate_fns/collate_functions.py function pytorch_default_collate_fn (line 17) | def pytorch_default_collate_fn(batch: Any, *args, **kwargs) -> Any: function unlabeled_image_data_collate_fn (line 24) | def unlabeled_image_data_collate_fn( function image_classification_data_collate_fn (line 64) | def image_classification_data_collate_fn( function default_collate_fn (line 109) | def default_collate_fn( FILE: corenet/data/data_loaders.py function create_test_loader (line 22) | def create_test_loader(opts: argparse.Namespace) -> CoreNetDataLoader: function create_train_val_loader (line 85) | def create_train_val_loader( function get_num_data_samples_as_int_or_mapping (line 194) | def get_num_data_samples_as_int_or_mapping( FILE: corenet/data/datasets/__init__.py function build_dataset_from_registry (line 44) | def build_dataset_from_registry( function get_test_dataset (line 89) | def get_test_dataset(opts: argparse.Namespace, *args, **kwargs) -> BaseD... function get_train_val_datasets (line 110) | def get_train_val_datasets( function arguments_dataset (line 143) | def arguments_dataset(parser: argparse.ArgumentParser) -> argparse.Argum... FILE: corenet/data/datasets/audio_classification/speech_commands_v2.py class SpeechCommandsv2Dataset (line 24) | class SpeechCommandsv2Dataset(dataset_base.BaseDataset): method __init__ (line 35) | def __init__( method _process_dataset_config (line 52) | def _process_dataset_config(self) -> None: method add_arguments (line 87) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _training_transforms (line 96) | def _training_transforms(self, *args, **kwargs) -> BaseTransformation: method _validation_transforms (line 110) | def _validation_transforms(self, *args, **kwargs) -> BaseTransformation: method get_sample (line 117) | def get_sample(self, index: int) -> Tuple[Tensor, float, Tensor]: method __getitem__ (line 129) | def __getitem__( method get_transformed_sample (line 185) | def get_transformed_sample( method __len__ (line 224) | def __len__(self) -> int: FILE: corenet/data/datasets/classification/base_image_classification_dataset.py class BaseImageClassificationDataset (line 19) | class BaseImageClassificationDataset(BaseImageDataset, ImageFolder): method __init__ (line 36) | def __init__( method add_arguments (line 111) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _training_transforms (line 134) | def _training_transforms( method _validation_transforms (line 187) | def _validation_transforms(self, *args, **kwargs) -> image_pil.BaseTra... method __getitem__ (line 210) | def __getitem__( method __len__ (line 255) | def __len__(self) -> int: method extra_repr (line 258) | def extra_repr(self) -> str: FILE: corenet/data/datasets/classification/base_imagenet_shift_dataset.py class BaseImageNetShiftDataset (line 14) | class BaseImageNetShiftDataset(BaseImageClassificationDataset): method __init__ (line 25) | def __init__( method post_init_checks (line 45) | def post_init_checks(self) -> None: method class_id_to_imagenet_class_id (line 59) | def class_id_to_imagenet_class_id(class_id: int) -> int: method __getitem__ (line 65) | def __getitem__( FILE: corenet/data/datasets/classification/coco.py class COCOClassification (line 23) | class COCOClassification(BaseImageDataset): method __init__ (line 30) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __len__ (line 44) | def __len__(self) -> int: method _training_transforms (line 48) | def _training_transforms( method _validation_transforms (line 63) | def _validation_transforms( method __getitem__ (line 75) | def __getitem__( method n_classes (line 135) | def n_classes(self): method class_names (line 139) | def class_names(self) -> List[str]: FILE: corenet/data/datasets/classification/imagenet.py class ImageNetDataset (line 15) | class ImageNetDataset(BaseImageClassificationDataset): method __init__ (line 24) | def __init__( FILE: corenet/data/datasets/classification/imagenet_a.py class ImageNetADataset (line 24) | class ImageNetADataset(BaseImageNetShiftDataset): method __init__ (line 39) | def __init__( method class_id_to_imagenet_class_id (line 49) | def class_id_to_imagenet_class_id(class_id: int) -> int: FILE: corenet/data/datasets/classification/imagenet_r.py class ImageNetRDataset (line 24) | class ImageNetRDataset(BaseImageNetShiftDataset): method __init__ (line 43) | def __init__( method class_id_to_imagenet_class_id (line 53) | def class_id_to_imagenet_class_id(class_id: int) -> int: FILE: corenet/data/datasets/classification/imagenet_sketch.py class ImageNetSketchDataset (line 15) | class ImageNetSketchDataset(BaseImageNetShiftDataset): method __init__ (line 31) | def __init__( method class_id_to_imagenet_class_id (line 41) | def class_id_to_imagenet_class_id(class_id: int) -> int: FILE: corenet/data/datasets/classification/imagenet_v2.py class Imagenetv2Dataset (line 37) | class Imagenetv2Dataset(BaseImageDataset): method __init__ (line 45) | def __init__( method add_arguments (line 80) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _validation_transforms (line 100) | def _validation_transforms(self, *args, **kwargs): method __getitem__ (line 116) | def __getitem__(self, sample_size_and_index: Tuple) -> Dict: method __len__ (line 166) | def __len__(self) -> int: FILE: corenet/data/datasets/classification/places365.py class Places365Dataset (line 15) | class Places365Dataset(BaseImageClassificationDataset): method __init__ (line 24) | def __init__( FILE: corenet/data/datasets/classification/wordnet_tagged_classification.py function extract_pos_offset_info_from_synset (line 59) | def extract_pos_offset_info_from_synset(synset: Synset) -> str: function check_valid_noun_synset (line 73) | def check_valid_noun_synset(synset: Synset, word: str) -> bool: class WordnetTaggedClassificationDataset (line 87) | class WordnetTaggedClassificationDataset(BaseImageDataset): method __init__ (line 97) | def __init__( method __post_init__ (line 113) | def __post_init__(self) -> None: method _get_vocab (line 118) | def _get_vocab(self) -> List[str]: method _metadata_file_path (line 168) | def _metadata_file_path(self) -> str: method _metadata (line 182) | def _metadata(self): method _download_and_extract_tar_file (line 215) | def _download_and_extract_tar_file(self, sample_index: int) -> int: method _convert_caption_to_labels (line 274) | def _convert_caption_to_labels(self, captions_str: str) -> List[int]: method _read_sample_with_wordnet_label_mining (line 313) | def _read_sample_with_wordnet_label_mining( method _training_transforms (line 358) | def _training_transforms(self, *args, **kwargs) -> BaseTransformation: method add_arguments (line 368) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _get_transfer_client (line 395) | def _get_transfer_client(self, file_path: str) -> BaseClient: method __getitem__ (line 422) | def __getitem__( method __len__ (line 461) | def __len__(self) -> int: method cache_loc (line 465) | def cache_loc(self) -> str: method vocab_size (line 469) | def vocab_size(self): method total_tar_files (line 473) | def total_tar_files(self) -> int: method max_files_per_tar (line 479) | def max_files_per_tar(self) -> int: method extra_repr (line 484) | def extra_repr(self) -> str: FILE: corenet/data/datasets/dataset_base.py class BaseDataset (line 28) | class BaseDataset(data.Dataset, ABC): method __init__ (line 52) | def __init__( method add_arguments (line 88) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method load_from_server (line 224) | def load_from_server( method _training_transforms (line 244) | def _training_transforms(self, *args, **kwargs) -> BaseTransformation: method _validation_transforms (line 248) | def _validation_transforms(self, *args, **kwargs) -> BaseTransformation: method _evaluation_transforms (line 252) | def _evaluation_transforms(self, *args, **kwargs) -> BaseTransformation: method get_augmentation_transforms (line 256) | def get_augmentation_transforms(self, *args, **kwargs) -> BaseTransfor... method share_dataset_arguments (line 267) | def share_dataset_arguments(self) -> Dict[str, Any]: method __len__ (line 275) | def __len__(self) -> int: method __getitem__ (line 278) | def __getitem__(self, sample_size_and_index: Any) -> Any: method extra_repr (line 282) | def extra_repr(self) -> str: method __repr__ (line 289) | def __repr__(self) -> str: method get_item_metadata (line 298) | def get_item_metadata(self, item_idx: int) -> Dict: method worker_id (line 313) | def worker_id(self) -> int: method num_workers (line 328) | def num_workers(self) -> int: method is_master_node (line 343) | def is_master_node(self) -> bool: method is_start_rank_node (line 355) | def is_start_rank_node(self) -> bool: method world_size (line 367) | def world_size(self) -> int: method rank (line 376) | def rank(self) -> int: class BaseImageDataset (line 389) | class BaseImageDataset(BaseDataset, ABC): method read_image_pil (line 393) | def read_image_pil(path: str) -> Optional[Image.Image]: method extra_repr (line 410) | def extra_repr(self) -> str: class BaseVideoDataset (line 422) | class BaseVideoDataset(BaseDataset, ABC): method __init__ (line 429) | def __init__( method clips_per_video (line 443) | def clips_per_video(self) -> int: method _deprecated_set_clips_per_video (line 453) | def _deprecated_set_clips_per_video(self, value: int) -> None: method n_frames_per_clip (line 457) | def n_frames_per_clip(self) -> int: method _deprecated_set_n_frames_per_clip (line 467) | def _deprecated_set_n_frames_per_clip(self, value: int) -> None: method add_arguments (line 471) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_item_metadata (line 494) | def get_item_metadata(self, item_idx: int) -> VideoMetadataDict: method get_item_local_path (line 510) | def get_item_local_path(self, item_idx: int) -> str: class VideoMetadataDict (line 526) | class VideoMetadataDict(TypedDict, total=False): class BaseIterableDataset (line 540) | class BaseIterableDataset(BaseDataset, data.IterableDataset): FILE: corenet/data/datasets/detection/base_detection.py class BaseDetectionDataset (line 11) | class BaseDetectionDataset(BaseImageDataset): method add_arguments (line 15) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/data/datasets/detection/coco_base.py class COCODetection (line 24) | class COCODetection(BaseDetectionDataset): method __init__ (line 37) | def __init__( method add_arguments (line 76) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _evaluation_transforms (line 89) | def _evaluation_transforms( method __getitem__ (line 106) | def __getitem__( method __len__ (line 172) | def __len__(self): method get_boxes_and_labels (line 175) | def get_boxes_and_labels( method _xywh2xyxy (line 245) | def _xywh2xyxy( method get_image (line 257) | def get_image(self, image_id: int) -> Tuple: method extra_repr (line 264) | def extra_repr(self) -> str: method class_names (line 268) | def class_names() -> List[str]: FILE: corenet/data/datasets/detection/coco_mask_rcnn.py class COCODetectionMaskRCNN (line 20) | class COCODetectionMaskRCNN(COCODetection): method add_arguments (line 24) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _training_transforms (line 38) | def _training_transforms( method _validation_transforms (line 71) | def _validation_transforms( method __getitem__ (line 90) | def __getitem__( function coco_mask_rcnn_collate_fn (line 163) | def coco_mask_rcnn_collate_fn( FILE: corenet/data/datasets/detection/coco_ssd.py class COCODetectionSSD (line 24) | class COCODetectionSSD(COCODetection): method __init__ (line 31) | def __init__( method _training_transforms (line 54) | def _training_transforms(self, size: Tuple[int, int], *args, **kwargs)... method _validation_transforms (line 77) | def _validation_transforms(self, size: Tuple[int, int], *args, **kwarg... method generate_anchors (line 95) | def generate_anchors(self, height: int, width: int) -> Tensor: method __getitem__ (line 121) | def __getitem__( method extra_repr (line 183) | def extra_repr(self) -> str: function coco_ssd_collate_fn (line 193) | def coco_ssd_collate_fn( FILE: corenet/data/datasets/language_modeling/base_lm.py function _process_text (line 19) | def _process_text(text: str) -> str: class BaseLMIterableDataset (line 46) | class BaseLMIterableDataset(BaseIterableDataset): method __init__ (line 53) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method pad_token_id (line 71) | def pad_token_id(self) -> int: method vocab_size (line 76) | def vocab_size(self) -> int: method seed (line 81) | def seed(self) -> int: method _tokenize_text (line 86) | def _tokenize_text(self, text: str) -> Optional[Dict[str, Tensor]]: method add_arguments (line 130) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method generate_sample (line 169) | def generate_sample( method __iter__ (line 198) | def __iter__(self) -> Iterator[Dict[str, Tensor]]: method extra_repr (line 213) | def extra_repr(self) -> str: FILE: corenet/data/datasets/language_modeling/commonsense_170k.py class CommonSense170k (line 23) | class CommonSense170k(BaseLMIterableDataset): method __init__ (line 41) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method generate_sample (line 54) | def generate_sample( method add_arguments (line 69) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _download_if_required (line 83) | def _download_if_required(self, remote_file_path: str) -> str: function generate_prompt_and_response (line 117) | def generate_prompt_and_response(data_point: Dict[str, str]) -> str: FILE: corenet/data/datasets/language_modeling/general_lm.py function check_list_of_dicts_with_mandatory_keys (line 30) | def check_list_of_dicts_with_mandatory_keys( class GeneralLMDataset (line 57) | class GeneralLMDataset(BaseLMIterableDataset): method __init__ (line 71) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 83) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _reset_data_state (line 123) | def _reset_data_state(self) -> None: method extra_repr (line 146) | def extra_repr(self) -> str: method reader_chunk_size (line 154) | def reader_chunk_size(self) -> int: method save_loc (line 161) | def save_loc(self) -> str: method num_files (line 170) | def num_files(self) -> int: method document_split_size (line 175) | def document_split_size(self) -> int: method _load_data_state (line 181) | def _load_data_state(self) -> None: method _save_data_state (line 215) | def _save_data_state(self, **kwargs) -> None: method _prepare_dataset (line 269) | def _prepare_dataset(self) -> Dict[str, List[str]]: method _download_if_required (line 366) | def _download_if_required(self, remote_file_path: str) -> str: method _skip_document_chunks (line 407) | def _skip_document_chunks(self, chunks: Iterable[Any]) -> Iterator[Any]: method _split_document_into_sequences (line 424) | def _split_document_into_sequences( method _read_data_from_parquet (line 446) | def _read_data_from_parquet( method _read_data_from_json (line 473) | def _read_data_from_json( method _get_file_reader (line 498) | def _get_file_reader(self, file_path: str) -> Callable: method generate_sample (line 512) | def generate_sample( method _shuffle_fn (line 601) | def _shuffle_fn( FILE: corenet/data/datasets/multi_modal_img_text/__init__.py function arguments_multi_modal_img_text (line 16) | def arguments_multi_modal_img_text( FILE: corenet/data/datasets/multi_modal_img_text/base_multi_modal_img_text.py class BaseMultiModalImgText (line 28) | class BaseMultiModalImgText(BaseImageDataset): method __init__ (line 40) | def __init__( method get_image_text_dataset (line 65) | def get_image_text_dataset(self) -> Optional[Any]: method _get_transfer_client (line 76) | def _get_transfer_client(self, file_path: str) -> BaseClient: method vocab_size (line 107) | def vocab_size(self) -> int: method padding_index (line 112) | def padding_index(self) -> Optional[int]: method context_length (line 122) | def context_length(self) -> int: method add_arguments (line 130) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _transform_text (line 160) | def _transform_text(self, text_tensor: Tensor) -> Tuple[Tensor, int]: method _training_transforms (line 184) | def _training_transforms( method _validation_transforms (line 226) | def _validation_transforms( method _process_img_caption (line 246) | def _process_img_caption( method get_zero_shot_image_text_pair (line 333) | def get_zero_shot_image_text_pair( method get_image_text_dataset_pair (line 351) | def get_image_text_dataset_pair(self, sample_index: int) -> Tuple[Imag... method __getitem__ (line 358) | def __getitem__( method __len__ (line 424) | def __len__(self) -> int: method __repr__ (line 427) | def __repr__(self) -> str: function multi_modal_img_text_collate_fn (line 434) | def multi_modal_img_text_collate_fn( FILE: corenet/data/datasets/multi_modal_img_text/flickr.py class FlickrDataset (line 17) | class FlickrDataset(BaseMultiModalImgText): method get_image_text_dataset (line 35) | def get_image_text_dataset(self) -> List[Dict[str, str]]: method __getitem__ (line 76) | def __getitem__( FILE: corenet/data/datasets/multi_modal_img_text/img_text_tar_dataset.py class ImgTextTarDataset (line 39) | class ImgTextTarDataset(BaseMultiModalImgText): method _metadata_file_path (line 90) | def _metadata_file_path(self) -> str: method _metadata (line 104) | def _metadata(self): method total_tar_files (line 138) | def total_tar_files(self) -> int: method max_files_per_tar (line 144) | def max_files_per_tar(self) -> int: method get_image_text_dataset (line 149) | def get_image_text_dataset(self) -> None: method _get_folder_index (line 156) | def _get_folder_index(self, sample_index) -> int: method add_arguments (line 171) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _download_and_extract_tar_file (line 185) | def _download_and_extract_tar_file(self, sample_index: int) -> int: method get_image_text_dataset_pair (line 244) | def get_image_text_dataset_pair(self, sample_index: int) -> Tuple[Imag... method __len__ (line 283) | def __len__(self) -> int: method extra_repr (line 298) | def extra_repr(self) -> str: FILE: corenet/data/datasets/multi_modal_img_text/zero_shot_image_classification/__init__.py function arguments_zero_shot_image_classification_dataset (line 23) | def arguments_zero_shot_image_classification_dataset( function build_zero_shot_image_classification_dataset (line 32) | def build_zero_shot_image_classification_dataset( FILE: corenet/data/datasets/multi_modal_img_text/zero_shot_image_classification/base_zero_shot_image_classification.py class BaseZeroShotImageClassificationDataset (line 17) | class BaseZeroShotImageClassificationDataset(BaseImageClassificationData... method add_arguments (line 26) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __getitem__ (line 38) | def __getitem__(self, img_index: int) -> Tuple[str, List[List[str]], i... method class_names (line 51) | def class_names(self) -> List[str]: method text_prompts (line 63) | def text_prompts(self) -> List[List[str]]: method generate_text_prompts (line 75) | def generate_text_prompts(self, class_name: str) -> List[str]: FILE: corenet/data/datasets/multi_modal_img_text/zero_shot_image_classification/imagenet.py class ImageNetDatasetZeroShot (line 19) | class ImageNetDatasetZeroShot(BaseZeroShotImageClassificationDataset): method class_names (line 23) | def class_names(self) -> List[str]: FILE: corenet/data/datasets/multi_modal_img_text/zero_shot_image_classification/imagenet_a.py class ImageNetADatasetZeroShot (line 24) | class ImageNetADatasetZeroShot(BaseZeroShotImageClassificationDataset): method class_names (line 28) | def class_names(self) -> List[str]: FILE: corenet/data/datasets/multi_modal_img_text/zero_shot_image_classification/imagenet_r.py class ImageNetRDatasetZeroShot (line 24) | class ImageNetRDatasetZeroShot( method class_names (line 30) | def class_names(self) -> List[str]: FILE: corenet/data/datasets/multi_modal_img_text/zero_shot_image_classification/imagenet_sketch.py class ImageNetSketchDatasetZeroShot (line 21) | class ImageNetSketchDatasetZeroShot( method class_names (line 27) | def class_names(self) -> List[str]: FILE: corenet/data/datasets/multi_modal_img_text/zero_shot_image_classification/templates.py function generate_text_prompts_clip (line 92) | def generate_text_prompts_clip(class_name) -> List[str]: FILE: corenet/data/datasets/segmentation/ade20k.py class ADE20KDataset (line 19) | class ADE20KDataset(BaseImageSegmentationDataset): method __init__ (line 34) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method adjust_mask_value (line 65) | def adjust_mask_value() -> int: method color_palette (line 71) | def color_palette() -> List[int]: method class_names (line 231) | def class_names() -> List[str]: FILE: corenet/data/datasets/segmentation/base_segmentation.py class BaseImageSegmentationDataset (line 22) | class BaseImageSegmentationDataset(BaseImageDataset): method __init__ (line 30) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 41) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method check_dataset (line 108) | def check_dataset(self) -> None: method _training_transforms (line 119) | def _training_transforms(self, size: Tuple[int, int]) -> T.BaseTransfo... method _validation_transforms (line 161) | def _validation_transforms( method _evaluation_transforms (line 177) | def _evaluation_transforms( method adjust_mask_value (line 225) | def adjust_mask_value() -> int: method __len__ (line 231) | def __len__(self) -> int: method color_palette (line 236) | def color_palette() -> List[int]: method class_names (line 243) | def class_names() -> List[str]: method read_mask_pil (line 249) | def read_mask_pil(path: str) -> Optional[Image.Image]: method convert_mask_to_tensor (line 260) | def convert_mask_to_tensor(mask: Image.Image) -> Tensor: method __getitem__ (line 268) | def __getitem__( FILE: corenet/data/datasets/segmentation/coco_segmentation.py class COCOSegmentationDataset (line 22) | class COCOSegmentationDataset(BaseImageSegmentationDataset): method __init__ (line 29) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __getitem__ (line 45) | def __getitem__( method _gen_seg_mask (line 104) | def _gen_seg_mask(self, target, h: int, w: int) -> np.ndarray: method __len__ (line 125) | def __len__(self) -> int: method class_names (line 129) | def class_names() -> List[str]: method coco_to_pascal_mapping (line 156) | def coco_to_pascal_mapping() -> List[int]: FILE: corenet/data/datasets/segmentation/coco_stuff.py class COCOStuffDataset (line 19) | class COCOStuffDataset(BaseImageSegmentationDataset): method __init__ (line 50) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method color_palette (line 76) | def color_palette() -> List[int]: method class_names (line 258) | def class_names() -> List[str]: FILE: corenet/data/datasets/segmentation/pascal_voc.py class PascalVOCDataset (line 19) | class PascalVOCDataset(BaseImageSegmentationDataset): method __init__ (line 37) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 91) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method color_palette (line 112) | def color_palette() -> List[int]: method class_names (line 143) | def class_names() -> List[str]: FILE: corenet/data/datasets/utils/common.py function file_has_valid_image_extension (line 24) | def file_has_valid_image_extension(filename: str) -> bool: function file_has_allowed_extension (line 28) | def file_has_allowed_extension( function get_image_paths (line 43) | def get_image_paths(directory: str) -> List[str]: function select_random_subset (line 55) | def select_random_subset( function select_samples_by_category (line 113) | def select_samples_by_category( FILE: corenet/data/datasets/utils/text.py function caption_preprocessing (line 12) | def caption_preprocessing(caption: str) -> str: FILE: corenet/data/datasets/utils/video.py function _simultaneous (line 38) | def _simultaneous( function _before (line 46) | def _before(this_timestamp: float, other_timestamp: float) -> bool: function fetch_labels_from_timestamps (line 53) | def fetch_labels_from_timestamps( function _make_fake_bbox (line 129) | def _make_fake_bbox( function _fetch_frame_label (line 162) | def _fetch_frame_label( function _assert_progress_repr (line 302) | def _assert_progress_repr( function _search_for_label_edge_timestamp (line 321) | def _search_for_label_edge_timestamp( function _interpolate_bounding_box (line 391) | def _interpolate_bounding_box( FILE: corenet/data/io/transfer_clients.py class BaseClient (line 30) | class BaseClient(object): method __init__ (line 47) | def __init__( method add_arguments (line 75) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method start_rank_node (line 83) | def start_rank_node(self) -> bool: method sync_distributed_ranks (line 89) | def sync_distributed_ranks(self) -> bool: method _download_fn (line 96) | def _download_fn(self, remote_path: str, local_path: str) -> None: method _download_with_retries (line 107) | def _download_with_retries(self, remote_path: str, local_path: str) ->... method _download_single_file (line 116) | def _download_single_file(self, remote_path: str, dst_dir: str) -> str: method _download_multiple_files (line 169) | def _download_multiple_files( method download (line 200) | def download( class S3Client (line 233) | class S3Client(BaseClient): method __init__ (line 236) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method transfer_config (line 249) | def transfer_config(self) -> TransferConfig: method init_client (line 257) | def init_client( method add_arguments (line 291) | def add_arguments(cls, parser: ArgumentParser) -> ArgumentParser: method _download_fn (line 333) | def _download_fn(self, remote_path: str, local_path: str) -> None: class HTTPClient (line 343) | class HTTPClient(BaseClient): method __init__ (line 346) | def __init__(self, opts, *args, **kwargs) -> None: method proxies (line 350) | def proxies(self): method _download_fn (line 356) | def _download_fn(self, remote_path: str, local_path: str) -> None: class HTTPSClient (line 369) | class HTTPSClient(HTTPClient): method __init__ (line 372) | def __init__(self, opts, *args, **kwargs) -> None: function get_transfer_client (line 376) | def get_transfer_client( function transfer_client_arguments (line 430) | def transfer_client_arguments( FILE: corenet/data/loader/dataloader.py class CoreNetDataLoader (line 16) | class CoreNetDataLoader(DataLoader): method __init__ (line 39) | def __init__( method update_indices (line 74) | def update_indices(self, new_indices: List, *args, **kwargs): method __len__ (line 81) | def __len__(self) -> int: method get_sample_indices (line 97) | def get_sample_indices(self) -> List: FILE: corenet/data/sampler/__init__.py function build_sampler (line 23) | def build_sampler( function add_sampler_arguments (line 64) | def add_sampler_arguments( FILE: corenet/data/sampler/base_sampler.py class BaseSampler (line 18) | class BaseSampler(Sampler): method __init__ (line 30) | def __init__( method add_arguments (line 69) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_indices (line 114) | def get_indices(self) -> List[int]: method __iter__ (line 140) | def __iter__(self) -> Iterator[Tuple[Any, ...]]: method __len__ (line 143) | def __len__(self) -> int: method set_epoch (line 146) | def set_epoch(self, epoch: int) -> None: method update_scales (line 150) | def update_scales( method update_indices (line 158) | def update_indices(self, new_indices: List[int]) -> None: method extra_repr (line 162) | def extra_repr(self) -> str: method __repr__ (line 169) | def __repr__(self) -> str: class BaseSamplerDDP (line 173) | class BaseSamplerDDP(Sampler): method __init__ (line 185) | def __init__( method get_indices_rank_i (line 241) | def get_indices_rank_i(self) -> List[int]: method __iter__ (line 329) | def __iter__(self) -> Iterator[Tuple[Any, ...]]: method __len__ (line 332) | def __len__(self) -> int: method add_arguments (line 338) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method set_epoch (line 359) | def set_epoch(self, epoch: int) -> None: method update_scales (line 363) | def update_scales( method update_indices (line 371) | def update_indices(self, new_indices: List[int]) -> None: method extra_repr (line 375) | def extra_repr(self) -> str: method __repr__ (line 384) | def __repr__(self): function get_batch_size_from_opts (line 388) | def get_batch_size_from_opts( FILE: corenet/data/sampler/batch_sampler.py class BatchSampler (line 15) | class BatchSampler(BaseSampler): method __init__ (line 25) | def __init__( method __iter__ (line 43) | def __iter__(self) -> Iterator[Tuple[int, int, int]]: method extra_repr (line 61) | def extra_repr(self) -> str: method add_arguments (line 70) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... class BatchSamplerDDP (line 91) | class BatchSamplerDDP(BaseSamplerDDP): method __init__ (line 100) | def __init__( method __iter__ (line 121) | def __iter__(self) -> Iterator[Tuple[int, int, int]]: method extra_repr (line 141) | def extra_repr(self) -> str: FILE: corenet/data/sampler/chain_sampler.py class ChainSampler (line 22) | class ChainSampler(Sampler): method __init__ (line 69) | def __init__( method add_arguments (line 94) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method build_chain_sampler (line 112) | def build_chain_sampler( method _sequential_sampling (line 215) | def _sequential_sampling(self) -> List[Tuple]: method _interleave_sampling (line 231) | def _interleave_sampling(self) -> List[Tuple]: method __iter__ (line 264) | def __iter__(self) -> Iterator[Tuple]: method __len__ (line 270) | def __len__(self) -> int: method set_epoch (line 278) | def set_epoch(self, epoch: int) -> None: method update_scales (line 290) | def update_scales( method update_indices (line 308) | def update_indices(self, new_indices: List[int]) -> None: method __repr__ (line 323) | def __repr__(self) -> str: FILE: corenet/data/sampler/multi_scale_sampler.py class MultiScaleSampler (line 18) | class MultiScaleSampler(BaseSampler): method __init__ (line 28) | def __init__( method add_arguments (line 87) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __iter__ (line 152) | def __iter__(self) -> Iterator[Tuple[int, int, int]]: method update_scales (line 170) | def update_scales( method extra_repr (line 182) | def extra_repr(self) -> str: class MultiScaleSamplerDDP (line 193) | class MultiScaleSamplerDDP(BaseSamplerDDP): method __init__ (line 202) | def __init__( method __iter__ (line 259) | def __iter__(self) -> Iterator[Tuple[int, int, int]]: method extra_repr (line 278) | def extra_repr(self) -> str: method update_scales (line 287) | def update_scales( FILE: corenet/data/sampler/utils.py function image_batch_pairs (line 13) | def image_batch_pairs( function make_video_pairs (line 70) | def make_video_pairs( function create_intervallic_integer_list (line 123) | def create_intervallic_integer_list( function make_tuple_list (line 149) | def make_tuple_list(*val_list: List) -> List[Tuple]: FILE: corenet/data/sampler/variable_batch_sampler.py class VariableBatchSampler (line 18) | class VariableBatchSampler(BaseSampler): method __init__ (line 28) | def __init__( method __iter__ (line 91) | def __iter__(self) -> Iterator[Tuple[int, int, int]]: method update_scales (line 109) | def update_scales( method extra_repr (line 144) | def extra_repr(self) -> str: method add_arguments (line 159) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... class VariableBatchSamplerDDP (line 243) | class VariableBatchSamplerDDP(BaseSamplerDDP): method __init__ (line 252) | def __init__( method __iter__ (line 315) | def __iter__(self) -> Iterator[Tuple[int, int, int]]: method update_scales (line 333) | def update_scales(self, epoch: int, is_master_node=False, *args, **kwa... method extra_repr (line 366) | def extra_repr(self) -> str: FILE: corenet/data/sampler/video_batch_sampler.py class VideoBatchSampler (line 14) | class VideoBatchSampler(BatchSampler): method __init__ (line 24) | def __init__( method __iter__ (line 39) | def __iter__(self) -> Iterator[Tuple[int, int, int, int, int]]: method add_arguments (line 65) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Na... method extra_repr (line 84) | def extra_repr(self) -> str: class VideoBatchSamplerDDP (line 94) | class VideoBatchSamplerDDP(BatchSamplerDDP): method __init__ (line 103) | def __init__( method __iter__ (line 117) | def __iter__(self) -> Iterator[Tuple[int, int, int, int, int]]: method extra_repr (line 144) | def extra_repr(self) -> str: FILE: corenet/data/sampler/video_clip_batch_sampler.py class VideoClipBatchSampler (line 23) | class VideoClipBatchSampler(VariableBatchSampler): method add_arguments (line 57) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __init__ (line 131) | def __init__( method __iter__ (line 173) | def __iter__(self) -> Iterator[List]: method __repr__ (line 244) | def __repr__(self) -> str: class VideoClipBatchSamplerDDP (line 260) | class VideoClipBatchSamplerDDP(BaseSamplerDDP): method __init__ (line 269) | def __init__( method __iter__ (line 277) | def __iter__(self) -> Iterator[List]: method __len__ (line 290) | def __len__(self) -> int: method set_epoch (line 293) | def set_epoch(self, epoch: int) -> None: method update_scales (line 297) | def update_scales(self, *args, **kwargs) -> None: method update_indices (line 300) | def update_indices(self, new_indices: List[int]) -> None: method extra_repr (line 303) | def extra_repr(self) -> str: FILE: corenet/data/sampler/video_variable_seq_sampler.py class VideoVariableSeqSampler (line 20) | class VideoVariableSeqSampler(VariableBatchSampler): method __init__ (line 31) | def __init__( method add_arguments (line 77) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __iter__ (line 123) | def __iter__(self) -> Iterator[Tuple[int, int, int, int, int]]: method update_scales (line 158) | def update_scales( method extra_repr (line 170) | def extra_repr(self) -> str: class VideoVariableSeqSamplerDDP (line 180) | class VideoVariableSeqSamplerDDP(VariableBatchSamplerDDP): method __init__ (line 189) | def __init__( method __iter__ (line 235) | def __iter__(self) -> Iterator[Tuple[int, int, int, int, int]]: method update_scales (line 270) | def update_scales( method extra_repr (line 281) | def extra_repr(self) -> str: FILE: corenet/data/text_tokenizer/__init__.py function arguments_tokenizer (line 23) | def arguments_tokenizer(parser: argparse.ArgumentParser) -> argparse.Arg... function build_tokenizer (line 32) | def build_tokenizer(opts, *args, **kwargs) -> BaseTextTokenizer: FILE: corenet/data/text_tokenizer/base_tokenizer.py class BaseTextTokenizer (line 14) | class BaseTextTokenizer(nn.Module): method __init__ (line 21) | def __init__(self, opts: argparse.Namespace) -> None: method add_arguments (line 26) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method vocab_size (line 59) | def vocab_size(self) -> int: method eot_token (line 64) | def eot_token(self) -> str: method eot_token_id (line 74) | def eot_token_id(self) -> int: method sot_token (line 79) | def sot_token(self) -> str: method sot_token_id (line 89) | def sot_token_id(self) -> int: method pad_token (line 94) | def pad_token(self) -> str: method pad_token_id (line 104) | def pad_token_id(self) -> int: method tok_encode (line 108) | def tok_encode(self, input_sentence: str) -> Tensor: method tok_decode (line 112) | def tok_decode(self, token_ids: Any) -> str: method forward (line 116) | def forward(self, input_sentence: str) -> Tensor: FILE: corenet/data/text_tokenizer/clip_tokenizer.py class ClipTokenizer (line 18) | class ClipTokenizer(BaseTextTokenizer): method __init__ (line 28) | def __init__(self, opts: argparse.Namespace) -> None: method add_arguments (line 56) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method vocab_size (line 76) | def vocab_size(self) -> int: method eot_token (line 81) | def eot_token(self) -> str: method eot_token_id (line 86) | def eot_token_id(self) -> int: method sot_token (line 91) | def sot_token(self) -> str: method sot_token_id (line 96) | def sot_token_id(self) -> int: method tok_encode (line 100) | def tok_encode(self, input_sentence: str) -> Tensor: FILE: corenet/data/text_tokenizer/sentencepiece_tokenizer.py class SentencePieceTokenizer (line 21) | class SentencePieceTokenizer(BaseTextTokenizer): method __init__ (line 35) | def __init__(self, opts: Namespace) -> None: method add_arguments (line 60) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method vocab_size (line 92) | def vocab_size(self) -> int: method sot_token_id (line 101) | def sot_token_id(self) -> int: method eot_token_id (line 110) | def eot_token_id(self) -> int: method pad_token_id (line 119) | def pad_token_id(self) -> int: method tok_encode (line 143) | def tok_encode(self, input_sentence: str) -> Tensor: method tok_decode (line 170) | def tok_decode(self, token_ids: Union[torch.Tensor, List[int]]) -> str: FILE: corenet/data/transforms/__init__.py function arguments_augmentation (line 19) | def arguments_augmentation(parser: argparse.ArgumentParser) -> argparse.... FILE: corenet/data/transforms/audio.py class Gain (line 20) | class Gain(BaseTransformation): method __init__ (line 25) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 34) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 56) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 84) | def __repr__(self) -> str: class Noise (line 94) | class Noise(BaseTransformation): method __init__ (line 99) | def __init__( method load_noise_files (line 132) | def load_noise_files(self, cache_size: int) -> List[torch.TensorType]: method add_arguments (line 148) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 185) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 232) | def __repr__(self) -> str: class SetFixedLength (line 242) | class SetFixedLength(BaseTransformation): method __init__ (line 245) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 251) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 269) | def __call__( method __repr__ (line 297) | def __repr__(self) -> str: class Roll (line 302) | class Roll(BaseTransformation): method __init__ (line 305) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 311) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 329) | def __call__( method __repr__ (line 359) | def __repr__(self) -> str: class MFCCs (line 364) | class MFCCs(BaseTransformation): method __init__ (line 365) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 372) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 397) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: method __repr__ (line 431) | def __repr__(self) -> str: class LambdaAudio (line 438) | class LambdaAudio(BaseTransformation): method __init__ (line 444) | def __init__( method __call__ (line 454) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: class AudioResample (line 460) | class AudioResample(BaseTransformation): method add_arguments (line 464) | def add_arguments(cls, parser: argparse.ArgumentParser) -> None: method __init__ (line 481) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __call__ (line 487) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: method __repr__ (line 526) | def __repr__(self) -> str: class StandardizeChannels (line 531) | class StandardizeChannels(BaseTransformation): method __init__ (line 532) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 539) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 557) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: method __repr__ (line 603) | def __repr__(self) -> str: class GaussianAudioNoise (line 608) | class GaussianAudioNoise(BaseTransformation): method __init__ (line 612) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 619) | def add_arguments(cls, parser: argparse.ArgumentParser) -> None: method __call__ (line 638) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: method __repr__ (line 661) | def __repr__(self) -> str: FILE: corenet/data/transforms/audio_aux/mfccs.py function get_mfccs (line 12) | def get_mfccs( function calculate_mfccs (line 57) | def calculate_mfccs( function get_mfcc_features (line 98) | def get_mfcc_features( function get_padded_features (line 138) | def get_padded_features( FILE: corenet/data/transforms/audio_bytes.py function _stream_to_wav (line 17) | def _stream_to_wav(x: torch.Tensor, dtype: str, audio_fps: int, backend:... class TorchaudioSave (line 58) | class TorchaudioSave(BaseTransformation): method __init__ (line 66) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __call__ (line 75) | def __call__( method __repr__ (line 132) | def __repr__(self) -> str: method add_arguments (line 136) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/data/transforms/base_transforms.py class BaseTransformation (line 10) | class BaseTransformation(object): method __init__ (line 15) | def __init__(self, opts, *args, **kwargs) -> None: method __call__ (line 18) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 21) | def __repr__(self) -> str: method add_arguments (line 25) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/data/transforms/common.py class Compose (line 11) | class Compose(BaseTransformation): method __init__ (line 16) | def __init__(self, opts, img_transforms: List, *args, **kwargs) -> None: method __call__ (line 20) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 25) | def __repr__(self) -> str: class Identity (line 32) | class Identity(BaseTransformation): method __call__ (line 37) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 40) | def __repr__(self) -> str: FILE: corenet/data/transforms/image_bytes.py function _image_to_bytes (line 17) | def _image_to_bytes(x: torch.Tensor, **kwargs) -> io.BytesIO: function _bytes_to_int32 (line 41) | def _bytes_to_int32(byte_array: io.BytesIO) -> torch.Tensor: class PILSave (line 58) | class PILSave(BaseTransformation): method __init__ (line 63) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __call__ (line 69) | def __call__( method __repr__ (line 102) | def __repr__(self) -> str: method add_arguments (line 106) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... class ShuffleBytes (line 131) | class ShuffleBytes(BaseTransformation): method __init__ (line 136) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __call__ (line 143) | def __call__( method add_arguments (line 194) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... class MaskPositions (line 231) | class MaskPositions(BaseTransformation): method __init__ (line 236) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method _generate_masks (line 241) | def _generate_masks(self, N: int) -> torch.Tensor: method __call__ (line 253) | def __call__( method add_arguments (line 273) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... class BytePermutation (line 292) | class BytePermutation(BaseTransformation): method __init__ (line 297) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __call__ (line 304) | def __call__( method add_arguments (line 326) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... class RandomUniformNoise (line 339) | class RandomUniformNoise(BaseTransformation): method __init__ (line 344) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __call__ (line 352) | def __call__( method add_arguments (line 378) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/data/transforms/image_pil.py function _interpolation_modes_from_str (line 34) | def _interpolation_modes_from_str(name: str) -> T.InterpolationMode: function _crop_fn (line 38) | def _crop_fn(data: Dict, top: int, left: int, height: int, width: int) -... function _resize_fn (line 90) | def _resize_fn( function _pad_fn (line 173) | def _pad_fn( class FixedSizeCrop (line 210) | class FixedSizeCrop(BaseTransformation): method __init__ (line 211) | def __init__( method add_arguments (line 235) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 265) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: method __repr__ (line 294) | def __repr__(self): class ScaleJitter (line 305) | class ScaleJitter(BaseTransformation): method __init__ (line 308) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 356) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 387) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: method __repr__ (line 408) | def __repr__(self): class RandomResizedCrop (line 418) | class RandomResizedCrop(BaseTransformation, T.RandomResizedCrop): method __init__ (line 423) | def __init__( method add_arguments (line 443) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_rrc_params (line 476) | def get_rrc_params(self, image: Image.Image) -> Tuple[int, int, int, i... method __call__ (line 481) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 497) | def __repr__(self) -> str: class AutoAugment (line 508) | class AutoAugment(BaseTransformation, T.AutoAugment): method __init__ (line 513) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 532) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 555) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 568) | def __repr__(self) -> str: class RandAugment (line 575) | class RandAugment(BaseTransformation, T.RandAugment): method __init__ (line 580) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 604) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 640) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 653) | def __repr__(self) -> str: class TrivialAugmentWide (line 664) | class TrivialAugmentWide(BaseTransformation, T.TrivialAugmentWide): method __init__ (line 669) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 693) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 717) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 730) | def __repr__(self) -> str: class RandomHorizontalFlip (line 739) | class RandomHorizontalFlip(BaseTransformation): method __init__ (line 744) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 750) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 766) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 792) | def __repr__(self) -> str: class RandomRotate (line 797) | class RandomRotate(BaseTransformation): method __init__ (line 802) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 808) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 830) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 854) | def __repr__(self) -> str: class Resize (line 861) | class Resize(BaseTransformation): method __init__ (line 874) | def __init__( method add_arguments (line 921) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 947) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 950) | def __repr__(self) -> str: class CenterCrop (line 960) | class CenterCrop(BaseTransformation): method __init__ (line 968) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 985) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 1003) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 1009) | def __repr__(self) -> str: class SSDCroping (line 1016) | class SSDCroping(BaseTransformation): method __init__ (line 1021) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 1038) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 1074) | def __call__(self, data: Dict) -> Dict: class PhotometricDistort (line 1194) | class PhotometricDistort(BaseTransformation): method __init__ (line 1202) | def __init__(self, opts, *args, **kwargs) -> None: method __repr__ (line 1246) | def __repr__(self) -> str: method add_arguments (line 1256) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _apply_transformations (line 1326) | def _apply_transformations(self, image): method __call__ (line 1354) | def __call__(self, data: Dict) -> Dict: class BoxPercentCoords (line 1361) | class BoxPercentCoords(BaseTransformation): method __init__ (line 1366) | def __init__(self, opts, *args, **kwargs) -> None: method __call__ (line 1369) | def __call__(self, data: Dict) -> Dict: class InstanceProcessor (line 1385) | class InstanceProcessor(BaseTransformation): method __init__ (line 1390) | def __init__( method __call__ (line 1400) | def __call__(self, data: Dict) -> Dict: class RandomResize (line 1454) | class RandomResize(BaseTransformation): method __init__ (line 1459) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 1498) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 1540) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 1566) | def __repr__(self) -> str: class RandomShortSizeResize (line 1578) | class RandomShortSizeResize(BaseTransformation): method __init__ (line 1583) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 1638) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 1673) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 1684) | def __repr__(self) -> str: class RandomErasing (line 1694) | class RandomErasing(BaseTransformation, T.RandomErasing): method __init__ (line 1700) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 1708) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 1725) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 1729) | def __repr__(self) -> str: class RandomGaussianBlur (line 1736) | class RandomGaussianBlur(BaseTransformation): method __init__ (line 1741) | def __init__(self, opts, *args, **kwargs): method add_arguments (line 1746) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 1763) | def __call__(self, data: Dict) -> Dict: class RandomCrop (line 1773) | class RandomCrop(BaseTransformation): method __init__ (line 1782) | def __init__( method add_arguments (line 1807) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_params (line 1837) | def get_params(img_h, img_w, target_h, target_w): method get_params_from_box (line 1846) | def get_params_from_box(boxes, img_h, img_w): method get_params_from_mask (line 1856) | def get_params_from_mask(self, data, i, j, h, w): method _resize_if_needed (line 1886) | def _resize_if_needed(self, data: Dict) -> Dict: method _pad_if_needed (line 1897) | def _pad_if_needed(self, data: Dict) -> Dict: method __call__ (line 1916) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 1944) | def __repr__(self) -> str: class ToTensor (line 1955) | class ToTensor(BaseTransformation): method __init__ (line 1960) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 2004) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __repr__ (line 2033) | def __repr__(self): method __call__ (line 2050) | def __call__(self, data: Dict) -> Dict: class RandomOrder (line 2098) | class RandomOrder(BaseTransformation): method __init__ (line 2103) | def __init__(self, opts, img_transforms: List, *args, **kwargs) -> None: method add_arguments (line 2113) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 2130) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 2136) | def __repr__(self): class RandAugmentTimm (line 2145) | class RandAugmentTimm(BaseTransformation): method __init__ (line 2151) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 2170) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 2186) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 2204) | def __repr__(self) -> str: FILE: corenet/data/transforms/image_torch.py class RandomMixup (line 22) | class RandomMixup(BaseTransformation): method __init__ (line 32) | def __init__( method add_arguments (line 53) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _apply_mixup_transform (line 99) | def _apply_mixup_transform( method __call__ (line 139) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 206) | def __repr__(self) -> str: class RandomCutmix (line 213) | class RandomCutmix(BaseTransformation): method __init__ (line 223) | def __init__( method add_arguments (line 244) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _apply_cutmix_transform (line 290) | def _apply_cutmix_transform( method __call__ (line 344) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 410) | def __repr__(self) -> str: function apply_mixing_transforms (line 416) | def apply_mixing_transforms(opts: argparse.Namespace, data: Dict) -> Dict: FILE: corenet/data/transforms/utils.py function setup_size (line 11) | def setup_size(size: Any, error_msg="Need a tuple of length 2"): function intersect (line 26) | def intersect(box_a, box_b): function jaccard_numpy (line 34) | def jaccard_numpy(box_a: np.ndarray, box_b: np.ndarray): FILE: corenet/data/transforms/video.py function _check_interpolation (line 32) | def _check_interpolation(interpolation): function _crop_fn (line 41) | def _crop_fn(data: Dict, i: int, j: int, h: int, w: int) -> Dict: function _resize_fn (line 75) | def _resize_fn( function check_rgb_video_tensor (line 145) | def check_rgb_video_tensor(clip: torch.Tensor) -> None: class ToTensor (line 161) | class ToTensor(BaseTransformation): method __init__ (line 176) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method __call__ (line 179) | def __call__(self, data: Dict) -> Dict: class ToPixelArray (line 196) | class ToPixelArray(BaseTransformation): method __call__ (line 208) | def __call__(self, data: Dict) -> Dict: class SaveInputs (line 217) | class SaveInputs(BaseTransformation): method __init__ (line 218) | def __init__( method __call__ (line 258) | def __call__(self, data: Dict) -> Dict: method add_arguments (line 281) | def add_arguments(cls, parser: argparse.ArgumentParser) -> None: method _srt_format_timestamp (line 322) | def _srt_format_timestamp(t: float) -> str: method save_video_with_annotations (line 330) | def save_video_with_annotations( method __repr__ (line 418) | def __repr__(self) -> str: class RandomResizedCrop (line 431) | class RandomResizedCrop(BaseTransformation): method __init__ (line 436) | def __init__(self, opts, size: Union[Tuple, int], *args, **kwargs) -> ... method add_arguments (line 479) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_params (line 518) | def get_params(self, height: int, width: int) -> (int, int, int, int): method __call__ (line 548) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 558) | def __repr__(self) -> str: class RandomShortSizeResizeCrop (line 569) | class RandomShortSizeResizeCrop(BaseTransformation): method __init__ (line 579) | def __init__(self, opts, size: Union[Tuple, int], *args, **kwargs) -> ... method add_arguments (line 624) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_params (line 656) | def get_params(self, height, width) -> Tuple[int, int, int, int]: method __call__ (line 666) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 678) | def __repr__(self) -> str: class RandomCrop (line 690) | class RandomCrop(BaseTransformation): method __init__ (line 699) | def __init__(self, opts, size: Union[Tuple, int], *args, **kwargs) -> ... method add_arguments (line 706) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_params (line 719) | def get_params(self, height: int, width: int) -> Tuple[int, int, int, ... method __call__ (line 729) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 736) | def __repr__(self) -> str: class RandomHorizontalFlip (line 743) | class RandomHorizontalFlip(BaseTransformation): method __init__ (line 748) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 755) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 773) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 787) | def __repr__(self) -> str: class CenterCrop (line 795) | class CenterCrop(BaseTransformation): method __init__ (line 804) | def __init__(self, opts, size: Union[Sequence, int], *args, **kwargs) ... method add_arguments (line 818) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 831) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 837) | def __repr__(self) -> str: class Resize (line 844) | class Resize(BaseTransformation): method __init__ (line 855) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 883) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 914) | def __call__(self, data: Dict) -> Dict: method __repr__ (line 917) | def __repr__(self) -> str: class CropByBoundingBox (line 924) | class CropByBoundingBox(BaseTransformation): method __init__ (line 939) | def __init__( method __call__ (line 972) | def __call__(self, data: Dict, *args, **kwargs) -> Dict: method expand_boxes (line 1071) | def expand_boxes( method get_new_x0 (line 1119) | def get_new_x0(cls, multiplier: float) -> float: method add_arguments (line 1126) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __repr__ (line 1184) | def __repr__(self) -> str: class ShuffleAudios (line 1194) | class ShuffleAudios(BaseTransformation): method __init__ (line 1195) | def __init__( method add_arguments (line 1244) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _single_cycle_permutation (line 1304) | def _single_cycle_permutation( method _random_outcome (line 1348) | def _random_outcome(self, n: int) -> torch.Tensor: method _random_participants_mask (line 1365) | def _random_participants_mask(self, n: int) -> torch.BoolTensor: method __call__ (line 1373) | def __call__(self, data: Dict) -> Dict: FILE: corenet/data/video_reader/__init__.py function arguments_video_reader (line 21) | def arguments_video_reader(parser: argparse.ArgumentParser): function get_video_reader (line 29) | def get_video_reader( FILE: corenet/data/video_reader/base_av_reader.py class VideoDurationDoesNotMatchAudioDurationError (line 26) | class VideoDurationDoesNotMatchAudioDurationError(AssertionError): function check_audio_video_duration (line 33) | def check_audio_video_duration( class BaseAVReader (line 47) | class BaseAVReader(object): method add_arguments (line 57) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __init__ (line 93) | def __init__( method get_frame_transform (line 118) | def get_frame_transform( method __repr__ (line 163) | def __repr__(self): method check_video (line 170) | def check_video(self, filename: str) -> bool: method read_video (line 182) | def read_video( method build_video_metadata (line 194) | def build_video_metadata( method num_frames (line 213) | def num_frames(self, filename: str) -> int: method random_sampling (line 223) | def random_sampling( method uniform_sampling (line 262) | def uniform_sampling( method read_video_file_into_clips (line 305) | def read_video_file_into_clips( method _generate_video_clips (line 454) | def _generate_video_clips( method _generate_audio_clips (line 546) | def _generate_audio_clips( method dummy_audio_video_clips (line 600) | def dummy_audio_video_clips( function _downsample_frame_indices (line 647) | def _downsample_frame_indices( FILE: corenet/data/video_reader/decord_reader.py class DecordAVReader (line 26) | class DecordAVReader(BaseAVReader): method __init__ (line 31) | def __init__(self, *args, **kwargs): method read_video (line 35) | def read_video( method build_video_metadata (line 97) | def build_video_metadata( method build_audio_metadata (line 126) | def build_audio_metadata( method _get_total_audio_frames (line 166) | def _get_total_audio_frames(video_path: str, sample_rate: Union[int, f... FILE: corenet/data/video_reader/ffmpeg_reader.py class FFMPEGReader (line 29) | class FFMPEGReader(BaseAVReader): method __init__ (line 37) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method read_video (line 41) | def read_video( method _transform_video_frames (line 209) | def _transform_video_frames( method read_audio (line 237) | def read_audio( method build_video_metadata (line 298) | def build_video_metadata(cls, video_path: str) -> Dict[str, Union[str,... method build_audio_metadata (line 318) | def build_audio_metadata(cls, video_path: str) -> Dict[str, Union[str,... FILE: corenet/data/video_reader/ffmpeg_utils.py class FFMPEGError (line 45) | class FFMPEGError(Exception): method __init__ (line 46) | def __init__(self, message: str, stderr: Union[IOBase, bytes, str]): function _parse_stream_duration (line 54) | def _parse_stream_duration(stream: Dict[str, Any]) -> float: function ffprobe (line 74) | def ffprobe(video_path: str, parse_json: bool = True) -> Union[str, Dict... function get_video_metadata (line 117) | def get_video_metadata( function get_audio_metadata (line 210) | def get_audio_metadata( function get_flags_to_replicate_audio_codec (line 256) | def get_flags_to_replicate_audio_codec(input_filename: str) -> Dict: function transform_video_file (line 314) | def transform_video_file( function _kill_subprocess (line 643) | def _kill_subprocess(process: subprocess.Popen, timeout_seconds: float =... function write_video (line 658) | def write_video( function write_audio (line 732) | def write_audio( FILE: corenet/data/video_reader/pyav_reader.py class PyAVReader (line 18) | class PyAVReader(BaseAVReader): method read_video (line 23) | def read_video( method build_video_metadata (line 105) | def build_video_metadata( FILE: corenet/engine/default_trainer.py class DefaultTrainer (line 41) | class DefaultTrainer(object): method __init__ (line 60) | def __init__( method compute_grad_norm (line 139) | def compute_grad_norm(self) -> torch.Tensor: method _zero_grad (line 161) | def _zero_grad(self) -> None: method _set_training_mode (line 174) | def _set_training_mode(self) -> None: method _set_eval_mode (line 181) | def _set_eval_mode(self) -> None: method _save_and_evaluate_interval_checkpoint (line 188) | def _save_and_evaluate_interval_checkpoint( method train_epoch (line 249) | def train_epoch(self, epoch: int) -> Tuple[float, float]: method val_epoch (line 408) | def val_epoch( method run (line 516) | def run( FILE: corenet/engine/detection_utils/coco_map.py function coco_evaluation (line 19) | def coco_evaluation( function compute_quant_scores (line 105) | def compute_quant_scores(opts, predictions: List, *args, **kwargs) -> None: FILE: corenet/engine/eval_detection.py function predict_and_save (line 39) | def predict_and_save( function read_and_process_image (line 172) | def read_and_process_image( function predict_labeled_dataset (line 205) | def predict_labeled_dataset(opts: argparse.Namespace) -> None: function predict_image (line 261) | def predict_image(opts: argparse.Namespace, file_path: str) -> None: function predict_images_in_folder (line 300) | def predict_images_in_folder(opts: argparse.Namespace) -> None: function main_detection_evaluation (line 356) | def main_detection_evaluation(args: Optional[List[str]] = None) -> None: FILE: corenet/engine/eval_segmentation.py function predict_and_save (line 43) | def predict_and_save( function save_segmentation_masks (line 167) | def save_segmentation_masks( function apply_color_map_to_segmentation_masks (line 196) | def apply_color_map_to_segmentation_masks( function read_and_process_image (line 278) | def read_and_process_image( function predict_labeled_dataset (line 313) | def predict_labeled_dataset(opts: argparse.Namespace) -> None: function predict_image (line 396) | def predict_image(opts: argparse.Namespace, file_path: str) -> None: function predict_images_in_folder (line 441) | def predict_images_in_folder(opts: argparse.Namespace) -> None: function main_segmentation_evaluation (line 511) | def main_segmentation_evaluation(args: Optional[List[str]] = None) -> None: FILE: corenet/engine/evaluation_engine.py class Evaluator (line 24) | class Evaluator: method __init__ (line 25) | def __init__( method eval_fn (line 70) | def eval_fn(self) -> None: method run (line 129) | def run(self) -> None: FILE: corenet/engine/fsdp_trainer.py class FSDPTrainer (line 30) | class FSDPTrainer(DefaultTrainer): method __init__ (line 48) | def __init__( method train_epoch (line 90) | def train_epoch(self, epoch: int) -> Tuple[float, float]: FILE: corenet/engine/segmentation_utils/cityscapes_iou.py function eval_cityscapes (line 14) | def eval_cityscapes(pred_dir: str, gt_dir: str) -> None: FILE: corenet/engine/utils.py function autocast_fn (line 23) | def autocast_fn(enabled: bool, amp_precision: Optional[str] = "float16"): function get_batch_size (line 43) | def get_batch_size(x: Union[Tensor, Dict, List]) -> int: function log_metrics (line 57) | def log_metrics( function flatten (line 78) | def flatten( function step_log_metrics (line 103) | def step_log_metrics( function get_log_writers (line 130) | def get_log_writers(opts: argparse.Namespace, save_location: Optional[st... FILE: corenet/loss_fn/__init__.py function build_loss_fn (line 22) | def build_loss_fn( function add_loss_fn_arguments (line 65) | def add_loss_fn_arguments(parser: argparse.ArgumentParser) -> argparse.A... FILE: corenet/loss_fn/base_criteria.py class BaseCriteria (line 15) | class BaseCriteria(nn.Module, abc.ABC): method __init__ (line 22) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 29) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward (line 45) | def forward( method extra_repr (line 57) | def extra_repr(self) -> str: method __repr__ (line 60) | def __repr__(self) -> str: FILE: corenet/loss_fn/classification/base_classification_criteria.py class BaseClassificationCriteria (line 14) | class BaseClassificationCriteria(BaseCriteria): method __init__ (line 21) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 25) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _compute_loss (line 40) | def _compute_loss( method forward (line 54) | def forward( FILE: corenet/loss_fn/classification/binary_cross_entropy.py class BinaryCrossEntropy (line 18) | class BinaryCrossEntropy(BaseClassificationCriteria): method __init__ (line 25) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 33) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _compute_loss (line 49) | def _compute_loss( method extra_repr (line 88) | def extra_repr(self) -> str: FILE: corenet/loss_fn/classification/cross_entropy.py class CrossEntropy (line 19) | class CrossEntropy(BaseClassificationCriteria): method __init__ (line 26) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 40) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _compute_loss (line 68) | def _compute_loss( method extra_repr (line 97) | def extra_repr(self) -> str: FILE: corenet/loss_fn/classification/focal_loss.py class FocalLoss (line 19) | class FocalLoss(BaseClassificationCriteria): method __init__ (line 33) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 41) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _compute_loss (line 62) | def _compute_loss( method extra_repr (line 96) | def extra_repr(self) -> str: FILE: corenet/loss_fn/composite_loss.py class CompositeLoss (line 21) | class CompositeLoss(BaseCriteria): method __init__ (line 53) | def __init__( method build_composite_loss_fn (line 70) | def build_composite_loss_fn( method add_arguments (line 150) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward (line 160) | def forward( method train (line 209) | def train(self, mode: bool = True) -> None: method eval (line 214) | def eval(self) -> None: method __repr__ (line 219) | def __repr__(self) -> str: FILE: corenet/loss_fn/detection/base_detection_criteria.py class BaseDetectionCriteria (line 10) | class BaseDetectionCriteria(BaseCriteria): method __init__ (line 17) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 21) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/loss_fn/detection/mask_rcnn_loss.py class MaskRCNNLoss (line 18) | class MaskRCNNLoss(BaseDetectionCriteria): method __init__ (line 26) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 45) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward (line 82) | def forward( method extra_repr (line 153) | def extra_repr(self) -> str: FILE: corenet/loss_fn/detection/ssd_multibox_loss.py class SSDLoss (line 22) | class SSDLoss(BaseDetectionCriteria): method __init__ (line 29) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method reset_unscaled_loss_values (line 59) | def reset_unscaled_loss_values(self) -> None: method add_arguments (line 66) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward (line 102) | def forward( method extra_repr (line 216) | def extra_repr(self) -> str: FILE: corenet/loss_fn/distillation/base_distillation.py class BaseDistillationCriteria (line 16) | class BaseDistillationCriteria(BaseCriteria): method __init__ (line 23) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 29) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _logits_from_teacher (line 44) | def _logits_from_teacher(self, input_sample: Tensor) -> Tensor: method _forward_distill (line 72) | def _forward_distill( method forward (line 90) | def forward( FILE: corenet/loss_fn/distillation/hard_distillation.py class HardDistillationLoss (line 18) | class HardDistillationLoss(BaseDistillationCriteria): method __init__ (line 26) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 45) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _forward_distill (line 66) | def _forward_distill( method extra_repr (line 128) | def extra_repr(self) -> str: FILE: corenet/loss_fn/distillation/soft_kl_distillation.py class SoftKLLoss (line 18) | class SoftKLLoss(BaseDistillationCriteria): method __init__ (line 26) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 38) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _forward_distill (line 52) | def _forward_distill( method extra_repr (line 80) | def extra_repr(self) -> str: FILE: corenet/loss_fn/language_modeling/base_lm.py class BaseLanguageModelingCriteria (line 16) | class BaseLanguageModelingCriteria(BaseCriteria): method add_arguments (line 27) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _compute_loss (line 39) | def _compute_loss(self, prediction: Tensor, target: Tensor) -> Tensor: method forward (line 53) | def forward( FILE: corenet/loss_fn/language_modeling/cross_entropy.py class CrossEntropyLM (line 17) | class CrossEntropyLM(BaseLanguageModelingCriteria): method __init__ (line 24) | def __init__(self, opts: argparse.Namespace) -> None: method add_arguments (line 46) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _compute_loss (line 78) | def _compute_loss( method extra_repr (line 117) | def extra_repr(self) -> str: FILE: corenet/loss_fn/language_modeling/cross_entropy_for_kv_prediction.py class CrossEntropyForKVPrediction (line 20) | class CrossEntropyForKVPrediction(BaseCriteria): method __init__ (line 29) | def __init__(self, opts: argparse.Namespace) -> None: method add_arguments (line 62) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward (line 113) | def forward( method _compute_loss (line 179) | def _compute_loss( method extra_repr (line 276) | def extra_repr(self) -> str: function get_cache_losses (line 292) | def get_cache_losses( FILE: corenet/loss_fn/multi_modal_img_text/base_multi_modal_img_text_criteria.py class BaseMultiModalImageTextCriteria (line 10) | class BaseMultiModalImageTextCriteria(BaseCriteria): method __init__ (line 17) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 21) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/loss_fn/multi_modal_img_text/contrastive_loss_clip.py class ContrastiveLossClip (line 21) | class ContrastiveLossClip(BaseMultiModalImageTextCriteria): method __init__ (line 28) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method _forward_clip (line 35) | def _forward_clip( method forward (line 105) | def forward( function gather_features (line 144) | def gather_features( FILE: corenet/loss_fn/neural_augmentation.py class NeuralAugmentation (line 20) | class NeuralAugmentation(BaseCriteria): method __init__ (line 30) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 142) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _forward_psnr (line 178) | def _forward_psnr( method _compute_loss (line 220) | def _compute_loss( method forward (line 246) | def forward( method extra_repr (line 300) | def extra_repr(self) -> str: function linear_curriculum (line 314) | def linear_curriculum(start: int, end: int, period: int) -> Tensor: function cosine_curriculum (line 328) | def cosine_curriculum(start: int, end: int, period: int) -> Tensor: FILE: corenet/loss_fn/segmentation/base_segmentation_criteria.py class BaseSegmentationCriteria (line 10) | class BaseSegmentationCriteria(BaseCriteria): method __init__ (line 17) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 21) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/loss_fn/segmentation/cross_entropy.py class SegCrossEntropy (line 21) | class SegCrossEntropy(BaseSegmentationCriteria): method __init__ (line 28) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 40) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _compute_loss (line 77) | def _compute_loss( method _forward_seg (line 120) | def _forward_seg( method forward (line 192) | def forward( method extra_repr (line 256) | def extra_repr(self) -> str: FILE: corenet/loss_fn/utils/build_helper.py function build_cls_teacher_from_opts (line 14) | def build_cls_teacher_from_opts(opts: argparse.Namespace) -> nn.Module: FILE: corenet/loss_fn/utils/class_weighting.py function compute_class_weights (line 10) | def compute_class_weights( FILE: corenet/metrics/__init__.py function arguments_stats (line 17) | def arguments_stats(parser: argparse.ArgumentParser): FILE: corenet/metrics/average_precision.py class AveragePrecisionMetric (line 21) | class AveragePrecisionMetric(EpochMetric): method compute_with_aggregates (line 22) | def compute_with_aggregates( FILE: corenet/metrics/coco_map.py class COCOEvaluator (line 27) | class COCOEvaluator(BaseMetric): method __init__ (line 28) | def __init__( method reset (line 68) | def reset(self) -> None: method update (line 71) | def update( method prepare_cache_results (line 120) | def prepare_cache_results( method summarize_coco_results (line 213) | def summarize_coco_results(self) -> Dict: method compute (line 245) | def compute(self) -> Dict[str, float]: FILE: corenet/metrics/confusion_mat.py class ConfusionMatrix (line 19) | class ConfusionMatrix(BaseMetric): method reset (line 24) | def reset(self): method update (line 28) | def update( method compute (line 62) | def compute(self) -> Union[Number, Dict[str, Union[Number, List[Number... FILE: corenet/metrics/image_text_retrieval.py class ImageTextRetrievalMetric (line 21) | class ImageTextRetrievalMetric(BaseMetric): method __init__ (line 39) | def __init__( method add_arguments (line 60) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset (line 72) | def reset(self) -> None: method update (line 76) | def update( method get_aggregates (line 104) | def get_aggregates(self) -> Tuple[Tensor, Tensor]: method _text2image (line 110) | def _text2image( method _image2text (line 135) | def _image2text( method compute (line 161) | def compute(self) -> Union[Number, Dict[str, Number]]: method _rank_metrics (line 185) | def _rank_metrics(self, ranks: torch.LongTensor) -> Dict[str, Number]: FILE: corenet/metrics/intersection_over_union.py function compute_miou_batch (line 18) | def compute_miou_batch( class IOUMetric (line 57) | class IOUMetric(AverageMetric): method gather_metrics (line 58) | def gather_metrics( method compute (line 86) | def compute(self) -> Union[Number, Dict[str, Number]]: FILE: corenet/metrics/metric_base.py class BaseMetric (line 24) | class BaseMetric(abc.ABC): method __init__ (line 25) | def __init__( method add_arguments (line 41) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset (line 46) | def reset(self) -> None: method update (line 54) | def update( method compute (line 76) | def compute( method preprocess_predictions (line 94) | def preprocess_predictions( method preprocess_targets (line 102) | def preprocess_targets(self, target: Union[Tensor, Dict]) -> Union[Ten... method summary_string (line 108) | def summary_string(self, name: str, sep: str, values: Dict[str, Any]) ... method is_epoch_summary_enabled_for_metric (line 126) | def is_epoch_summary_enabled_for_metric( method flatten_metric (line 147) | def flatten_metric( class AverageMetric (line 165) | class AverageMetric(BaseMetric): method reset (line 166) | def reset(self): method gather_metrics (line 171) | def gather_metrics( method _aggregate_ddp_sum (line 181) | def _aggregate_ddp_sum( method update (line 200) | def update( method compute (line 239) | def compute(self) -> Union[Number, List, Dict[str, Any]]: class EpochMetric (line 249) | class EpochMetric(BaseMetric): method __init__ (line 250) | def __init__( method reset (line 261) | def reset(self): method update (line 265) | def update( method get_aggregates (line 304) | def get_aggregates(self) -> Tuple[Tensor, Tensor]: method compute_with_aggregates (line 318) | def compute_with_aggregates(self, predictions: Tensor, targets: Tensor): method compute (line 330) | def compute(self) -> Union[Number, List, Dict[str, Any]]: FILE: corenet/metrics/metric_base_test.py class DummyMetric (line 14) | class DummyMetric(AverageMetric): method gather_metrics (line 15) | def gather_metrics( function test_average_metric_distributed_batchsize (line 24) | def test_average_metric_distributed_batchsize(mocker): FILE: corenet/metrics/misc.py class LossMetric (line 18) | class LossMetric(AverageMetric): method gather_metrics (line 19) | def gather_metrics( class GradNormMetric (line 61) | class GradNormMetric(AverageMetric): method gather_metrics (line 62) | def gather_metrics( FILE: corenet/metrics/multiclass_classification_pr.py function get_recall_at_precision (line 21) | def get_recall_at_precision( function compute_oi_f1 (line 56) | def compute_oi_f1(predictions: Tensor, targets: Tensor) -> Tuple[float, ... class MulticlassClassificationPR (line 133) | class MulticlassClassificationPR(BaseMetric): method __init__ (line 149) | def __init__( method add_arguments (line 170) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset (line 198) | def reset(self) -> None: method update (line 206) | def update( method compute (line 289) | def compute(self) -> Dict[str, Union[Number, List[List[Number]]]]: method is_epoch_summary_enabled_for_metric (line 393) | def is_epoch_summary_enabled_for_metric( method flatten_metric (line 427) | def flatten_metric( method summary_string (line 448) | def summary_string(self, name: str, sep: str, values: Dict[str, Any]) ... FILE: corenet/metrics/probability_histograms.py class ProbabilityHistogramMetric (line 20) | class ProbabilityHistogramMetric(EpochMetric): method __init__ (line 21) | def __init__( method add_arguments (line 32) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method compute_with_aggregates (line 40) | def compute_with_aggregates( FILE: corenet/metrics/psnr.py function compute_psnr (line 16) | def compute_psnr( class PSNRMetric (line 34) | class PSNRMetric(AverageMetric): method gather_metrics (line 35) | def gather_metrics( FILE: corenet/metrics/retrieval_cmc.py function cosine_distance_matrix (line 25) | def cosine_distance_matrix(x: torch.Tensor, y: torch.Tensor) -> torch.Te... function l2_distance_matrix (line 47) | def l2_distance_matrix(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: class RetrievalCMC (line 64) | class RetrievalCMC(EpochMetric): method __init__ (line 69) | def __init__( method add_arguments (line 97) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method compute_with_aggregates (line 125) | def compute_with_aggregates( function cmc_calculation (line 174) | def cmc_calculation( function mean_ap (line 204) | def mean_ap( FILE: corenet/metrics/stats.py class Statistics (line 23) | class Statistics(object): method __init__ (line 24) | def __init__( method update (line 57) | def update( method _avg_statistics_all (line 94) | def _avg_statistics_all(self, sep=": ", metrics=None) -> List[str]: method _compute_avg_statistics_all (line 111) | def _compute_avg_statistics_all(self) -> Dict[str, Union[float, Dict]]: method avg_statistics (line 122) | def avg_statistics( method iter_summary (line 163) | def iter_summary( method epoch_summary (line 196) | def epoch_summary( FILE: corenet/metrics/topk_accuracy.py function top_k_accuracy (line 15) | def top_k_accuracy( class TopKMetric (line 33) | class TopKMetric(AverageMetric): method gather_metrics (line 36) | def gather_metrics( class Top1Metric (line 109) | class Top1Metric(TopKMetric): class Top5Metric (line 114) | class Top5Metric(TopKMetric): FILE: corenet/metrics/vqa_preset_score.py function vqa_preset_score_metric (line 17) | def vqa_preset_score_metric(output: Tensor, target: Tensor) -> list: class VQAPresetScoreMetric (line 43) | class VQAPresetScoreMetric(AverageMetric): method gather_metrics (line 46) | def gather_metrics( FILE: corenet/modeling/__init__.py function modeling_arguments (line 21) | def modeling_arguments(parser: argparse.ArgumentParser) -> argparse.Argu... FILE: corenet/modeling/anchor_generator/__init__.py function arguments_anchor_gen (line 21) | def arguments_anchor_gen(parser: argparse.ArgumentParser) -> argparse.Ar... function build_anchor_generator (line 33) | def build_anchor_generator(opts, *args, **kwargs): FILE: corenet/modeling/anchor_generator/base_anchor_generator.py class BaseAnchorGenerator (line 13) | class BaseAnchorGenerator(torch.nn.Module): method __init__ (line 18) | def __init__(self, *args, **kwargs) -> None: method add_arguments (line 23) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method num_anchors_per_os (line 29) | def num_anchors_per_os(self): method _generate_anchors (line 34) | def _generate_anchors( method _get_anchors (line 46) | def _get_anchors( method forward (line 71) | def forward( FILE: corenet/modeling/anchor_generator/ssd_anchor_generator.py class SSDAnchorGenerator (line 19) | class SSDAnchorGenerator(BaseAnchorGenerator): method __init__ (line 25) | def __init__(self, opts, *args, **kwargs) -> None: method __repr__ (line 74) | def __repr__(self): method add_arguments (line 85) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method num_anchors_per_os (line 135) | def num_anchors_per_os(self) -> List: method _generate_anchors (line 142) | def _generate_anchors( FILE: corenet/modeling/image_projection_layers/__init__.py function arguments_image_projection_head (line 23) | def arguments_image_projection_head( function build_image_projection_head (line 35) | def build_image_projection_head( FILE: corenet/modeling/image_projection_layers/attention_pool_2d.py class AttentionPool2dHead (line 21) | class AttentionPool2dHead(BaseImageProjectionHead): method __init__ (line 26) | def __init__(self, opts, in_dim: int, out_dim: int, *args, **kwargs) -... method add_arguments (line 80) | def add_arguments(cls, parser: argparse.ArgumentParser): method reset_parameters (line 116) | def reset_parameters(self): method forward (line 121) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/image_projection_layers/base_image_projection.py class BaseImageProjectionHead (line 15) | class BaseImageProjectionHead(nn.Module): method __init__ (line 18) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 24) | def add_arguments(cls, parser: argparse.ArgumentParser): method reset_parameters (line 44) | def reset_parameters(self) -> None: method get_trainable_parameters (line 48) | def get_trainable_parameters( method forward (line 62) | def forward(self, input: Dict, *args, **kwargs) -> Dict: function get_in_feature_dimension (line 66) | def get_in_feature_dimension(image_classifier: nn.Module) -> int: FILE: corenet/modeling/image_projection_layers/global_pool_2d.py class GlobalPool2D (line 22) | class GlobalPool2D(BaseImageProjectionHead): method __init__ (line 25) | def __init__(self, opts, in_dim: int, out_dim: int, *args, **kwargs) -... method add_arguments (line 55) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset_parameters (line 73) | def reset_parameters(self): method forward (line 76) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/image_projection_layers/simple_projection_head.py class SimpleImageProjectionHead (line 21) | class SimpleImageProjectionHead(BaseImageProjectionHead): method __init__ (line 24) | def __init__(self, opts, in_dim: int, out_dim: int, *args, **kwargs) -... method add_arguments (line 53) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset_parameters (line 71) | def reset_parameters(self): method forward (line 74) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/layers/__init__.py function layer_specific_args (line 82) | def layer_specific_args(parser: argparse.ArgumentParser): function arguments_nn_layers (line 101) | def arguments_nn_layers(parser: argparse.ArgumentParser): FILE: corenet/modeling/layers/activation/__init__.py function register_act_fn (line 19) | def register_act_fn(name): function arguments_activation_fn (line 32) | def arguments_activation_fn(parser: argparse.ArgumentParser): function build_activation_layer (line 58) | def build_activation_layer( FILE: corenet/modeling/layers/activation/gelu.py class GELU (line 12) | class GELU(nn.GELU): method __init__ (line 17) | def __init__(self, *args, **kwargs) -> None: FILE: corenet/modeling/layers/activation/hard_sigmoid.py class Hardsigmoid (line 15) | class Hardsigmoid(nn.Hardsigmoid): method __init__ (line 20) | def __init__(self, inplace: Optional[bool] = False, *args, **kwargs) -... method forward (line 23) | def forward(self, input: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/layers/activation/hard_swish.py class Hardswish (line 15) | class Hardswish(nn.Hardswish): method __init__ (line 21) | def __init__(self, inplace: Optional[bool] = False, *args, **kwargs) -... method forward (line 24) | def forward(self, input: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/layers/activation/leaky_relu.py class LeakyReLU (line 14) | class LeakyReLU(nn.LeakyReLU): method __init__ (line 20) | def __init__( FILE: corenet/modeling/layers/activation/prelu.py class PReLU (line 14) | class PReLU(nn.PReLU): method __init__ (line 19) | def __init__( FILE: corenet/modeling/layers/activation/relu.py class ReLU (line 14) | class ReLU(nn.ReLU): method __init__ (line 19) | def __init__(self, inplace: Optional[bool] = False, *args, **kwargs) -... FILE: corenet/modeling/layers/activation/relu6.py class ReLU6 (line 14) | class ReLU6(nn.ReLU6): method __init__ (line 19) | def __init__(self, inplace: Optional[bool] = False, *args, **kwargs) -... FILE: corenet/modeling/layers/activation/sigmoid.py class Sigmoid (line 12) | class Sigmoid(nn.Sigmoid): method __init__ (line 17) | def __init__(self, *args, **kwargs) -> None: FILE: corenet/modeling/layers/activation/swish.py class Swish (line 14) | class Swish(nn.SiLU): method __init__ (line 19) | def __init__(self, inplace: Optional[bool] = False, *args, **kwargs) -... FILE: corenet/modeling/layers/activation/tanh.py class Tanh (line 12) | class Tanh(nn.Tanh): method __init__ (line 17) | def __init__(self, *args, **kwargs) -> None: FILE: corenet/modeling/layers/adaptive_pool.py class AdaptiveAvgPool2d (line 11) | class AdaptiveAvgPool2d(nn.AdaptiveAvgPool2d): method __init__ (line 25) | def __init__( FILE: corenet/modeling/layers/base_layer.py class BaseLayer (line 14) | class BaseLayer(nn.Module): method __init__ (line 19) | def __init__(self, *args, **kwargs) -> None: method add_arguments (line 23) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_trainable_parameters (line 27) | def get_trainable_parameters( method forward (line 58) | def forward(self, *args, **kwargs) -> Any: method __repr__ (line 62) | def __repr__(self): FILE: corenet/modeling/layers/conv_layer.py class Conv2d (line 18) | class Conv2d(nn.Conv2d): method __init__ (line 42) | def __init__( class _BaseConvNormActLayer (line 69) | class _BaseConvNormActLayer(BaseLayer): method ndim (line 110) | def ndim(self) -> int: method module_cls (line 114) | def module_cls(self) -> Type[nn.Module]: method __init__ (line 117) | def __init__( method add_arguments (line 236) | def add_arguments(cls, parser: argparse.ArgumentParser): method forward (line 254) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 257) | def __repr__(self): class ConvLayer1d (line 270) | class ConvLayer1d(_BaseConvNormActLayer): class ConvLayer2d (line 275) | class ConvLayer2d(_BaseConvNormActLayer): class ConvLayer3d (line 280) | class ConvLayer3d(_BaseConvNormActLayer): class TransposeConvLayer2d (line 285) | class TransposeConvLayer2d(BaseLayer): method __init__ (line 316) | def __init__( method forward (line 435) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 438) | def __repr__(self): class NormActLayer (line 451) | class NormActLayer(BaseLayer): method __init__ (line 464) | def __init__(self, opts, num_features, *args, **kwargs): method forward (line 484) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 487) | def __repr__(self): class _BaseSeparableConv (line 494) | class _BaseSeparableConv(BaseLayer): method __init__ (line 528) | def __init__( method conv_layer_cls (line 582) | def conv_layer_cls(self): method __repr__ (line 585) | def __repr__(self): method forward (line 596) | def forward(self, x: Tensor) -> Tensor: class SeparableConv1d (line 602) | class SeparableConv1d(_BaseSeparableConv): class SeparableConv2d (line 606) | class SeparableConv2d(_BaseSeparableConv): class SeparableConv3d (line 610) | class SeparableConv3d(_BaseSeparableConv): FILE: corenet/modeling/layers/dropout.py class Dropout (line 11) | class Dropout(nn.Dropout): method __init__ (line 26) | def __init__( class Dropout2d (line 32) | class Dropout2d(nn.Dropout2d): method __init__ (line 48) | def __init__(self, p: float = 0.5, inplace: bool = False): FILE: corenet/modeling/layers/embedding.py class Embedding (line 16) | class Embedding(nn.Embedding): method __init__ (line 33) | def __init__( method reset_parameters (line 48) | def reset_parameters(self) -> None: FILE: corenet/modeling/layers/flash_multi_head_attention.py class FlashMultiHeadSelfAttention (line 18) | class FlashMultiHeadSelfAttention(BaseLayer): method __init__ (line 32) | def __init__( method forward (line 75) | def forward(self, x: Tensor) -> Tensor: FILE: corenet/modeling/layers/flatten.py class Flatten (line 11) | class Flatten(nn.Flatten): method __init__ (line 26) | def __init__(self, start_dim: Optional[int] = 1, end_dim: Optional[int... FILE: corenet/modeling/layers/global_pool.py class GlobalPool (line 16) | class GlobalPool(BaseLayer): method __init__ (line 31) | def __init__( method add_arguments (line 49) | def add_arguments(cls, parser: argparse.ArgumentParser): method _global_pool (line 60) | def _global_pool(self, x: Tensor, dims: List): method forward (line 73) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 82) | def __repr__(self): FILE: corenet/modeling/layers/identity.py class Identity (line 11) | class Identity(BaseLayer): method __init__ (line 16) | def __init__(self): method forward (line 19) | def forward(self, x: Tensor) -> Tensor: FILE: corenet/modeling/layers/linear_attention.py class LinearSelfAttention (line 16) | class LinearSelfAttention(BaseLayer): method __init__ (line 40) | def __init__( method __repr__ (line 73) | def __repr__(self): method visualize_context_scores (line 79) | def visualize_context_scores(context_scores): method _forward_self_attn (line 134) | def _forward_self_attn(self, x: Tensor, *args, **kwargs) -> Tensor: method _forward_cross_attn (line 163) | def _forward_cross_attn( method forward (line 209) | def forward( FILE: corenet/modeling/layers/linear_layer.py class LinearLayer (line 17) | class LinearLayer(BaseLayer): method __init__ (line 33) | def __init__( method add_arguments (line 53) | def add_arguments(cls, parser: argparse.ArgumentParser): method reset_params (line 68) | def reset_params(self): method forward (line 74) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 93) | def __repr__(self): class GroupLinear (line 106) | class GroupLinear(BaseLayer): method __init__ (line 124) | def __init__( method add_arguments (line 166) | def add_arguments(cls, parser: argparse.ArgumentParser): method reset_params (line 181) | def reset_params(self): method _forward (line 187) | def _forward(self, x: Tensor) -> Tensor: method forward (line 211) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 223) | def __repr__(self): FILE: corenet/modeling/layers/multi_head_attention.py class MultiHeadAttention (line 18) | class MultiHeadAttention(BaseLayer): method __init__ (line 38) | def __init__( method __repr__ (line 76) | def __repr__(self): method forward_tracing (line 81) | def forward_tracing( method forward_default (line 139) | def forward_default( method forward_pytorch (line 249) | def forward_pytorch( method forward (line 283) | def forward( FILE: corenet/modeling/layers/normalization/__init__.py function register_norm_fn (line 21) | def register_norm_fn(name): function build_normalization_layer (line 35) | def build_normalization_layer( function arguments_norm_layers (line 91) | def arguments_norm_layers(parser: argparse.ArgumentParser): FILE: corenet/modeling/layers/normalization/batch_norm.py class BatchNorm2d (line 16) | class BatchNorm2d(nn.BatchNorm2d): method __init__ (line 33) | def __init__( class BatchNorm2dFP32 (line 53) | class BatchNorm2dFP32(BatchNorm2d): method __init__ (line 58) | def __init__( method forward (line 78) | def forward(self, input: Tensor) -> Tensor: class BatchNorm1d (line 84) | class BatchNorm1d(nn.BatchNorm1d): method __init__ (line 101) | def __init__( class BatchNorm3d (line 121) | class BatchNorm3d(nn.BatchNorm3d): method __init__ (line 122) | def __init__( FILE: corenet/modeling/layers/normalization/group_norm.py class GroupNorm (line 14) | class GroupNorm(nn.GroupNorm): method __init__ (line 34) | def __init__( FILE: corenet/modeling/layers/normalization/instance_norm.py class InstanceNorm2d (line 15) | class InstanceNorm2d(nn.InstanceNorm2d): method __init__ (line 32) | def __init__( class InstanceNorm1d (line 52) | class InstanceNorm1d(nn.InstanceNorm1d): method __init__ (line 69) | def __init__( FILE: corenet/modeling/layers/normalization/layer_norm.py class LayerNorm (line 15) | class LayerNorm(nn.LayerNorm): method __init__ (line 37) | def __init__( method forward (line 51) | def forward(self, x: Tensor) -> Tensor: class LayerNorm2D_NCHW (line 77) | class LayerNorm2D_NCHW(nn.GroupNorm): method __init__ (line 92) | def __init__( method __repr__ (line 105) | def __repr__(self): class LayerNormFP32 (line 112) | class LayerNormFP32(LayerNorm): method __init__ (line 117) | def __init__( method forward (line 133) | def forward(self, x: Tensor) -> Tensor: FILE: corenet/modeling/layers/normalization/rms_norm.py class RMSNorm (line 13) | class RMSNorm(nn.Module): method __init__ (line 14) | def __init__( method _norm (line 29) | def _norm(self, x: Tensor) -> Tensor: method forward (line 42) | def forward(self, x: Tensor) -> Tensor: method extra_repr (line 60) | def extra_repr(self) -> str: FILE: corenet/modeling/layers/normalization/sync_batch_norm.py class SyncBatchNorm (line 15) | class SyncBatchNorm(nn.SyncBatchNorm): method __init__ (line 33) | def __init__( class SyncBatchNormFP32 (line 53) | class SyncBatchNormFP32(SyncBatchNorm): method __init__ (line 58) | def __init__( method forward (line 76) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/layers/pixel_shuffle.py class PixelShuffle (line 9) | class PixelShuffle(nn.PixelShuffle): method __init__ (line 22) | def __init__(self, upscale_factor: int, *args, **kwargs) -> None: method __repr__ (line 25) | def __repr__(self): FILE: corenet/modeling/layers/pooling.py class MaxPool2d (line 11) | class MaxPool2d(nn.MaxPool2d): method __init__ (line 27) | def __init__( method __repr__ (line 37) | def __repr__(self): class AvgPool2d (line 43) | class AvgPool2d(nn.AvgPool2d): method __init__ (line 62) | def __init__( method __repr__ (line 80) | def __repr__(self): FILE: corenet/modeling/layers/positional_embedding.py class PositionalEmbedding (line 16) | class PositionalEmbedding(BaseLayer): method __init__ (line 17) | def __init__( method forward (line 46) | def forward(self, seq_len: int, *args, **kwargs) -> Tensor: method __repr__ (line 49) | def __repr__(self): class LearnablePositionalEmbedding (line 53) | class LearnablePositionalEmbedding(nn.Module): method __init__ (line 56) | def __init__( method reset_parameters (line 77) | def reset_parameters(self) -> None: method forward (line 83) | def forward(self, seq_len: int, *args, **kwargs) -> Tensor: method __repr__ (line 105) | def __repr__(self): class SinusoidalPositionalEmbedding (line 115) | class SinusoidalPositionalEmbedding(nn.Module): method __init__ (line 116) | def __init__( method get_weights (line 135) | def get_weights(self) -> Tensor: method forward (line 155) | def forward(self, seq_len: int, *args, **kwargs) -> Tensor: method __repr__ (line 173) | def __repr__(self): FILE: corenet/modeling/layers/positional_encoding.py class SinusoidalPositionalEncoding (line 16) | class SinusoidalPositionalEncoding(BaseLayer): method __init__ (line 34) | def __init__( method forward_patch_last (line 69) | def forward_patch_last( method forward_others (line 84) | def forward_others( method forward (line 99) | def forward(self, x, indices: Optional[Tensor] = None, *args, **kwargs... method __repr__ (line 105) | def __repr__(self): class LearnablePositionEncoding (line 109) | class LearnablePositionEncoding(BaseLayer): method __init__ (line 126) | def __init__( method forward (line 142) | def forward(self, x, *args, **kwargs) -> Tensor: method __repr__ (line 150) | def __repr__(self): FILE: corenet/modeling/layers/random_layers.py class RandomApply (line 15) | class RandomApply(BaseLayer): method __init__ (line 24) | def __init__( method forward (line 35) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 45) | def __repr__(self): FILE: corenet/modeling/layers/rotary_embeddings.py function _negate_half (line 12) | def _negate_half(x: Tensor) -> Tensor: function _apply_rotary_pos_emb (line 26) | def _apply_rotary_pos_emb(x: Tensor, pos_sin: Tensor, pos_cos: Tensor) -... class RotaryEmbedding (line 43) | class RotaryEmbedding(torch.nn.Module): method __init__ (line 56) | def __init__( method extra_repr (line 75) | def extra_repr(self) -> str: method _compute_sin_cos_embeddings (line 78) | def _compute_sin_cos_embeddings( method forward (line 131) | def forward( FILE: corenet/modeling/layers/single_head_attention.py class SingleHeadAttention (line 17) | class SingleHeadAttention(BaseLayer): method __init__ (line 33) | def __init__( method __repr__ (line 56) | def __repr__(self) -> str: method forward (line 61) | def forward( FILE: corenet/modeling/layers/softmax.py class Softmax (line 11) | class Softmax(nn.Softmax): method __init__ (line 23) | def __init__(self, dim: Optional[int] = -1, *args, **kwargs): FILE: corenet/modeling/layers/stochastic_depth.py class StochasticDepth (line 10) | class StochasticDepth(StochasticDepthTorch): method __init__ (line 17) | def __init__(self, p: float, mode: str) -> None: FILE: corenet/modeling/layers/token_merging.py class TokenMerging (line 16) | class TokenMerging(nn.Module): method __init__ (line 29) | def __init__(self, dim: int, window: int = 2) -> None: method forward (line 36) | def forward( method extra_repr (line 75) | def extra_repr(self) -> str: function pad_x_and_mask (line 79) | def pad_x_and_mask( FILE: corenet/modeling/layers/upsample.py class UpSample (line 12) | class UpSample(nn.Upsample): method __init__ (line 29) | def __init__( FILE: corenet/modeling/matcher_det/__init__.py function arguments_box_matcher (line 21) | def arguments_box_matcher(parser: argparse.ArgumentParser): function build_matcher (line 34) | def build_matcher(opts, *args, **kwargs): FILE: corenet/modeling/matcher_det/base_matcher.py class BaseMatcher (line 9) | class BaseMatcher(object): method __init__ (line 14) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 19) | def add_arguments(cls, parser: argparse.ArgumentParser): method __call__ (line 23) | def __call__(self, *args, **kwargs): FILE: corenet/modeling/matcher_det/ssd_matcher.py class SSDMatcher (line 25) | class SSDMatcher(BaseMatcher): method __init__ (line 44) | def __init__(self, opts, bg_class_id: Optional[int] = 0, *args, **kwar... method __repr__ (line 61) | def __repr__(self): method add_arguments (line 70) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __call__ (line 96) | def __call__( method convert_to_boxes (line 131) | def convert_to_boxes( function check_variable (line 150) | def check_variable(val, args_str: str): FILE: corenet/modeling/misc/averaging_utils.py class EMA (line 14) | class EMA(object): method __init__ (line 24) | def __init__( method update_parameters (line 43) | def update_parameters(self, model): function arguments_ema (line 58) | def arguments_ema(parser: argparse.ArgumentParser): FILE: corenet/modeling/misc/box_utils.py function convert_locations_to_boxes (line 15) | def convert_locations_to_boxes( function convert_boxes_to_locations (line 51) | def convert_boxes_to_locations( function center_form_to_corner_form (line 82) | def center_form_to_corner_form(boxes: Tensor) -> Tensor: function corner_form_to_center_form (line 103) | def corner_form_to_center_form(boxes: torch.Tensor) -> torch.Tensor: FILE: corenet/modeling/misc/common.py function clean_strip (line 20) | def clean_strip( function load_pretrained_model (line 35) | def load_pretrained_model( function parameter_list (line 122) | def parameter_list( function freeze_module (line 179) | def freeze_module(module: torch.nn.Module, force_eval: bool = True) -> t... function freeze_modules_based_on_opts (line 213) | def freeze_modules_based_on_opts( function get_tensor_sizes (line 280) | def get_tensor_sizes(data: Union[Dict, Tensor]) -> Union[List[str], List... FILE: corenet/modeling/misc/init_utils.py function _init_nn_layers (line 31) | def _init_nn_layers( function initialize_conv_layer (line 79) | def initialize_conv_layer( function initialize_fc_layer (line 88) | def initialize_fc_layer( function initialize_norm_layers (line 98) | def initialize_norm_layers(module) -> None: function initialize_weights (line 110) | def initialize_weights(opts, modules) -> None: FILE: corenet/modeling/models/__init__.py function get_model (line 28) | def get_model( function arguments_model (line 86) | def arguments_model(parser: argparse.ArgumentParser) -> argparse.Argumen... FILE: corenet/modeling/models/audio_classification/audio_byteformer.py class AudioByteFormer (line 19) | class AudioByteFormer(ByteFormer, BaseAudioClassification): method forward (line 23) | def forward(self, x: Dict[str, Tensor], *args, **kwargs) -> Tensor: method dummy_input_and_label (line 38) | def dummy_input_and_label(self, batch_size: int) -> Dict: FILE: corenet/modeling/models/audio_classification/base_audio_classification.py class BaseAudioClassification (line 12) | class BaseAudioClassification(BaseAnyNNModel): method __init__ (line 19) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 23) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/modeling/models/base_model.py class BaseAnyNNModel (line 24) | class BaseAnyNNModel(nn.Module): method __init__ (line 27) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 32) | def add_arguments(cls, parser: argparse.ArgumentParser): method reset_parameters (line 88) | def reset_parameters(self, opts: argparse.Namespace) -> None: method forward (line 92) | def forward(self, x: Any, *args, **kwargs) -> Any: method _apply_layer_wise_lr (line 96) | def _apply_layer_wise_lr( method get_trainable_parameters (line 111) | def get_trainable_parameters( method dummy_input_and_label (line 144) | def dummy_input_and_label(self, batch_size: int) -> Dict: method get_exportable_model (line 150) | def get_exportable_model(self) -> nn.Module: method freeze_norm_layers (line 159) | def freeze_norm_layers( method build_model (line 187) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... method info (line 203) | def info(self) -> None: method get_fsdp_wrap_policy (line 279) | def get_fsdp_wrap_policy(self) -> Optional[Callable[[nn.Module, bool, ... method get_activation_checkpoint_submodule_class (line 297) | def get_activation_checkpoint_submodule_class(self) -> Callable: FILE: corenet/modeling/models/classification/base_image_encoder.py class BaseImageEncoder (line 21) | class BaseImageEncoder(BaseAnyNNModel): method __init__ (line 24) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method n_classes (line 65) | def n_classes(self) -> int: method add_arguments (line 75) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method check_model (line 164) | def check_model(self) -> None: method update_classifier (line 180) | def update_classifier(self, opts: argparse.Namespace, n_classes: int) ... method _forward_layer (line 210) | def _forward_layer(self, layer: nn.Module, x: Tensor) -> Tensor: method extract_end_points_all (line 216) | def extract_end_points_all( method extract_end_points_l4 (line 265) | def extract_end_points_l4(self, x: Tensor, *args, **kwargs) -> Dict[st... method extract_features (line 271) | def extract_features(self, x: Tensor, *args, **kwargs) -> Tensor: method forward_classifier (line 286) | def forward_classifier(self, x: Tensor, *args, **kwargs) -> Tensor: method forward (line 295) | def forward(self, x: Any, *args, **kwargs) -> Any: method get_trainable_parameters (line 313) | def get_trainable_parameters( method dummy_input_and_label (line 345) | def dummy_input_and_label(self, batch_size: int) -> Dict: method get_exportable_model (line 367) | def get_exportable_model(self) -> nn.Module: method build_model (line 377) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... function set_model_specific_opts_before_model_building (line 401) | def set_model_specific_opts_before_model_building( function unset_model_specific_opts_after_model_building (line 441) | def unset_model_specific_opts_after_model_building( FILE: corenet/modeling/models/classification/byteformer.py function unfold_tokens (line 27) | def unfold_tokens(t: Tensor, kernel_size: int) -> Tensor: class ByteFormer (line 49) | class ByteFormer(BaseAnyNNModel): method __init__ (line 54) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 169) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method dummy_input_and_label (line 275) | def dummy_input_and_label(self, batch_size: int) -> Dict: method apply_token_reduction_net (line 298) | def apply_token_reduction_net( method get_backbone_inputs (line 329) | def get_backbone_inputs(self, x: Tensor) -> Tuple[Tensor, Tensor]: method backbone_forward (line 357) | def backbone_forward( method get_downsampler_name (line 383) | def get_downsampler_name(self, idx: int) -> str: method get_downsampler (line 395) | def get_downsampler(self, idx: int) -> Optional[nn.Module]: method forward (line 411) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method build_model (line 434) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... FILE: corenet/modeling/models/classification/config/byteformer.py function get_configuration (line 11) | def get_configuration(opts: argparse.Namespace) -> Dict: FILE: corenet/modeling/models/classification/config/efficientnet.py class CompoundScalingConfig (line 16) | class CompoundScalingConfig: class EfficientNetBlockConfig (line 25) | class EfficientNetBlockConfig: method __init__ (line 32) | def __init__( function get_configuration (line 51) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/fastvit.py function get_configuration (line 13) | def get_configuration(opts: argparse.Namespace) -> Dict: FILE: corenet/modeling/models/classification/config/mobilenetv1.py function get_configuration (line 12) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/mobilenetv2.py function get_configuration (line 9) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/mobilenetv3.py function get_configuration (line 11) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/mobileone.py function get_configuration (line 11) | def get_configuration(opts: argparse.Namespace) -> Dict: FILE: corenet/modeling/models/classification/config/mobilevit.py function get_configuration (line 11) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/mobilevit_v2.py function get_configuration (line 11) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/regnet.py class BlockParamsConfig (line 44) | class BlockParamsConfig: method __init__ (line 63) | def __init__( method _make_widths_compatible (line 127) | def _make_widths_compatible( method extra_repr (line 160) | def extra_repr(self) -> str: method __repr__ (line 171) | def __repr__(self) -> str: function get_configuration (line 175) | def get_configuration( FILE: corenet/modeling/models/classification/config/resnet.py function add_squeeze_channels (line 11) | def add_squeeze_channels( function get_configuration (line 26) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/swin_transformer.py function get_configuration (line 11) | def get_configuration(opts) -> Dict: FILE: corenet/modeling/models/classification/config/vit.py function get_configuration (line 12) | def get_configuration(opts: argparse.Namespace) -> Dict: FILE: corenet/modeling/models/classification/efficientnet.py class EfficientNet (line 23) | class EfficientNet(BaseImageEncoder): method __init__ (line 28) | def __init__( method _make_layer (line 118) | def _make_layer( method add_arguments (line 176) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_activation_checkpoint_submodule_class (line 190) | def get_activation_checkpoint_submodule_class(self) -> Callable: FILE: corenet/modeling/models/classification/fastvit.py function basic_blocks (line 25) | def basic_blocks( class FastViT (line 101) | class FastViT(BaseImageEncoder): method __init__ (line 106) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 249) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_exportable_model (line 290) | def get_exportable_model(self) -> nn.Module: FILE: corenet/modeling/models/classification/mobilenetv1.py class MobileNetv1 (line 26) | class MobileNetv1(BaseImageEncoder): method __init__ (line 31) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 130) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _make_layer (line 142) | def _make_layer( FILE: corenet/modeling/models/classification/mobilenetv2.py class MobileNetV2 (line 20) | class MobileNetV2(BaseImageEncoder): method __init__ (line 25) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 148) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _make_layer (line 158) | def _make_layer( FILE: corenet/modeling/models/classification/mobilenetv3.py class MobileNetV3 (line 21) | class MobileNetV3(BaseImageEncoder): method __init__ (line 26) | def __init__(self, opts, *args, **kwargs) -> None: method _make_layer (line 164) | def _make_layer( method add_arguments (line 207) | def add_arguments(cls, parser: argparse.ArgumentParser): FILE: corenet/modeling/models/classification/mobileone.py class MobileOne (line 18) | class MobileOne(BaseImageEncoder): method __init__ (line 23) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 125) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _make_stage (line 142) | def _make_stage( method get_exportable_model (line 201) | def get_exportable_model(self) -> nn.Module: FILE: corenet/modeling/models/classification/mobilevit.py class MobileViT (line 20) | class MobileViT(BaseImageEncoder): method __init__ (line 25) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 127) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _make_layer (line 186) | def _make_layer( method _make_mobilenet_layer (line 206) | def _make_mobilenet_layer( method _make_mit_layer (line 228) | def _make_mit_layer( method get_activation_checkpoint_submodule_class (line 301) | def get_activation_checkpoint_submodule_class(self) -> Callable: FILE: corenet/modeling/models/classification/mobilevit_v2.py class MobileViTv2 (line 20) | class MobileViTv2(BaseImageEncoder): method __init__ (line 25) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 104) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method _make_layer (line 138) | def _make_layer( method _make_mobilenet_layer (line 152) | def _make_mobilenet_layer( method _make_mit_layer (line 174) | def _make_mit_layer( FILE: corenet/modeling/models/classification/regnet.py class RegNet (line 29) | class RegNet(BaseImageEncoder): method __init__ (line 34) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method _make_stage (line 134) | def _make_stage( method add_arguments (line 167) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/modeling/models/classification/resnet.py class ResNet (line 27) | class ResNet(BaseImageEncoder): method __init__ (line 37) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method _block_stochastic_depth_prob (line 173) | def _block_stochastic_depth_prob( method _make_layer (line 185) | def _make_layer( method add_arguments (line 249) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/modeling/models/classification/swin_transformer.py class SwinTransformer (line 29) | class SwinTransformer(BaseImageEncoder): method __init__ (line 37) | def __init__(self, opts, *args, **kwargs) -> None: method extract_end_points_all (line 190) | def extract_end_points_all( method add_arguments (line 253) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/modeling/models/classification/vit.py class VisionTransformer (line 35) | class VisionTransformer(BaseImageEncoder): method __init__ (line 52) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method _build_patch_embedding_layer (line 155) | def _build_patch_embedding_layer( method _build_naive_transformer_layer (line 221) | def _build_naive_transformer_layer( method _build_transformer_layer_with_flash_attention (line 268) | def _build_transformer_layer_with_flash_attention( method update_layer_norm_eps (line 335) | def update_layer_norm_eps(self) -> None: method reset_simple_fpn_params (line 341) | def reset_simple_fpn_params(self) -> None: method _apply_layer_wise_lr (line 348) | def _apply_layer_wise_lr( method _build_simple_fpn_layers (line 481) | def _build_simple_fpn_layers( method add_arguments (line 562) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method extract_patch_embeddings (line 621) | def extract_patch_embeddings(self, x: Tensor) -> Tuple[Tensor, Tuple[i... method _features_from_transformer (line 660) | def _features_from_transformer(self, x: Tensor) -> Tuple[Tensor, Tuple... method extract_features (line 676) | def extract_features( method forward_classifier (line 721) | def forward_classifier( method forward (line 744) | def forward( method extract_end_points_all (line 781) | def extract_end_points_all( method get_activation_checkpoint_submodule_class (line 836) | def get_activation_checkpoint_submodule_class(self) -> Callable: method get_fsdp_wrap_policy (line 843) | def get_fsdp_wrap_policy( FILE: corenet/modeling/models/detection/base_detection.py class BaseDetection (line 18) | class BaseDetection(BaseAnyNNModel): method __init__ (line 26) | def __init__( method add_arguments (line 55) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset_layer_parameters (line 103) | def reset_layer_parameters(layer: nn.Module, opts: argparse.Namespace)... method build_model (line 108) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... function check_feature_map_output_channels (line 126) | def check_feature_map_output_channels(config: Dict, layer_name: str) -> ... FILE: corenet/modeling/models/detection/mask_rcnn.py class MaskRCNNEncoder (line 34) | class MaskRCNNEncoder(nn.Module): method __init__ (line 35) | def __init__( method get_augmented_tensor (line 122) | def get_augmented_tensor(self) -> Tensor: method forward (line 125) | def forward(self, x: Tensor) -> Dict[str, Tensor]: method get_trainable_parameters (line 159) | def get_trainable_parameters( method get_activation_checkpoint_submodule_class (line 261) | def get_activation_checkpoint_submodule_class(self) -> Callable: class MaskRCNNDetector (line 267) | class MaskRCNNDetector(BaseDetection): method __init__ (line 275) | def __init__(self, opts, encoder: BaseImageEncoder, *args, **kwargs) -... method update_layer_norm_eps (line 495) | def update_layer_norm_eps(self): method set_norm_layer_opts (line 500) | def set_norm_layer_opts(self): method reset_norm_layer_opts (line 511) | def reset_norm_layer_opts(self, default_norm): method add_arguments (line 515) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset_generalized_rcnn_transform (line 734) | def reset_generalized_rcnn_transform(self, height, width): method get_trainable_parameters (line 737) | def get_trainable_parameters( method forward (line 793) | def forward( method predict (line 844) | def predict(self, x: Tensor, *args, **kwargs) -> DetectionPredTuple: method dummy_input_and_label (line 890) | def dummy_input_and_label(self, batch_size: int) -> Dict: method get_activation_checkpoint_submodule_class (line 929) | def get_activation_checkpoint_submodule_class(self) -> Callable: FILE: corenet/modeling/models/detection/ssd.py class SingleShotMaskDetector (line 29) | class SingleShotMaskDetector(BaseDetection): method __init__ (line 40) | def __init__(self, opts, encoder: BaseImageEncoder) -> None: method add_arguments (line 186) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset_layers (line 287) | def reset_layers(module) -> None: method process_anchors_ar (line 293) | def process_anchors_ar(anchor_ar: List) -> List: method get_backbone_features (line 302) | def get_backbone_features(self, x: Tensor) -> Dict[str, Tensor]: method ssd_forward (line 326) | def ssd_forward( method forward (line 359) | def forward( method predict (line 396) | def predict(self, x: Tensor, *args, **kwargs) -> DetectionPredTuple: method postprocess_detections (line 421) | def postprocess_detections( method dummy_input_and_label (line 489) | def dummy_input_and_label(self, batch_size: int) -> Dict: FILE: corenet/modeling/models/detection/utils/rcnn_utils.py class FastRCNNConvFCHead (line 22) | class FastRCNNConvFCHead(nn.Sequential): method __init__ (line 23) | def __init__( class RPNHead (line 75) | class RPNHead(nn.Module): method __init__ (line 85) | def __init__(self, opts, in_channels: int, num_anchors: int, conv_dept... method forward (line 131) | def forward(self, x: List[Tensor]) -> Tuple[List[Tensor], List[Tensor]]: class MaskRCNNHeads (line 141) | class MaskRCNNHeads(nn.Sequential): method __init__ (line 142) | def __init__(self, opts, in_channels: int, layers: List, dilation: int): class MaskRCNNPredictor (line 181) | class MaskRCNNPredictor(nn.Sequential): method __init__ (line 182) | def __init__( class FastRCNNPredictor (line 220) | class FastRCNNPredictor(nn.Module): method __init__ (line 230) | def __init__(self, in_channels: int, num_classes: int) -> None: method forward (line 239) | def forward(self, x: Tensor) -> Tuple[Tensor, Tensor]: function replace_syncbn_with_syncbnfp32 (line 252) | def replace_syncbn_with_syncbnfp32(opts, num_features: int) -> nn.Module: FILE: corenet/modeling/models/fsdp_wrapper.py class FullyShardedDataParallelWrapper (line 55) | class FullyShardedDataParallelWrapper(FullyShardedDataParallel): method __init__ (line 56) | def __init__( method add_arguments (line 131) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... function get_fsdp_model_optimizer_state_dict_on_rank0 (line 194) | def get_fsdp_model_optimizer_state_dict_on_rank0( FILE: corenet/modeling/models/language_modeling/base_lm.py class BaseLanguageModel (line 16) | class BaseLanguageModel(BaseAnyNNModel): method add_arguments (line 24) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method dummy_input_and_label (line 44) | def dummy_input_and_label(self, batch_size: int) -> Dict[str, Tensor]: method build_model (line 59) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... FILE: corenet/modeling/models/language_modeling/general_gpt.py function compute_heads (line 32) | def compute_heads(model_dim: int, head_dim: int) -> int: class GPTConfig (line 52) | class GPTConfig: method __post_init__ (line 83) | def __post_init__(self) -> None: method from_name (line 163) | def from_name( class MultiHeadCausalAttention (line 248) | class MultiHeadCausalAttention(nn.Module): method __init__ (line 257) | def __init__( method extra_repr (line 312) | def extra_repr(self) -> str: method forward (line 318) | def forward( class FeedForwardNetwork (line 437) | class FeedForwardNetwork(nn.Module): method __init__ (line 446) | def __init__( method extra_repr (line 488) | def extra_repr(self) -> str: method forward (line 491) | def forward(self, x: Tensor) -> Tensor: class TransformerDecoderLayer (line 509) | class TransformerDecoderLayer(nn.Module): method __init__ (line 518) | def __init__( method forward (line 539) | def forward( class GeneralGPTModel (line 584) | class GeneralGPTModel(BaseLanguageModel): method __init__ (line 593) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 655) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward (line 686) | def forward( method get_fsdp_wrap_policy (line 815) | def get_fsdp_wrap_policy( method get_activation_checkpoint_submodule_class (line 825) | def get_activation_checkpoint_submodule_class(self) -> Callable: method reset_parameters (line 829) | def reset_parameters(self, model_config: GPTConfig) -> None: method head_dim_at_layer (line 861) | def head_dim_at_layer(self, i: int) -> int: method k_dim_at_layer (line 864) | def k_dim_at_layer(self, i: int) -> int: method v_dim_at_layer (line 867) | def v_dim_at_layer(self, i: int) -> int: method k_num_heads_at_layer (line 870) | def k_num_heads_at_layer(self, i: int) -> int: method v_num_heads_at_layer (line 873) | def v_num_heads_at_layer(self, i: int) -> int: FILE: corenet/modeling/models/language_modeling/kv_prediction.py class LayerPrunedGPTConfig (line 32) | class LayerPrunedGPTConfig(general_gpt.GPTConfig): method __post_init__ (line 35) | def __post_init__(self) -> None: method from_name (line 46) | def from_name( class LayerPrunedGeneralGPTModel (line 206) | class LayerPrunedGeneralGPTModel(general_gpt.GeneralGPTModel): class AuxLayerToBaseLayer (line 216) | class AuxLayerToBaseLayer(nn.Module): method __init__ (line 230) | def __init__(self, auxkv_num_layers_to_basekv_num_layers: List[int]) -... method forward (line 236) | def forward( class LinearAuxKVToBaseKV (line 253) | class LinearAuxKVToBaseKV(nn.Module): method __init__ (line 273) | def __init__( method forward (line 301) | def forward( method set_as_identity (line 347) | def set_as_identity(self) -> None: class KVPredicter (line 359) | class KVPredicter(nn.Module): method __init__ (line 382) | def __init__( method base_layers (line 406) | def base_layers(self) -> int: method auxiliary_layers (line 410) | def auxiliary_layers(self) -> int: method build_kv_cache_predicters (line 413) | def build_kv_cache_predicters(self) -> None: method forward (line 447) | def forward( function get_overrided_opts (line 477) | def get_overrided_opts( class KVPredictionLLM (line 498) | class KVPredictionLLM(BaseLanguageModel): method __init__ (line 505) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 562) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method predict_kv_cache (line 584) | def predict_kv_cache(self, auxiliary_outputs: Dict[str, Any]) -> List[... method forward (line 610) | def forward( method merge_outputs (line 821) | def merge_outputs(self, aux_logits: Tensor, base_logits: Tensor) -> Te... method get_fsdp_wrap_policy (line 833) | def get_fsdp_wrap_policy( method get_activation_checkpoint_submodule_class (line 839) | def get_activation_checkpoint_submodule_class(self) -> Callable: FILE: corenet/modeling/models/multi_modal_img_text/base_multi_modal_img_text.py class BaseMultiModalImageText (line 12) | class BaseMultiModalImageText(BaseAnyNNModel): method __init__ (line 19) | def __init__(self, opts, *args, **kwargs) -> None: method add_arguments (line 29) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/modeling/models/multi_modal_img_text/clip.py class CLIP (line 28) | class CLIP(BaseMultiModalImageText): method __init__ (line 39) | def __init__( method add_arguments (line 56) | def add_arguments(cls, parser: argparse.ArgumentParser): method reset_parameters (line 68) | def reset_parameters(self) -> None: method get_trainable_parameters (line 75) | def get_trainable_parameters( method dummy_input_and_label (line 135) | def dummy_input_and_label( method _exponentiate_and_clip_logits (line 168) | def _exponentiate_and_clip_logits(self, max_scale: float = 100.0) -> T... method _reset_cached_text_features (line 181) | def _reset_cached_text_features(self, mode_str: str) -> None: method train (line 194) | def train(self, mode: bool = True): method forward (line 207) | def forward(self, input: Dict[str, Optional[Tensor]]) -> Dict[str, Ten... method build_model (line 300) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... method get_activation_checkpoint_submodule_class (line 341) | def get_activation_checkpoint_submodule_class( function update_image_classifier (line 362) | def update_image_classifier( FILE: corenet/modeling/models/segmentation/base_seg.py class BaseSegmentation (line 16) | class BaseSegmentation(BaseAnyNNModel): method __init__ (line 24) | def __init__(self, opts, encoder: BaseImageEncoder, *args, **kwargs) -... method add_arguments (line 35) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method maybe_seg_norm_layer (line 150) | def maybe_seg_norm_layer(self): method set_default_norm_layer (line 156) | def set_default_norm_layer(self): method dummy_input_and_label (line 159) | def dummy_input_and_label(self, batch_size: int) -> Dict: method update_classifier (line 175) | def update_classifier(self, opts, n_classes: int) -> None: method set_model_specific_opts_before_model_building (line 180) | def set_model_specific_opts_before_model_building( function set_model_specific_opts_before_model_building (line 214) | def set_model_specific_opts_before_model_building( function unset_model_specific_opts_after_model_building (line 253) | def unset_model_specific_opts_after_model_building( FILE: corenet/modeling/models/segmentation/enc_dec.py class SegEncoderDecoder (line 21) | class SegEncoderDecoder(BaseSegmentation): method __init__ (line 31) | def __init__( method get_trainable_parameters (line 47) | def get_trainable_parameters( method forward (line 95) | def forward( method update_classifier (line 113) | def update_classifier(self, opts, n_classes: int) -> None: method build_model (line 121) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... FILE: corenet/modeling/models/segmentation/heads/base_seg_head.py class BaseSegHead (line 19) | class BaseSegHead(BaseAnyNNModel): method __init__ (line 24) | def __init__( method forward_aux_head (line 93) | def forward_aux_head(self, enc_out: Dict) -> Tensor: method forward_seg_head (line 97) | def forward_seg_head(self, enc_out: Dict) -> Tensor: method forward (line 100) | def forward(self, enc_out: Dict, *args, **kwargs) -> Union[Tensor, Tup... method reset_head_parameters (line 117) | def reset_head_parameters(self, opts) -> None: method add_arguments (line 122) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_trainable_parameters (line 137) | def get_trainable_parameters( method update_classifier (line 153) | def update_classifier(self, opts, n_classes: int) -> None: method build_model (line 160) | def build_model(cls, opts: argparse.Namespace, *args, **kwargs) -> Bas... function _check_out_channels (line 164) | def _check_out_channels(config: dict, layer_name: str) -> int: FILE: corenet/modeling/models/segmentation/heads/deeplabv3.py class DeeplabV3 (line 22) | class DeeplabV3(BaseSegHead): method __init__ (line 51) | def __init__( method add_arguments (line 101) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward_seg_head (line 135) | def forward_seg_head(self, enc_out: Dict) -> Tensor: class MultiScaleDeeplabV3 (line 156) | class MultiScaleDeeplabV3(DeeplabV3): method __init__ (line 187) | def __init__(self, opts, enc_conf: Dict, *args, **kwargs) -> None: method add_arguments (line 247) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward_seg_head (line 267) | def forward_seg_head(self, enc_out: Dict) -> Tensor: FILE: corenet/modeling/models/segmentation/heads/pspnet.py class PSPNet (line 19) | class PSPNet(BaseSegHead): method __init__ (line 28) | def __init__( method update_classifier (line 63) | def update_classifier(self, opts, n_classes: int) -> None: method add_arguments (line 83) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward_seg_head (line 106) | def forward_seg_head(self, enc_out: Dict) -> Tensor: FILE: corenet/modeling/models/segmentation/heads/simple_seg_head.py class SimpleSegHead (line 17) | class SimpleSegHead(BaseSegHead): method __init__ (line 27) | def __init__( method add_arguments (line 51) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward_seg_head (line 54) | def forward_seg_head(self, enc_out: Dict) -> Tensor: FILE: corenet/modeling/models/video_classification/base_video_encoder.py class BaseVideoEncoder (line 14) | class BaseVideoEncoder(BaseAnyNNModel): method __init__ (line 21) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 30) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method reset_module_parameters (line 101) | def reset_module_parameters(opts, module) -> None: FILE: corenet/modeling/modules/aspp_block.py class ASPP (line 24) | class ASPP(BaseModule): method __init__ (line 41) | def __init__( method forward (line 110) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 119) | def __repr__(self): class ASPPConv2d (line 130) | class ASPPConv2d(ConvLayer2d): method __init__ (line 144) | def __init__( method adjust_atrous_rate (line 158) | def adjust_atrous_rate(self, rate: int) -> None: class ASPPSeparableConv2d (line 166) | class ASPPSeparableConv2d(SeparableConv2d): method __init__ (line 180) | def __init__( method adjust_atrous_rate (line 194) | def adjust_atrous_rate(self, rate: int) -> None: class ASPPPooling (line 202) | class ASPPPooling(BaseLayer): method __init__ (line 215) | def __init__( method forward (line 239) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 245) | def __repr__(self): FILE: corenet/modeling/modules/base_module.py class BaseModule (line 12) | class BaseModule(nn.Module): method __init__ (line 15) | def __init__(self, *args, **kwargs): method forward (line 18) | def forward(self, x: Any, *args, **kwargs) -> Any: method __repr__ (line 21) | def __repr__(self): FILE: corenet/modeling/modules/efficientnet.py class EfficientNetBlock (line 12) | class EfficientNetBlock(InvertedResidualSE): method __init__ (line 27) | def __init__(self, stochastic_depth_prob: float, *args, **kwargs) -> N... method forward (line 31) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 40) | def __repr__(self) -> str: FILE: corenet/modeling/modules/fastvit.py function convolutional_stem (line 17) | def convolutional_stem( class PatchEmbed (line 72) | class PatchEmbed(BaseModule): method __init__ (line 84) | def __init__( method forward (line 124) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: class RepMixer (line 139) | class RepMixer(BaseModule): method __init__ (line 155) | def __init__( method forward (line 205) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: method reparameterize (line 226) | def reparameterize(self) -> None: class ConvFFN (line 267) | class ConvFFN(BaseModule): method __init__ (line 279) | def __init__( method forward (line 314) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: class RepMixerBlock (line 332) | class RepMixerBlock(BaseModule): method __init__ (line 350) | def __init__( method forward (line 390) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: class AttentionBlock (line 409) | class AttentionBlock(BaseModule): method __init__ (line 425) | def __init__( method _apply_mhsa (line 464) | def _apply_mhsa(self, x: torch.Tensor) -> torch.Tensor: method forward (line 483) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: class RepCPE (line 502) | class RepCPE(BaseModule): method __init__ (line 516) | def __init__( method forward (line 565) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: method reparameterize (line 583) | def reparameterize(self) -> None: FILE: corenet/modeling/modules/feature_pyramid.py class FeaturePyramidNetwork (line 21) | class FeaturePyramidNetwork(BaseModule): method __init__ (line 33) | def __init__( method reset_weights (line 91) | def reset_weights(self) -> None: method forward (line 99) | def forward(self, x: Dict[str, Tensor], *args, **kwargs) -> Dict[str, ... method __repr__ (line 127) | def __repr__(self): FILE: corenet/modeling/modules/flash_transformer.py class FlashTransformerEncoder (line 24) | class FlashTransformerEncoder(BaseModule): method __init__ (line 51) | def __init__( method forward (line 108) | def forward(self, x: Tensor) -> Tensor: FILE: corenet/modeling/modules/mobilenetv2.py class InvertedResidualSE (line 16) | class InvertedResidualSE(BaseModule): method __init__ (line 39) | def __init__( method forward (line 123) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 127) | def __repr__(self) -> str: class InvertedResidual (line 141) | class InvertedResidual(BaseModule): method __init__ (line 163) | def __init__( method forward (line 231) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 237) | def __repr__(self) -> str: FILE: corenet/modeling/modules/mobileone_block.py class MobileOneBlock (line 17) | class MobileOneBlock(BaseModule): method __init__ (line 25) | def __init__( method forward (line 137) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: method reparameterize (line 171) | def reparameterize(self) -> None: method _get_kernel_bias (line 207) | def _get_kernel_bias(self) -> Tuple[torch.Tensor, torch.Tensor]: method _fuse_branch_ops (line 243) | def _fuse_branch_ops( method _fuse_conv_bn (line 277) | def _fuse_conv_bn( class RepLKBlock (line 304) | class RepLKBlock(BaseModule): method __init__ (line 322) | def __init__( method forward (line 390) | def forward(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: method _get_kernel_bias (line 411) | def _get_kernel_bias(self) -> Tuple[torch.Tensor, torch.Tensor]: method reparameterize (line 433) | def reparameterize(self) -> None: FILE: corenet/modeling/modules/mobilevit_block.py class MobileViTBlock (line 19) | class MobileViTBlock(BaseModule): method __init__ (line 41) | def __init__( method __repr__ (line 150) | def __repr__(self) -> str: method unfolding (line 186) | def unfolding(self, feature_map: Tensor) -> Tuple[Tensor, Dict]: method folding (line 233) | def folding(self, patches: Tensor, info_dict: Dict) -> Tensor: method forward_spatial (line 269) | def forward_spatial(self, x: Tensor) -> Tensor: method forward_temporal (line 290) | def forward_temporal( method forward (line 316) | def forward( class MobileViTBlockv2 (line 329) | class MobileViTBlockv2(BaseModule): method __init__ (line 349) | def __init__( method _compute_unfolding_weights (line 438) | def _compute_unfolding_weights(self) -> Tensor: method _build_attn_layer (line 449) | def _build_attn_layer( method __repr__ (line 497) | def __repr__(self) -> str: method unfolding_pytorch (line 526) | def unfolding_pytorch(self, feature_map: Tensor) -> Tuple[Tensor, Tupl... method folding_pytorch (line 542) | def folding_pytorch(self, patches: Tensor, output_size: Tuple[int, int... method unfolding_coreml (line 557) | def unfolding_coreml(self, feature_map: Tensor) -> Tuple[Tensor, Tuple... method folding_coreml (line 578) | def folding_coreml(self, patches: Tensor, output_size: Tuple[int, int]... method resize_input_if_needed (line 595) | def resize_input_if_needed(self, x): method forward_spatial (line 605) | def forward_spatial(self, x: Tensor, *args, **kwargs) -> Tensor: method forward_temporal (line 628) | def forward_temporal( method forward (line 657) | def forward( FILE: corenet/modeling/modules/pspnet_module.py class PSP (line 17) | class PSP(BaseModule): method __init__ (line 29) | def __init__( method _make_psp_layer (line 78) | def _make_psp_layer( method forward (line 94) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 106) | def __repr__(self): FILE: corenet/modeling/modules/regnet_modules.py class XRegNetBlock (line 16) | class XRegNetBlock(BaseModule): method __init__ (line 34) | def __init__( method forward (line 131) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 151) | def __repr__(self) -> str: class AnyRegNetStage (line 164) | class AnyRegNetStage(BaseModule): method __init__ (line 185) | def __init__( method forward (line 227) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 242) | def __repr__(self) -> str: FILE: corenet/modeling/modules/resnet_modules.py class BasicResNetBlock (line 16) | class BasicResNetBlock(BaseModule): method __init__ (line 39) | def __init__( method forward (line 129) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 137) | def __repr__(self) -> str: class BottleneckResNetBlock (line 150) | class BottleneckResNetBlock(BaseModule): method __init__ (line 172) | def __init__( method forward (line 279) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 287) | def __repr__(self) -> str: FILE: corenet/modeling/modules/squeeze_excitation.py class SqueezeExcitation (line 17) | class SqueezeExcitation(BaseModule): method __init__ (line 33) | def __init__( method forward (line 80) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 83) | def __repr__(self) -> str: FILE: corenet/modeling/modules/ssd_heads.py class SSDHead (line 17) | class SSDHead(BaseModule): method __init__ (line 34) | def __init__( method __repr__ (line 91) | def __repr__(self) -> str: method reset_parameters (line 107) | def reset_parameters(self) -> None: method _sample_fm (line 112) | def _sample_fm(self, x: Tensor) -> Tensor: method forward (line 135) | def forward(self, x: Tensor, *args, **kwargs) -> Tuple[Tensor, Tensor]: class SSDInstanceHead (line 159) | class SSDInstanceHead(BaseModule): method __init__ (line 164) | def __init__( method __repr__ (line 224) | def __repr__(self) -> str: method reset_parameters (line 232) | def reset_parameters(self) -> None: method forward (line 237) | def forward(self, x: Tensor, boxes: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/modules/swin_transformer_block.py function _patch_merging_pad (line 26) | def _patch_merging_pad(x): class Permute (line 32) | class Permute(BaseModule): method __init__ (line 38) | def __init__(self, dims: List[int]): method forward (line 42) | def forward(self, x: Tensor) -> Tensor: method __repr__ (line 45) | def __repr__(self) -> str: class PatchMerging (line 50) | class PatchMerging(BaseModule): method __init__ (line 58) | def __init__(self, opts, dim: int, norm_layer: str, strided: Optional[... method forward (line 69) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: method __repr__ (line 91) | def __repr__(self) -> str: function shifted_window_attention (line 96) | def shifted_window_attention( class ShiftedWindowAttention (line 234) | class ShiftedWindowAttention(BaseModule): method __init__ (line 239) | def __init__( method __repr__ (line 290) | def __repr__(self) -> str: method forward (line 301) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: class SwinTransformerBlock (line 331) | class SwinTransformerBlock(BaseModule): method __init__ (line 347) | def __init__( method __repr__ (line 400) | def __repr__(self) -> str: method forward (line 412) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/modules/transformer.py class TransformerEncoder (line 26) | class TransformerEncoder(BaseModule): method __init__ (line 46) | def __init__( method __repr__ (line 116) | def __repr__(self) -> str: method forward (line 129) | def forward( class LinearAttnFFN (line 159) | class LinearAttnFFN(BaseModule): method __init__ (line 177) | def __init__( method __repr__ (line 237) | def __repr__(self) -> str: method forward (line 248) | def forward( FILE: corenet/modeling/modules/windowed_transformer.py function window_partition (line 16) | def window_partition(t: torch.Tensor, window_size: int) -> torch.Tensor: function window_partition_reverse (line 41) | def window_partition_reverse( function get_windows_shift_mask (line 61) | def get_windows_shift_mask( function window_x_and_key_padding_mask (line 90) | def window_x_and_key_padding_mask( function unwindow_x (line 135) | def unwindow_x(x_windows: torch.Tensor, B: int, N: int, C: int, window_s... class WindowedTransformerEncoder (line 162) | class WindowedTransformerEncoder(transformer.TransformerEncoder): method __init__ (line 190) | def __init__( method forward (line 224) | def forward( method __repr__ (line 270) | def __repr__(self) -> str: FILE: corenet/modeling/neural_augmentor/__init__.py function arguments_neural_augmentor (line 13) | def arguments_neural_augmentor( FILE: corenet/modeling/neural_augmentor/neural_aug.py class BaseNeuralAugmentor (line 27) | class BaseNeuralAugmentor(nn.Module): method __init__ (line 32) | def __init__(self, opts, *args, **kwargs): method _is_valid_aug_fn_list (line 48) | def _is_valid_aug_fn_list(self, aug_fns): method get_trainable_parameters (line 57) | def get_trainable_parameters( method __repr__ (line 72) | def __repr__(self): method add_arguments (line 101) | def add_arguments(cls, parser: argparse.ArgumentParser): method _build_aug_fns (line 141) | def _build_aug_fns(self, opts) -> List: method _apply_brightness (line 144) | def _apply_brightness(self, x: Tensor, *args, **kwargs) -> Tensor: method _apply_contrast (line 161) | def _apply_contrast(self, x: Tensor, *args, **kwargs) -> Tensor: method _apply_noise (line 179) | def _apply_noise(self, x: Tensor, *args, **kwargs) -> Tensor: method forward (line 194) | def forward(self, x: Tensor, *args, **kwargs) -> Tensor: class BasicNeuralAugmentor (line 219) | class BasicNeuralAugmentor(BaseNeuralAugmentor): method __init__ (line 227) | def __init__(self, opts, *args, **kwargs) -> None: method _build_aug_fns (line 235) | def _build_aug_fns(self, opts) -> List: class DistributionNeuralAugmentor (line 256) | class DistributionNeuralAugmentor(BaseNeuralAugmentor): method __init__ (line 264) | def __init__(self, opts, *args, **kwargs) -> None: method _build_aug_fns_with_uniform_dist (line 271) | def _build_aug_fns_with_uniform_dist(self, opts) -> List: function build_neural_augmentor (line 304) | def build_neural_augmentor(opts, *args, **kwargs): FILE: corenet/modeling/neural_augmentor/utils/neural_aug_utils.py class Clip (line 12) | class Clip(nn.Module): method __init__ (line 13) | def __init__( method forward (line 26) | def forward(self, x: Any) -> Any: method __repr__ (line 33) | def __repr__(self): class Identity (line 42) | class Identity(nn.Module): method __init__ (line 43) | def __init__(self, *args, **kwargs): method forward (line 46) | def forward(self, x: Any) -> Any: class FixedSampler (line 50) | class FixedSampler(nn.Module): method __init__ (line 51) | def __init__( method forward (line 62) | def forward( method __repr__ (line 68) | def __repr__(self): class UniformSampler (line 75) | class UniformSampler(nn.Module): method __init__ (line 76) | def __init__( method forward (line 91) | def forward( method high (line 99) | def high(self): method low (line 103) | def low(self): method __repr__ (line 106) | def __repr__(self): function random_noise (line 114) | def random_noise(x: Tensor, variance: Tensor, *args, **kwargs) -> Tensor: function random_contrast (line 121) | def random_contrast(x: Tensor, magnitude: Tensor, *args, **kwargs) -> Te... function random_brightness (line 131) | def random_brightness(x: Tensor, magnitude: Tensor, *args, **kwargs) -> ... function identity (line 139) | def identity(x: Tensor, *args, **kwargs) -> Tensor: FILE: corenet/modeling/text_encoders/__init__.py function arguments_text_encoder (line 20) | def arguments_text_encoder(parser: argparse.ArgumentParser) -> argparse.... function build_text_encoder (line 30) | def build_text_encoder(opts, projection_dim: int, *args, **kwargs) -> Ba... FILE: corenet/modeling/text_encoders/base_text_encoder.py class BaseTextEncoder (line 18) | class BaseTextEncoder(nn.Module): method __init__ (line 21) | def __init__(self, opts, projection_dim: int, *args, **kwargs) -> None: method vocab_size (line 29) | def vocab_size(self): method context_length (line 37) | def context_length(self): method add_arguments (line 45) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method padding_index (line 79) | def padding_index(self) -> int: method reset_parameters (line 87) | def reset_parameters(self): method get_trainable_parameters (line 91) | def get_trainable_parameters( method freeze_norm_layers (line 108) | def freeze_norm_layers(self) -> None: method forward (line 116) | def forward( method dummy_input_and_label (line 126) | def dummy_input_and_label(self, batch_size: int) -> Dict: method get_activation_checkpoint_submodule_class (line 137) | def get_activation_checkpoint_submodule_class(self) -> Callable: FILE: corenet/modeling/text_encoders/transformer.py class TextTransformer (line 25) | class TextTransformer(BaseTextEncoder): method __init__ (line 33) | def __init__(self, opts, projection_dim: int, *args, **kwargs) -> None: method build_causal_attention_mask (line 159) | def build_causal_attention_mask( method reset_parameters_clip_style (line 194) | def reset_parameters_clip_style(self) -> None: method add_arguments (line 222) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method forward_embedding (line 326) | def forward_embedding(self, text_tokens: Tensor) -> Tensor: method encode_text (line 345) | def encode_text( method forward_zero_shot (line 395) | def forward_zero_shot( method forward (line 479) | def forward( method get_activation_checkpoint_submodule_class (line 543) | def get_activation_checkpoint_submodule_class(self) -> Callable: FILE: corenet/optims/__init__.py function check_trainable_parameters (line 24) | def check_trainable_parameters( function remove_param_name_key (line 86) | def remove_param_name_key(model_params: List) -> None: function build_optimizer (line 115) | def build_optimizer(model: torch.nn.Module, opts, *args, **kwargs) -> Ba... function arguments_optimizer (line 150) | def arguments_optimizer(parser: argparse.ArgumentParser) -> argparse.Arg... FILE: corenet/optims/adam.py class AdamOptimizer (line 17) | class AdamOptimizer(BaseOptim, Adam): method __init__ (line 26) | def __init__( method add_arguments (line 49) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/optims/adamw.py class AdamWOptimizer (line 17) | class AdamWOptimizer(BaseOptim, AdamW): method __init__ (line 26) | def __init__( method add_arguments (line 49) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/optims/base_optim.py class BaseOptim (line 11) | class BaseOptim(object): method __init__ (line 18) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method add_arguments (line 24) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method __repr__ (line 64) | def __repr__(self) -> str: FILE: corenet/optims/scheduler/__init__.py function build_scheduler (line 20) | def build_scheduler(opts: argparse.Namespace, *args, **kwargs) -> BaseLR... function general_lr_sch_args (line 33) | def general_lr_sch_args(parser: argparse.ArgumentParser) -> argparse.Arg... function arguments_scheduler (line 78) | def arguments_scheduler(parser: argparse.ArgumentParser) -> argparse.Arg... FILE: corenet/optims/scheduler/base_scheduler.py class BaseLRScheduler (line 11) | class BaseLRScheduler(object): method __init__ (line 12) | def __init__(self, opts) -> None: method add_arguments (line 34) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_lr (line 37) | def get_lr(self, epoch: int, curr_iter: int): method update_lr (line 40) | def update_lr(self, optimizer, epoch: int, curr_iter: int): method retrieve_lr (line 55) | def retrieve_lr(optimizer) -> list: method extra_repr (line 61) | def extra_repr(self) -> str: method __repr__ (line 66) | def __repr__(self) -> str: FILE: corenet/optims/scheduler/cosine.py class CosineScheduler (line 14) | class CosineScheduler(BaseLRScheduler): method __init__ (line 19) | def __init__(self, opts, **kwargs) -> None: method add_arguments (line 42) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_lr (line 61) | def get_lr(self, epoch: int, curr_iter: int) -> float: method __repr__ (line 82) | def __repr__(self) -> str: FILE: corenet/optims/scheduler/cyclic.py class CyclicLRScheduler (line 19) | class CyclicLRScheduler(BaseLRScheduler): method __init__ (line 24) | def __init__(self, opts, **kwargs) -> None: method _lr_per_cycle (line 77) | def _lr_per_cycle(self) -> None: method add_arguments (line 85) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_lr (line 135) | def get_lr(self, epoch: int, curr_iter: int) -> float: method __repr__ (line 162) | def __repr__(self): FILE: corenet/optims/scheduler/fixed.py class FixedLRScheduler (line 13) | class FixedLRScheduler(BaseLRScheduler): method __init__ (line 18) | def __init__(self, opts, **kwargs) -> None: method add_arguments (line 41) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_lr (line 52) | def get_lr(self, epoch: int, curr_iter: int) -> float: method __repr__ (line 59) | def __repr__(self) -> str: FILE: corenet/optims/scheduler/multi_step.py class MultiStepLRScheduler (line 13) | class MultiStepLRScheduler(BaseLRScheduler): method __init__ (line 18) | def __init__(self, opts, **kwargs) -> None: method add_arguments (line 50) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_lr (line 74) | def get_lr(self, epoch: int, curr_iter: int) -> float: method __repr__ (line 83) | def __repr__(self) -> str: FILE: corenet/optims/scheduler/polynomial.py class PolynomialScheduler (line 13) | class PolynomialScheduler(BaseLRScheduler): method __init__ (line 18) | def __init__(self, opts, **kwargs) -> None: method add_arguments (line 39) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method get_lr (line 65) | def get_lr(self, epoch: int, curr_iter: int) -> float: method __repr__ (line 81) | def __repr__(self) -> str: FILE: corenet/optims/sgd.py class SGDOptimizer (line 17) | class SGDOptimizer(BaseOptim, SGD): method __init__ (line 26) | def __init__( method add_arguments (line 47) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... FILE: corenet/options/errors.py class UnrecognizedYamlConfigEntry (line 9) | class UnrecognizedYamlConfigEntry(Warning): method __init__ (line 11) | def __init__(self, key: str) -> None: FILE: corenet/options/opts.py class ParseKwargs (line 29) | class ParseKwargs(argparse.Action): method __call__ (line 30) | def __call__(self, parser, namespace, values, option_string=None): function arguments_common (line 77) | def arguments_common(parser: argparse.ArgumentParser) -> argparse.Argume... function arguments_ddp (line 255) | def arguments_ddp(parser: argparse.ArgumentParser) -> argparse.ArgumentP... function arguments_train_eval_pipeline (line 302) | def arguments_train_eval_pipeline( function arguments_lm_eval (line 318) | def arguments_lm_eval(parser: argparse.ArgumentParser) -> argparse.Argum... function parser_to_opts (line 389) | def parser_to_opts(parser: argparse.ArgumentParser, args: Optional[List[... function get_training_arguments (line 396) | def get_training_arguments( function get_lm_eval_arguments (line 475) | def get_lm_eval_arguments( function get_conversion_arguments (line 490) | def get_conversion_arguments(args: Optional[List[str]] = None): function get_benchmarking_arguments (line 540) | def get_benchmarking_arguments(args: Optional[List[str]] = None): FILE: corenet/options/parse_args.py function parse_validation_metric_names (line 10) | def parse_validation_metric_names(opts): class JsonValidator (line 48) | class JsonValidator: method __init__ (line 49) | def __init__(self, expected_type: type): method _validate_and_cast (line 64) | def _validate_and_cast(cls, json_value: Any, expected_type: Any): method __call__ (line 114) | def __call__(self, str_value: str) -> Any: method __repr__ (line 121) | def __repr__(self): FILE: corenet/options/utils.py function flatten_yaml_as_dict (line 38) | def flatten_yaml_as_dict(d, parent_key="", sep="."): function load_config_file (line 49) | def load_config_file(opts): function extend_selected_args_with_prefix (line 107) | def extend_selected_args_with_prefix( function extract_opts_with_prefix_replacement (line 157) | def extract_opts_with_prefix_replacement( FILE: corenet/third_party/data/text_tokenizer/openai_clip_tokenizer.py function bytes_to_unicode (line 21) | def bytes_to_unicode() -> Dict[int, str]: function get_pairs (line 47) | def get_pairs(word: Tuple[str, ...]) -> Set[Tuple[str, str]]: class OpenAIClipTokenizer (line 60) | class OpenAIClipTokenizer(BaseTextTokenizer): method __init__ (line 84) | def __init__(self, opts: argparse.Namespace) -> None: method add_arguments (line 133) | def add_arguments(cls, parser: argparse.ArgumentParser) -> argparse.Ar... method vocab_size (line 149) | def vocab_size(self) -> int: method eot_token (line 154) | def eot_token(self) -> str: method eot_token_id (line 159) | def eot_token_id(self) -> int: method sot_token (line 164) | def sot_token(self) -> str: method sot_token_id (line 169) | def sot_token_id(self) -> int: method pad_token_id (line 174) | def pad_token_id(self) -> int: method _bpe (line 178) | def _bpe(self, token: str) -> str: method tok_encode (line 227) | def tok_encode(self, input_sentence: str) -> Tensor: method tok_decode (line 254) | def tok_decode(self, token_ids: Union[List[int], Tensor]) -> str: FILE: corenet/third_party/modeling/lora.py function check_adapters_to_merge (line 27) | def check_adapters_to_merge( class BaseTunerLayer (line 61) | class BaseTunerLayer(ABC): method get_base_layer (line 88) | def get_base_layer(self) -> nn.Module: method weight (line 103) | def weight(self) -> torch.Tensor: method bias (line 113) | def bias(self) -> torch.Tensor: method merge (line 122) | def merge( method unmerge (line 137) | def unmerge(self) -> None: method merged (line 144) | def merged(self) -> bool: method disable_adapters (line 154) | def disable_adapters(self) -> bool: method active_adapter (line 166) | def active_adapter(self) -> Union[List[str], str]: method active_adapters (line 178) | def active_adapters(self) -> List[str]: method enable_adapters (line 190) | def enable_adapters(self, enabled: bool) -> None: method set_adapter (line 208) | def set_adapter(self, adapter_names: Union[str, List[str]]) -> None: method _all_available_adapter_names (line 239) | def _all_available_adapter_names(self) -> List[str]: method delete_adapter (line 255) | def delete_adapter(self, adapter_name: str) -> None: class LoraLayer (line 293) | class LoraLayer(BaseTunerLayer): method __init__ (line 309) | def __init__(self, base_layer: nn.Module) -> None: method update_layer (line 342) | def update_layer( method reset_lora_parameters (line 365) | def reset_lora_parameters( method _get_weight_norm (line 395) | def _get_weight_norm( method dora_init (line 419) | def dora_init(self, adapter_name: str) -> None: method _cache_store (line 446) | def _cache_store(self, key: str, value: Any) -> None: method _cache_pop (line 456) | def _cache_pop(self, key: str) -> Any: method _apply_dora (line 469) | def _apply_dora( method set_scale (line 515) | def set_scale(self, adapter: str, scale: float) -> None: method scale_layer (line 529) | def scale_layer(self, scale: float) -> None: method unscale_layer (line 543) | def unscale_layer(self, scale: float = None) -> None: method _check_forward_args (line 561) | def _check_forward_args( method _mixed_batch_forward (line 595) | def _mixed_batch_forward( class Linear (line 642) | class Linear(nn.Module, LoraLayer): method __init__ (line 658) | def __init__( method update_layer (line 683) | def update_layer( method merge (line 740) | def merge( method unmerge (line 815) | def unmerge(self) -> None: method get_delta_weight (line 837) | def get_delta_weight(self, adapter: str) -> torch.Tensor: method forward (line 875) | def forward( method __repr__ (line 923) | def __repr__(self) -> str: class Embedding (line 934) | class Embedding(nn.Module, LoraLayer): method __init__ (line 950) | def __init__( method update_layer (line 979) | def update_layer( method merge (line 1034) | def merge( method unmerge (line 1074) | def unmerge(self) -> None: method get_delta_weight (line 1088) | def get_delta_weight(self, adapter: str) -> torch.Tensor: method _mixed_batch_forward (line 1126) | def _mixed_batch_forward( method _embed (line 1172) | def _embed(self, input: torch.Tensor, weight: torch.Tensor) -> torch.T... method forward (line 1193) | def forward( method __repr__ (line 1234) | def __repr__(self) -> str: class LoRAParams (line 1246) | class LoRAParams: method from_json (line 1270) | def from_json(cls, config: Dict[str, Any]) -> LayerConfig: method to_json (line 1282) | def to_json(self) -> Dict[str, Any]: class LayerConfig (line 1293) | class LayerConfig: method from_json (line 1309) | def from_json(cls, config: Dict[str, Any]) -> LayerConfig: class LoRAConfig (line 1327) | class LoRAConfig: method from_json (line 1338) | def from_json(cls, config: Dict[str, Any]) -> LoRAConfig: function make_lora_layer (line 1355) | def make_lora_layer(module: nn.Module, layer_config: LoRAConfig) -> Lora... function get_module_to_parents (line 1371) | def get_module_to_parents( function add_lora_layers (line 1395) | def add_lora_layers(model: nn.Module, lora_config: Dict[str, Any]) -> None: FILE: corenet/third_party/modeling/ssd_utils.py function assign_priors (line 22) | def assign_priors( function box_iou (line 70) | def box_iou( function hard_negative_mining (line 105) | def hard_negative_mining( FILE: corenet/train_eval_pipelines/base.py function Callback (line 14) | def Callback(Protocol): class BaseTrainEvalPipeline (line 18) | class BaseTrainEvalPipeline: method __init__ (line 19) | def __init__( method __init_subclass__ (line 38) | def __init_subclass__(cls) -> None: method __getstate__ (line 50) | def __getstate__(self) -> argparse.Namespace: method __setstate__ (line 53) | def __setstate__(self, opts: argparse.Namespace) -> None: method evaluation_engine (line 57) | def evaluation_engine(self) -> Evaluator: method training_engine (line 62) | def training_engine(self) -> DefaultTrainer: method launcher (line 67) | def launcher(self) -> Callable[[Callback], None]: FILE: corenet/train_eval_pipelines/default_train_eval.py class DefaultTrainEvalPipeline (line 48) | class DefaultTrainEvalPipeline(BaseTrainEvalPipeline): method is_master_node (line 64) | def is_master_node(self) -> bool: method device (line 76) | def device(self) -> torch.device: method _train_val_loader_sampler (line 80) | def _train_val_loader_sampler( method train_val_loader (line 90) | def train_val_loader(self) -> Tuple[CoreNetDataLoader, CoreNetDataLoad... method train_sampler (line 98) | def train_sampler(self) -> BaseSampler: method test_loader (line 106) | def test_loader(self) -> CoreNetDataLoader: method scheduler (line 111) | def scheduler(self) -> BaseLRScheduler: method _prepare_model (line 140) | def _prepare_model(self) -> Tuple[BaseAnyNNModel, Optional[torch.nn.Mo... method model (line 174) | def model(self) -> torch.nn.Module: method criteria (line 212) | def criteria(self) -> BaseCriteria: method optimizer (line 224) | def optimizer(self) -> BaseOptim: method gradient_scaler (line 236) | def gradient_scaler(self) -> GradScaler: method launcher (line 245) | def launcher(self) -> Callable[[Callback], None]: method model_ema (line 317) | def model_ema(self) -> Optional[EMA]: method training_engine (line 334) | def training_engine(self) -> DefaultTrainer: method evaluation_engine (line 395) | def evaluation_engine(self) -> Evaluator: method _launcher_distributed_spawn_fn (line 405) | def _launcher_distributed_spawn_fn( FILE: corenet/train_eval_pipelines/fsdp_train_eval.py class FSDPTrainEvalPipeline (line 26) | class FSDPTrainEvalPipeline(DefaultTrainEvalPipeline): method gradient_scaler (line 35) | def gradient_scaler(self) -> GradScaler: method model (line 41) | def model(self) -> torch.nn.Module: method training_engine (line 57) | def training_engine(self) -> FSDPTrainer: FILE: corenet/utils/activation_checkpointing_wrapper.py function activation_checkpointing (line 13) | def activation_checkpointing( FILE: corenet/utils/check.py function check (line 12) | def check( FILE: corenet/utils/checkpoint_utils.py function get_model_optimizer_state_dict (line 28) | def get_model_optimizer_state_dict( function load_state_dict (line 52) | def load_state_dict( function average_ckpts (line 73) | def average_ckpts(ckpt_loc_list: List[str]) -> Dict[str, Any]: function avg_and_save_k_checkpoints (line 105) | def avg_and_save_k_checkpoints( function get_training_state (line 169) | def get_training_state( function save_checkpoint (line 221) | def save_checkpoint( function load_checkpoint (line 366) | def load_checkpoint( function load_model_state (line 463) | def load_model_state( FILE: corenet/utils/color_map.py class Colormap (line 11) | class Colormap(object): method __init__ (line 19) | def __init__(self, n: Optional[int] = 256, normalized: Optional[bool] ... method get_bit_at_idx (line 25) | def get_bit_at_idx(val, idx): method get_color_map (line 28) | def get_color_map(self) -> np.ndarray: method get_box_color_codes (line 45) | def get_box_color_codes(self) -> List: method get_color_map_list (line 59) | def get_color_map_list(self) -> List: FILE: corenet/utils/common_utils.py function construct_local_path_from_remote (line 23) | def construct_local_path_from_remote(remote_path: str, local_dir: str) -... function unwrap_model_fn (line 51) | def unwrap_model_fn(model: torch.nn.Module) -> torch.nn.Module: function check_compatibility (line 76) | def check_compatibility() -> None: function check_frozen_norm_layer (line 86) | def check_frozen_norm_layer(model: torch.nn.Module) -> Tuple[bool, int]: function device_setup (line 100) | def device_setup(opts: argparse.Namespace) -> argparse.Namespace: function create_directories (line 157) | def create_directories(dir_path: str, is_master_node: bool) -> None: function move_to_device (line 168) | def move_to_device( function is_coreml_conversion (line 191) | def is_coreml_conversion(opts) -> bool: FILE: corenet/utils/context_managers.py function context_env_vars (line 11) | def context_env_vars(**env: str) -> ContextManager[None]: function context_tensor_threads (line 41) | def context_tensor_threads(num_cpu_threads: int) -> ContextManager[None]: FILE: corenet/utils/ddp_utils.py function is_master (line 17) | def is_master(opts) -> bool: function dist_barrier (line 22) | def dist_barrier(): function dist_monitored_barrier (line 26) | def dist_monitored_barrier( function is_start_rank_node (line 34) | def is_start_rank_node(opts) -> bool: function get_world_size (line 40) | def get_world_size(): function get_node_rank (line 44) | def get_node_rank(): function distributed_init (line 48) | def distributed_init(opts) -> int: function is_rank_0_worker_0 (line 99) | def is_rank_0_worker_0(opts: argparse.Namespace) -> bool: FILE: corenet/utils/dict_utils.py function filter_keys (line 8) | def filter_keys( FILE: corenet/utils/download_utils.py function get_local_path (line 21) | def get_local_path( class DownloadFunc (line 77) | class DownloadFunc(Protocol): method __call__ (line 78) | def __call__( function download_assets_in_parallel (line 91) | def download_assets_in_parallel( FILE: corenet/utils/file_logger.py class FileLogger (line 14) | class FileLogger: method __init__ (line 19) | def __init__(self, fname: str) -> None: method add_scalar (line 43) | def add_scalar( method close (line 62) | def close(self) -> None: FILE: corenet/utils/fpdb.py class _ForkedPdb (line 11) | class _ForkedPdb(pdb.Pdb): method __init__ (line 26) | def __init__(self, lockfile: str) -> None: method interaction (line 30) | def interaction(self, *args, **kwargs) -> None: function set_trace (line 49) | def set_trace(lockfile: str = "/tmp/_corenet_fpdb.lockfile") -> None: FILE: corenet/utils/hf_adapter_utils.py class CorenetToHFPretrainedConfig (line 22) | class CorenetToHFPretrainedConfig(PretrainedConfig): method __init__ (line 35) | def __init__(self, **kwargs: Dict[str, Any]) -> None: class CorenetToHFPretrainedModel (line 39) | class CorenetToHFPretrainedModel(PreTrainedModel): method __init__ (line 55) | def __init__(self, config: CorenetToHFPretrainedConfig, vocab_size: in... method forward (line 67) | def forward( method prepare_inputs_for_generation (line 184) | def prepare_inputs_for_generation( FILE: corenet/utils/import_utils.py function import_modules_from_folder (line 16) | def import_modules_from_folder( function ensure_library_is_available (line 64) | def ensure_library_is_available(module_name: str) -> None: function import_core_modules (line 103) | def import_core_modules(): FILE: corenet/utils/io_utils.py function make_temp_file (line 10) | def make_temp_file( FILE: corenet/utils/logger.py function get_curr_time_stamp (line 25) | def get_curr_time_stamp() -> str: function error (line 29) | def error(message: str) -> None: function color_text (line 53) | def color_text(in_text: str) -> str: function log (line 57) | def log(message: str, end="\n") -> None: function warning (line 65) | def warning(message: Union[str, Warning]) -> None: function ignore_exception_with_warning (line 79) | def ignore_exception_with_warning(message: str) -> None: function info (line 99) | def info(message: str, print_line: Optional[bool] = False) -> None: function debug (line 109) | def debug(message: str) -> None: function double_dash_line (line 120) | def double_dash_line(dashes: Optional[int] = 75) -> None: function singe_dash_line (line 124) | def singe_dash_line(dashes: Optional[int] = 67) -> None: function print_header (line 128) | def print_header(header: str) -> None: function print_header_minor (line 140) | def print_header_minor(header: str) -> None: function disable_printing (line 150) | def disable_printing(): function enable_printing (line 154) | def enable_printing(): function match_warning_message (line 158) | def match_warning_message(*message_segments: str) -> str: function indent (line 183) | def indent(multiline_str: str, prefix: str = "\t") -> str: function truncate (line 200) | def truncate(text: str, max_len: int = 79) -> str: FILE: corenet/utils/math_utils.py function make_divisible (line 9) | def make_divisible( function bound_fn (line 33) | def bound_fn( FILE: corenet/utils/object_utils.py function is_iterable (line 14) | def is_iterable(x): function apply_recursively (line 18) | def apply_recursively(x, cb, *args, **kwargs): function flatten_to_dict (line 28) | def flatten_to_dict( function is_pytest_environment (line 62) | def is_pytest_environment() -> bool: FILE: corenet/utils/object_utils_test.py function test_apply_on_values (line 9) | def test_apply_on_values(): function test_flatten_to_dict (line 22) | def test_flatten_to_dict(): FILE: corenet/utils/pytorch_to_coreml.py function convert_pytorch_to_coreml (line 20) | def convert_pytorch_to_coreml( function assertion_check (line 137) | def assertion_check( FILE: corenet/utils/registry.py class Registry (line 26) | class Registry: method __init__ (line 51) | def __init__( method _load_all (line 82) | def _load_all(self) -> None: method items (line 99) | def items(self) -> List[Tuple[str, RegistryItem]]: method keys (line 103) | def keys(self) -> List[str]: method __iter__ (line 107) | def __iter__(self) -> Iterable[str]: method __getitem__ (line 111) | def __getitem__(self, key: Union[Tuple[str, str], str]) -> RegistryItem: method __contains__ (line 141) | def __contains__(self, key: str) -> bool: method register (line 146) | def register(self, name: str, type: str = "") -> Callable: method all_arguments (line 173) | def all_arguments(self, parser: argparse.ArgumentParser) -> argparse.A... method parse_key (line 187) | def parse_key(self, key: str) -> Tuple[str, Dict[str, str]]: FILE: corenet/utils/registry_test.py function test_functional_registry (line 9) | def test_functional_registry() -> None: function test_basic_registration (line 21) | def test_basic_registration() -> None: FILE: corenet/utils/retry_utils.py function run_with_retries (line 13) | def run_with_retries( FILE: corenet/utils/tensor_utils.py function image_size_from_opts (line 22) | def image_size_from_opts(opts) -> Tuple[int, int]: function video_size_from_opts (line 40) | def video_size_from_opts(opts) -> Tuple[int, int, int]: function create_rand_tensor (line 62) | def create_rand_tensor( function reduce_tensor (line 95) | def reduce_tensor(inp_tensor: torch.Tensor) -> torch.Tensor: function reduce_tensor_sum (line 104) | def reduce_tensor_sum(inp_tensor: torch.Tensor) -> torch.Tensor: function all_gather_list (line 111) | def all_gather_list(data: Union[List, Tensor, Dict[str, Tensor]]): function gather_all_features (line 119) | def gather_all_features(features: Tensor, dim=0): function tensor_to_python_float (line 128) | def tensor_to_python_float( function to_numpy (line 163) | def to_numpy(img_tensor: torch.Tensor) -> np.ndarray: FILE: corenet/utils/visualization_utils.py function visualize_boxes_xyxy (line 30) | def visualize_boxes_xyxy(image: np.ndarray, boxes: np.ndarray) -> np.nda... function create_colored_mask (line 50) | def create_colored_mask( function draw_bounding_boxes (line 64) | def draw_bounding_boxes( function convert_to_cityscape_format (line 128) | def convert_to_cityscape_format(img: Tensor) -> Tensor: FILE: mlx_examples/clip/clip.py function load (line 18) | def load(model_dir: str) -> Tuple[CLIPModel, CLIPTokenizer, CLIPImagePro... function main (line 25) | def main() -> None: FILE: mlx_examples/clip/image_processor.py class CLIPImageProcessor (line 17) | class CLIPImageProcessor: method __init__ (line 24) | def __init__( method __call__ (line 43) | def __call__(self, images: List[Image]) -> mx.array: method _preprocess (line 48) | def _preprocess(self, image: Image) -> mx.array: method from_pretrained (line 60) | def from_pretrained(path: str) -> "CLIPImageProcessor": function resize (line 67) | def resize(image: Image, short_size: int) -> Image: function center_crop (line 82) | def center_crop(image: Image, size: Tuple[int, int]) -> Image: function rescale (line 97) | def rescale(image: mx.array) -> mx.array: function normalize (line 102) | def normalize(image: mx.array, mean: mx.array, std: mx.array) -> mx.array: FILE: mlx_examples/clip/main_clip_to_mlx.py function is_apple_silicon_macos (line 29) | def is_apple_silicon_macos() -> bool: function mlx_naming_remap (line 33) | def mlx_naming_remap(corenet_k: str) -> str: function make_shards (line 87) | def make_shards( function save_weights (line 106) | def save_weights(save_path: Union[str, Path], weights: Dict[str, Any]) -... function get_hf_clip_model_path (line 158) | def get_hf_clip_model_path() -> Path: function ascontiguousarray (line 178) | def ascontiguousarray(mx_array: mx.array) -> mx.array: function sanitize (line 190) | def sanitize(state_dict: Dict[str, mx.array]) -> Dict[str, mx.array]: function torch_to_mx (line 234) | def torch_to_mx(a: torch.Tensor, *, dtype: str) -> mx.array: function main (line 241) | def main() -> None: FILE: mlx_examples/clip/main_test_clip_mlx.py function load_mlx_model (line 43) | def load_mlx_model(model_dir: str) -> CLIPModel: function get_mlx_output (line 51) | def get_mlx_output( function transform_image (line 65) | def transform_image(img: Image.Image, size: int = 224) -> torch.Tensor: function text_transform (line 75) | def text_transform(tokeized_text_tensor: torch.Tensor) -> torch.Tensor: function get_tokenized_input (line 83) | def get_tokenized_input( function get_preprocessed_img (line 100) | def get_preprocessed_img(class_names: List[str]) -> torch.Tensor: function get_input_images_and_tokenized_text (line 112) | def get_input_images_and_tokenized_text( function get_torch_output (line 121) | def get_torch_output( function torch_to_mx (line 143) | def torch_to_mx(a: torch.Tensor, *, dtype: str) -> mx.array: function main_test (line 150) | def main_test() -> None: FILE: mlx_examples/clip/model.py class CLIPVisionOutput (line 24) | class CLIPVisionOutput: class CLIPTextOutput (line 31) | class CLIPTextOutput: class CLIPModelOutput (line 37) | class CLIPModelOutput: class CLIPTextConfig (line 46) | class CLIPTextConfig: class CLIPVisionConfig (line 59) | class CLIPVisionConfig: class CLIPConfig (line 73) | class CLIPConfig: function quick_gelu (line 80) | def quick_gelu(x: mx.array) -> mx.array: function get_hidden_act (line 87) | def get_hidden_act( function clip_loss (line 99) | def clip_loss(logits: mx.array) -> mx.array: class Attention (line 107) | class Attention(nn.Module): method __init__ (line 110) | def __init__( method __call__ (line 141) | def __call__( class MLP (line 168) | class MLP(nn.Module): method __init__ (line 171) | def __init__(self, config: CLIPTextConfig) -> None: method __call__ (line 178) | def __call__(self, x: mx.array) -> mx.array: class EncoderLayer (line 184) | class EncoderLayer(nn.Module): method __init__ (line 187) | def __init__(self, config: CLIPTextConfig) -> None: method __call__ (line 198) | def __call__(self, x: mx.array, mask: Optional[mx.array] = None) -> mx... class TextEmbeddings (line 207) | class TextEmbeddings(nn.Module): method __init__ (line 210) | def __init__(self, config: CLIPTextConfig) -> None: method __call__ (line 219) | def __call__(self, x: mx.array) -> mx.array: class Encoder (line 225) | class Encoder(nn.Module): method __init__ (line 228) | def __init__(self, config: Union[CLIPTextConfig, CLIPVisionConfig]) ->... method __call__ (line 231) | def __call__(self) -> None: function create_additive_causual_mask (line 235) | def create_additive_causual_mask( class ClipTextModel (line 247) | class ClipTextModel(nn.Module): method __init__ (line 250) | def __init__(self, config: CLIPTextConfig) -> None: method __call__ (line 257) | def __call__(self, x: mx.array) -> CLIPTextOutput: class VisionEmbeddings (line 273) | class VisionEmbeddings(nn.Module): method __init__ (line 276) | def __init__(self, config: CLIPVisionConfig) -> None: method __call__ (line 328) | def __call__(self, x: mx.array) -> mx.array: class ClipVisionModel (line 363) | class ClipVisionModel(nn.Module): method __init__ (line 366) | def __init__(self, config: CLIPVisionConfig) -> None: method __call__ (line 376) | def __call__( class CLIPModel (line 401) | class CLIPModel(nn.Module): method __init__ (line 404) | def __init__(self, config: CLIPConfig) -> None: method get_text_features (line 418) | def get_text_features(self, x: mx.array) -> mx.array: method get_image_features (line 421) | def get_image_features(self, x: mx.array) -> mx.array: method __call__ (line 424) | def __call__( method from_pretrained (line 465) | def from_pretrained(path: str) -> "CLIPModel": method sanitize (line 521) | def sanitize(weights: Dict[str, mx.array]) -> Dict[str, mx.array]: FILE: mlx_examples/clip/tokenizer.py class CLIPTokenizer (line 16) | class CLIPTokenizer: method __init__ (line 22) | def __init__(self, bpe_ranks: Dict[Tuple[str], int], vocab: Dict[str, ... method bos (line 32) | def bos(self) -> str: method bos_token (line 36) | def bos_token(self) -> int: method eos (line 40) | def eos(self) -> str: method eos_token (line 44) | def eos_token(self) -> int: method bpe (line 47) | def bpe(self, text: str) -> List[str]: method __call__ (line 92) | def __call__(self, *args: Any, **kwargs: Any) -> Any: method tokenize (line 95) | def tokenize( method from_pretrained (line 120) | def from_pretrained(path: str) -> "CLIPTokenizer": FILE: mlx_examples/open_elm/convert.py function torch_to_mlx (line 29) | def torch_to_mlx(x: torch.Tensor) -> mx.array: function quantize_weights (line 48) | def quantize_weights( function convert_open_elm (line 81) | def convert_open_elm( FILE: mlx_examples/open_elm/inference.py function generate_token (line 24) | def generate_token( function generate (line 74) | def generate( FILE: mlx_examples/open_elm/open_elm.py function get_normalization_layer (line 18) | def get_normalization_layer(num_features: int, norm_type: str) -> nn.Mod... function compute_heads (line 24) | def compute_heads(model_dim: int, head_dim: int) -> int: function make_divisible (line 33) | def make_divisible(val: Union[int, float], divisor: int) -> int: class GPTConfig (line 55) | class GPTConfig: method __post_init__ (line 88) | def __post_init__(self) -> None: method from_name (line 172) | def from_name( class MultiHeadCausalAttention (line 231) | class MultiHeadCausalAttention(nn.Module): method __init__ (line 239) | def __init__(self, model_config: GPTConfig, layer_idx: int) -> None: method extra_repr (line 289) | def extra_repr(self) -> str: method __call__ (line 297) | def __call__( class FeedForwardNetwork (line 386) | class FeedForwardNetwork(nn.Module): method __init__ (line 395) | def __init__(self, model_config: GPTConfig, layer_idx: int) -> None: method extra_repr (line 436) | def extra_repr(self) -> str: method __call__ (line 439) | def __call__(self, x): class TransformerDecoderLayer (line 457) | class TransformerDecoderLayer(nn.Module): method __init__ (line 466) | def __init__(self, model_config: GPTConfig, layer_idx: int) -> None: method __call__ (line 481) | def __call__( class OpenELM (line 514) | class OpenELM(nn.Module): method __init__ (line 526) | def __init__( method __call__ (line 563) | def __call__( method reset_parameters (line 614) | def reset_parameters(self, model_config: GPTConfig) -> None: function load_model (line 655) | def load_model( FILE: setup.py function is_apple_silicon_macos (line 16) | def is_apple_silicon_macos() -> bool: function parse_requirements (line 20) | def parse_requirements(path: str) -> List[str]: function main (line 33) | def main() -> None: function get_files (line 120) | def get_files(path, relative_to=".") -> List[str]: FILE: tests/configs.py function get_config (line 14) | def get_config( function default_training_opts (line 56) | def default_training_opts() -> argparse.Namespace: function modify_attr (line 61) | def modify_attr(opts: argparse.Namespace, key: str, value: Any) -> None: FILE: tests/data/collate_fns/test_byteformer_collate_fn.py function test_byteformer_image_collate_fn (line 13) | def test_byteformer_image_collate_fn() -> None: function test_wav_collate (line 46) | def test_wav_collate() -> None: FILE: tests/data/collate_fns/test_collate_functions.py function test_image_data_collate_functions (line 28) | def test_image_data_collate_functions( FILE: tests/data/datasets/audio_classification/test_speech_commands_v2.py function mock_load (line 20) | def mock_load(filepath: str) -> Tuple[Tensor, int]: function mock_process_dataset_config (line 28) | def mock_process_dataset_config(self) -> None: function test_getitem (line 52) | def test_getitem( FILE: tests/data/datasets/classification/mock_coco.py class MockCOCOClassification (line 16) | class MockCOCOClassification(COCOClassification): method read_image_pil (line 18) | def read_image_pil(path: str) -> Optional[Image.Image]: FILE: tests/data/datasets/classification/mock_imagenet.py class MockImageNetDataset (line 28) | class MockImageNetDataset(ImageNetDataset): method __init__ (line 29) | def __init__( method n_classes (line 55) | def n_classes(self): method read_image_pil (line 59) | def read_image_pil(path: str) -> Optional[Image.Image]: class MockImageNetADataset (line 75) | class MockImageNetADataset(MockImageNetDataset, ImageNetADataset): method __init__ (line 76) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method n_classes (line 82) | def n_classes(self): class MockImageNetRDataset (line 87) | class MockImageNetRDataset(MockImageNetDataset, ImageNetRDataset): method __init__ (line 88) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: method n_classes (line 94) | def n_classes(self): class MockImageNetSketchDataset (line 99) | class MockImageNetSketchDataset(MockImageNetDataset, ImageNetSketchDatas... method __init__ (line 100) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: FILE: tests/data/datasets/classification/mock_wordnet_tagged_classification.py function _generate_dummy_data (line 22) | def _generate_dummy_data() -> None: class MockWordnetTaggedClassificationDataset (line 70) | class MockWordnetTaggedClassificationDataset(WordnetTaggedClassification... method __init__ (line 77) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: FILE: tests/data/datasets/classification/test_base_image_classification_dataset.py function test_base_image_classification_dataset (line 35) | def test_base_image_classification_dataset( FILE: tests/data/datasets/classification/test_mock_coco.py function test_coco_dataset (line 12) | def test_coco_dataset() -> None: FILE: tests/data/datasets/classification/test_mock_imagenet.py function test_imagenet_dataset_train (line 46) | def test_imagenet_dataset_train( function test_imagenet_dataset_val (line 122) | def test_imagenet_dataset_val( FILE: tests/data/datasets/classification/test_wordnet_tagged_classification.py function test_wordnet_tagged_classification_dataset (line 18) | def test_wordnet_tagged_classification_dataset(image_size: int) -> None: FILE: tests/data/datasets/detection/mock_coco_mask_rcnn.py class MockCOCODetectionMaskRCNN (line 16) | class MockCOCODetectionMaskRCNN(COCODetectionMaskRCNN): method read_image_pil (line 18) | def read_image_pil(path: str) -> Optional[Image.Image]: FILE: tests/data/datasets/detection/mock_coco_ssd.py class MockCOCODetectionSSD (line 16) | class MockCOCODetectionSSD(COCODetectionSSD): method read_image_pil (line 18) | def read_image_pil(path: str) -> Optional[Image.Image]: FILE: tests/data/datasets/language_modeling/mock_general_lm.py function _generate_dummy_json_data (line 15) | def _generate_dummy_json_data() -> None: function _generate_dummy_json_gz_data (line 27) | def _generate_dummy_json_gz_data() -> None: class MockImgGeneralLMDataset (line 38) | class MockImgGeneralLMDataset(GeneralLMDataset): method __init__ (line 45) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: FILE: tests/data/datasets/language_modeling/test_commonsense_170k.py function write_data (line 17) | def write_data(filename: str) -> None: function test_general_lm_dataset (line 32) | def test_general_lm_dataset() -> None: FILE: tests/data/datasets/language_modeling/test_general_lm.py function _iterate_and_test_dataset (line 15) | def _iterate_and_test_dataset( function test_general_lm_dataset (line 29) | def test_general_lm_dataset(max_iterations: int) -> None: FILE: tests/data/datasets/multi_modal_img_text/mock_img_text_tar_dataset.py function _generate_dummy_data (line 21) | def _generate_dummy_data() -> None: class MockImgTextTarDataset (line 52) | class MockImgTextTarDataset(ImgTextTarDataset): method __init__ (line 59) | def __init__(self, opts: argparse.Namespace, *args, **kwargs) -> None: FILE: tests/data/datasets/multi_modal_img_text/test_img_text_tar_dataset.py function test_img_text_dataset (line 17) | def test_img_text_dataset(image_size: int, context_length: int) -> None: FILE: tests/data/datasets/multi_modal_img_text/zero_shot_image_classification/mock_imagenet.py class MockImageNetDatasetZeroShot (line 25) | class MockImageNetDatasetZeroShot(ImageNetDatasetZeroShot): method __init__ (line 28) | def __init__( method class_names (line 53) | def class_names(self) -> List[str]: class MockImageNetADatasetZeroShot (line 57) | class MockImageNetADatasetZeroShot( method __init__ (line 60) | def __init__(self, *args, **kwargs) -> None: class MockImageNetRDatasetZeroShot (line 65) | class MockImageNetRDatasetZeroShot( method __init__ (line 68) | def __init__(self, *args, **kwargs) -> None: class MockImageNetSketchDatasetZeroShot (line 73) | class MockImageNetSketchDatasetZeroShot( method __init__ (line 76) | def __init__(self, *args, **kwargs) -> None: FILE: tests/data/datasets/multi_modal_img_text/zero_shot_image_classification/test_mock_imagenet.py function test_imagenet_dataset_zero_shot (line 19) | def test_imagenet_dataset_zero_shot( function test_imagenet_shift_dataset_zero_shot (line 65) | def test_imagenet_shift_dataset_zero_shot( FILE: tests/data/datasets/segmentation/mock_ade20k.py class MockADE20KDataset (line 20) | class MockADE20KDataset(ADE20KDataset): method __init__ (line 21) | def __init__( method read_image_pil (line 47) | def read_image_pil(path: str) -> Image.Image: method read_mask_pil (line 56) | def read_mask_pil(self, path: str) -> Image.Image: FILE: tests/data/datasets/segmentation/mock_coco_stuff.py class MockCOCOStuffDataset (line 20) | class MockCOCOStuffDataset(COCOStuffDataset): method __init__ (line 21) | def __init__( method read_image_pil (line 47) | def read_image_pil(path: str) -> Optional[Image.Image]: method read_mask_pil (line 56) | def read_mask_pil(self, path: str) -> Optional[Image.Image]: FILE: tests/data/datasets/segmentation/test_mock_ade20k.py function test_ade20k_dataset (line 14) | def test_ade20k_dataset(mode: str) -> None: FILE: tests/data/datasets/segmentation/test_mock_coco_stuff.py function test_cocostuff_dataset (line 14) | def test_cocostuff_dataset(mode: str) -> None: FILE: tests/data/datasets/test_dataset_base.py function test_repr_with_imagenet (line 15) | def test_repr_with_imagenet(): function test_repr_with_imagenet_with_mean_std_norm (line 47) | def test_repr_with_imagenet_with_mean_std_norm( function test_item_metadata_exceptions (line 82) | def test_item_metadata_exceptions(): FILE: tests/data/datasets/test_image_pil.py function test_to_tensor (line 14) | def test_to_tensor() -> None: function test_to_tensor_bad_mask (line 34) | def test_to_tensor_bad_mask() -> None: FILE: tests/data/datasets/utils/test_common.py function _test_data (line 12) | def _test_data(): function test_select_specified_number_of_samples_per_category (line 31) | def test_select_specified_number_of_samples_per_category(): function test_select_specified_percentage_of_samples_per_category (line 68) | def test_select_specified_percentage_of_samples_per_category(): function test_select_samples_by_category_with_default_arguments (line 100) | def test_select_samples_by_category_with_default_arguments(): function test_reproducibility_of_sample_selection_by_category (line 116) | def test_reproducibility_of_sample_selection_by_category(): function test_file_has_valid_image_extension (line 151) | def test_file_has_valid_image_extension(): function test_select_random_subset (line 156) | def test_select_random_subset(): function test_get_image_paths (line 209) | def test_get_image_paths(): FILE: tests/data/datasets/utils/test_video.py function _get_invalid_label (line 13) | def _get_invalid_label(timestamp: float) -> Dict: function test_fetch_frame_label (line 26) | def test_fetch_frame_label(): function test_fetch_frame_with_progress (line 201) | def test_fetch_frame_with_progress(test_case): FILE: tests/data/io/test_transfer_clients.py function test_client (line 25) | def test_client(file_path: str): FILE: tests/data/samplers/test_chain_sampler.py function test_chain_sampler (line 26) | def test_chain_sampler( function test_sampling_mode (line 83) | def test_sampling_mode( function pytest_generate_tests (line 143) | def pytest_generate_tests(metafunc): FILE: tests/data/samplers/test_data_samplers.py function set_common_defaults (line 19) | def set_common_defaults( function test_ssc_fbs_sampler (line 35) | def test_ssc_fbs_sampler( function test_msc_fbs_batch_sampler (line 73) | def test_msc_fbs_batch_sampler( function test_msc_vbs_sampler (line 132) | def test_msc_vbs_sampler( function test_video_clip_sampler (line 211) | def test_video_clip_sampler( FILE: tests/data/text_tokenizer/test_clip_tokenizer.py function test_clip_tokenizer (line 13) | def test_clip_tokenizer(): FILE: tests/data/text_tokenizer/test_openai_clip_tokenizer.py function test_openai_clip_tokenizer (line 15) | def test_openai_clip_tokenizer(): FILE: tests/data/video_reader/test_av_reader.py function test_video_reader_clips (line 39) | def test_video_reader_clips( function test_video_reader_values (line 140) | def test_video_reader_values( function test_build_video_metadata (line 192) | def test_build_video_metadata(reader_class): FILE: tests/data/video_reader/test_ffmpeg_utils.py function assert_video_data_is_close (line 30) | def assert_video_data_is_close(actual: Dict, expected: Dict) -> None: function test_transform_video_with_trimming (line 53) | def test_transform_video_with_trimming(tmp_path: Path): function test_transform_video_with_fps (line 94) | def test_transform_video_with_fps(tmp_path: Path): class SmallCrop (line 121) | class SmallCrop(BaseTransformation): method __call__ (line 124) | def __call__(self, data: Dict) -> Dict: function test_transform_video_file (line 135) | def test_transform_video_file( function test_error_message (line 181) | def test_error_message() -> None: function test_ffprobe (line 193) | def test_ffprobe() -> None: function test_write_video_and_audio (line 205) | def test_write_video_and_audio( FILE: tests/engine/test_training_engine.py function test_training_engine (line 31) | def test_training_engine(config_file: str, tmp_path: Path) -> None: FILE: tests/loss_fns/language_modeling/test_cross_entropy.py function test_cross_entropy_lm_in_out (line 22) | def test_cross_entropy_lm_in_out( FILE: tests/loss_fns/language_modeling/test_cross_entropy_for_kv_prediction.py function test_cross_entropy_lm_in_out (line 21) | def test_cross_entropy_lm_in_out( FILE: tests/loss_fns/test_class_weighting.py function test_class_weighting (line 9) | def test_class_weighting(): FILE: tests/loss_fns/test_classification_loss.py function test_cross_entropy_in_out (line 21) | def test_cross_entropy_in_out( function test_binary_cross_entropy_in_out (line 68) | def test_binary_cross_entropy_in_out(batch_size: int, reduction: str) ->... FILE: tests/loss_fns/test_composite_loss.py function test_composite_loss (line 14) | def test_composite_loss() -> None: FILE: tests/loss_fns/test_contrastive_loss.py function test_contrastive_loss_in_out (line 16) | def test_contrastive_loss_in_out(batch_size: int, projection_dim: int) -... FILE: tests/loss_fns/test_detection_loss.py function test_ssd_loss_in_out (line 21) | def test_ssd_loss_in_out( function test_maskrcnn_loss_in_out (line 72) | def test_maskrcnn_loss_in_out( FILE: tests/loss_fns/test_focal_loss.py function get_opts (line 16) | def get_opts(gamma: float, weights: Optional[List[float]] = None) -> arg... function test_focal_loss_onehot_vs_probabilities (line 33) | def test_focal_loss_onehot_vs_probabilities() -> None: function test_focal_loss_tiny_gamma (line 50) | def test_focal_loss_tiny_gamma() -> None: function test_focal_loss_gamma (line 66) | def test_focal_loss_gamma() -> None: function test_focal_loss_weights (line 81) | def test_focal_loss_weights() -> None: FILE: tests/loss_fns/test_neural_aug.py function test_neural_aug_loss_in_out (line 13) | def test_neural_aug_loss_in_out(batch_size: int) -> None: FILE: tests/loss_fns/test_neural_aug_compatibility.py function test_neural_aug_backward_compatibility (line 14) | def test_neural_aug_backward_compatibility(config_file: str): function pytest_generate_tests (line 26) | def pytest_generate_tests(metafunc): FILE: tests/loss_fns/test_segmentation_loss.py function test_seg_cross_entropy_in_out (line 19) | def test_seg_cross_entropy_in_out( FILE: tests/metrics/base.py function sample_classification_outputs (line 12) | def sample_classification_outputs() -> Tuple[torch.Tensor, torch.Tensor]: function transform_args (line 37) | def transform_args(request): FILE: tests/metrics/test_coco_map.py function test_coco_map (line 20) | def test_coco_map(): function get_prediction_from_annotation (line 46) | def get_prediction_from_annotation( function get_detection_pred_tuple_from_annotations (line 76) | def get_detection_pred_tuple_from_annotations( function test_map (line 101) | def test_map() -> None: FILE: tests/metrics/test_image_text_retrieval_metrics.py function test_image_text_retrieval (line 20) | def test_image_text_retrieval( FILE: tests/metrics/test_iou.py function test_gather_iou_metrics (line 15) | def test_gather_iou_metrics(transform_args: Callable): FILE: tests/metrics/test_misc.py function test_gather_loss (line 12) | def test_gather_loss(): function test_gather_grad_norm (line 44) | def test_gather_grad_norm(): FILE: tests/metrics/test_multiclass_classification_pr.py function get_expected_keys (line 16) | def get_expected_keys(include_curve: bool) -> Set[str]: function test_metric (line 44) | def test_metric( function test_flatten_metric (line 117) | def test_flatten_metric(include_curve: bool, suppress_warnings: bool) ->... FILE: tests/metrics/test_probability_histogram.py function test_probability_histogram (line 15) | def test_probability_histogram(transform_args: Callable): FILE: tests/metrics/test_psnr.py function test_gather_psnr_metrics (line 16) | def test_gather_psnr_metrics(transform_args: Callable): FILE: tests/metrics/test_retrieval_cmc_metrics.py function test_cosine_distance_matrix (line 21) | def test_cosine_distance_matrix() -> None: function test_l2_distance_matrix (line 44) | def test_l2_distance_matrix() -> None: function test_cmc_calculation (line 74) | def test_cmc_calculation() -> None: function test_mean_ap (line 109) | def test_mean_ap() -> None: function test_retrieval_cmc (line 134) | def test_retrieval_cmc() -> None: FILE: tests/metrics/test_topk_accuracy.py function test_gather_top_k_metrics (line 14) | def test_gather_top_k_metrics(transform_args: Callable): FILE: tests/metrics/test_vqa_preset_score_metrics.py function test_vqa_preset_score (line 13) | def test_vqa_preset_score() -> None: FILE: tests/misc/test_common.py function test_freeze_modules_based_on_opts (line 20) | def test_freeze_modules_based_on_opts() -> None: function test_freeze_modules_based_on_opts_with_match_named_params (line 73) | def test_freeze_modules_based_on_opts_with_match_named_params( function test_get_tensor_sizes (line 100) | def test_get_tensor_sizes() -> None: FILE: tests/modeling/layers/normalization_layers/test_rms_norm.py function test_rms_norm (line 11) | def test_rms_norm() -> None: FILE: tests/modeling/layers/test_conv_layer.py function test_use_act_and_use_norm (line 23) | def test_use_act_and_use_norm( FILE: tests/modeling/layers/test_multi_head_attn.py function build_attention_mask (line 17) | def build_attention_mask(context_length: int, batch_size: int, use_pytor... function test_multihead_self_attn (line 36) | def test_multihead_self_attn( function test_multihead_cross_attn (line 91) | def test_multihead_cross_attn( FILE: tests/modeling/layers/test_pos_embeddings.py function test_pos_embedding (line 24) | def test_pos_embedding( FILE: tests/modeling/layers/test_rotary_embeddings.py function test_rotary_embedding (line 19) | def test_rotary_embedding( FILE: tests/modeling/layers/test_token_merging.py function ensure_equal_in_range (line 13) | def ensure_equal_in_range(t: torch.Tensor, start: int, end: int) -> None: function test_token_merging (line 32) | def test_token_merging() -> None: function test_token_merging_shapes (line 70) | def test_token_merging_shapes(dim: int, window: int) -> None: FILE: tests/modeling/models/audio_classification/test_base_audio_classification.py function test_base_audio_classification_adds_arguments (line 11) | def test_base_audio_classification_adds_arguments() -> None: FILE: tests/modeling/models/audio_classification/test_byteformer.py function test_audio_byteformer (line 13) | def test_audio_byteformer() -> None: FILE: tests/modeling/models/classification/config/test_byteformer.py function test_get_configuration (line 14) | def test_get_configuration(mode) -> None: FILE: tests/modeling/models/classification/test_byteformer.py function get_opts (line 13) | def get_opts() -> argparse.Namespace: function test_token_reduction_net (line 42) | def test_token_reduction_net() -> None: function test_model_forward_pass (line 57) | def test_model_forward_pass() -> None: FILE: tests/modeling/models/classification/test_vit.py function test_vit (line 23) | def test_vit(cls_token, return_image_embeddings, use_range_augment, use_... FILE: tests/modeling/models/language_modeling/test_general_gpt.py function test_general_gpt (line 13) | def test_general_gpt(): FILE: tests/modeling/models/language_modeling/test_kv_prediction.py function set_cache_transforms_to_identity (line 15) | def set_cache_transforms_to_identity(model) -> None: function get_openelm_kv_prediction_model (line 19) | def get_openelm_kv_prediction_model( function test_kv_prediction (line 59) | def test_kv_prediction(arch, config) -> None: function test_cache_behavior (line 293) | def test_cache_behavior( FILE: tests/modeling/models/test_activation_checkpointing_wrapper.py function test_activation_checkpointing (line 25) | def test_activation_checkpointing( FILE: tests/modeling/models/test_lora.py function get_opts (line 15) | def get_opts(config_file_name: str) -> Dict: function test_build_model (line 80) | def test_build_model() -> None: FILE: tests/modeling/models/test_neural_aug_utils.py function test_random_noise (line 14) | def test_random_noise(noise_var): function test_random_brightness (line 26) | def test_random_brightness(magnitude): function test_random_contrast (line 38) | def test_random_contrast(magnitude): FILE: tests/modeling/modules/test_transformer.py function get_opts (line 13) | def get_opts() -> argparse.Namespace: function ensure_equal_in_range (line 23) | def ensure_equal_in_range(t: torch.Tensor, start: int, end: int) -> None: function test_masked_attention (line 40) | def test_masked_attention() -> None: FILE: tests/modeling/modules/test_windowed_transformer.py function test_get_windowed_attention_mask (line 17) | def test_get_windowed_attention_mask(N, window_size, window_shift) -> None: function test_windowed_attention (line 30) | def test_windowed_attention() -> None: function test_windowed_attention_shift (line 75) | def test_windowed_attention_shift() -> None: FILE: tests/modeling/test_model.py function test_model (line 20) | def test_model(config_file: str, batch_size: int): function exclude_yaml_from_test (line 95) | def exclude_yaml_from_test(yaml_file_path: Path) -> bool: function pytest_generate_tests (line 119) | def pytest_generate_tests(metafunc): FILE: tests/optims/scheduler/test_scheduler.py function run_test (line 27) | def run_test( function test_polynomial_scheduler (line 48) | def test_polynomial_scheduler(start_lr, warmup_iteration, *args, **kwargs): function test_cosine_scheduler (line 82) | def test_cosine_scheduler(start_lr, warmup_iteration, *args, **kwargs): function test_fixed_scheduler (line 116) | def test_fixed_scheduler(start_lr, warmup_iteration, *args, **kwargs): FILE: tests/options/test_parse_args.py function test_json_validator (line 29) | def test_json_validator( FILE: tests/options/test_utils.py function test_load_config_file_produces_no_false_warnings (line 12) | def test_load_config_file_produces_no_false_warnings() -> None: function test_load_config_file_produces_true_warning (line 16) | def test_load_config_file_produces_true_warning( FILE: tests/test_conventions.py class CodeConventionError (line 17) | class CodeConventionError(Exception): class CheckConventionsVisitor (line 21) | class CheckConventionsVisitor(NodeVisitor): method __init__ (line 22) | def __init__(self, filename: str, *args, **kwargs) -> None: method visit_Import (line 26) | def visit_Import(self, node: Import) -> Any: method visit_ImportFrom (line 37) | def visit_ImportFrom(self, node: ImportFrom) -> Any: method visit_Call (line 47) | def visit_Call(self, node: Call) -> Any: function test_validator (line 103) | def test_validator(line: str, error: str) -> None: function get_python_filenames (line 127) | def get_python_filenames() -> List[str]: function test_python_filenames (line 142) | def test_python_filenames(): class ForbiddenRegex (line 150) | class ForbiddenRegex: function test_validate_python_files (line 157) | def test_validate_python_files(filename: str) -> None: function get_regular_filenames (line 210) | def get_regular_filenames() -> List[str]: function test_regular_filenames (line 225) | def test_regular_filenames(): function test_no_newline_before_EOF (line 231) | def test_no_newline_before_EOF(filename: str) -> None: function test_packages_have_init (line 239) | def test_packages_have_init() -> None: function test_formatter_versions (line 256) | def test_formatter_versions() -> None: FILE: tests/test_utils.py function unset_pretrained_models_from_opts (line 12) | def unset_pretrained_models_from_opts(opts: argparse.Namespace) -> None: function is_pretrained_model_key (line 20) | def is_pretrained_model_key(key_name: str) -> bool: function test_is_pretrained_model_key (line 38) | def test_is_pretrained_model_key(key_name_expected_output: Tuple[str, bo... FILE: tests/transforms/test_audio.py function test_mfccs (line 28) | def test_mfccs(): function test_lambda_audio (line 59) | def test_lambda_audio() -> None: function test_set_fixed_length (line 86) | def test_set_fixed_length(length: int) -> None: function test_roll (line 100) | def test_roll(window: float) -> None: function test_audio_resample (line 122) | def test_audio_resample() -> None: function test_standardize_channels (line 157) | def test_standardize_channels(in_channels: int, out_channels: int): function test_gain (line 173) | def test_gain(share_clip_params): function test_noise_augmentation (line 209) | def test_noise_augmentation(audio_channels, audio_length, noise_length): function test_no_noise_augmentation (line 242) | def test_no_noise_augmentation(): function test_gaussian_noise_augmentation (line 264) | def test_gaussian_noise_augmentation(): FILE: tests/transforms/test_audio_bytes.py function test_audio_save (line 25) | def test_audio_save(format, encoding_dtype, num_samples, expected_length... FILE: tests/transforms/test_image.py function test_rrc_params (line 26) | def test_rrc_params(height: int, width: int, size: Union[int, Tuple[int,... function test_mixup_transform (line 81) | def test_mixup_transform( function test_cutmix_transform (line 141) | def test_cutmix_transform( function test_to_tensor_normalization (line 192) | def test_to_tensor_normalization( function test_to_tensor_normalization_no_mean_std (line 224) | def test_to_tensor_normalization_no_mean_std() -> None: FILE: tests/transforms/test_image_bytes.py function test_pil_save (line 26) | def test_pil_save(file_encoding, quality, expected_shape) -> None: function test_shuffle_bytes (line 49) | def test_shuffle_bytes(mode, stride, window_size) -> None: function test_mask_positions (line 66) | def test_mask_positions(keep_frac) -> None: function test_byte_permutation (line 80) | def test_byte_permutation() -> None: function test_byte_permutation (line 101) | def test_byte_permutation(width_range: Tuple[int, int]) -> None: FILE: tests/transforms/test_video.py function test_resize_fn (line 25) | def test_resize_fn() -> None: function _non_zero_values_bounds (line 44) | def _non_zero_values_bounds(x: torch.Tensor) -> Tuple[float, float]: function test_crop_by_bounding_box (line 55) | def test_crop_by_bounding_box( function test_shuffle_audios_single_cycle_permutation (line 171) | def test_shuffle_audios_single_cycle_permutation(numel: int, is_training... function test_shuffle_audios (line 208) | def test_shuffle_audios( function test_save_inputs_srt_format_timestamp (line 300) | def test_save_inputs_srt_format_timestamp(t: float, expected: str) -> None: function test_save_inputs (line 332) | def test_save_inputs( FILE: tests/utils/test_check.py class TestCheck (line 10) | class TestCheck(unittest.TestCase): method test_ok (line 12) | def test_ok(self): method test_fail (line 17) | def test_fail(self): method test_custom_raise (line 25) | def test_custom_raise(self): FILE: tests/utils/test_common_utils.py function check_models (line 13) | def check_models( function test_unwrap_model_fn (line 24) | def test_unwrap_model_fn(): FILE: tests/utils/test_dict_utils.py function test_extract_keys (line 8) | def test_extract_keys(): FILE: tests/utils/test_download_utils.py function dummy_download_fn (line 14) | def dummy_download_fn(index: int, local_dst_dir: str, args, kwargs) -> N... function test_download_assets_in_parallel (line 25) | def test_download_assets_in_parallel(asset_names: List[Any]) -> None: FILE: tests/utils/test_file_logger.py function test_file_logger (line 19) | def test_file_logger( FILE: tests/utils/test_import_utils.py function test_import_utils (line 17) | def test_import_utils(tmp_path: Path, mocker: MockerFixture) -> None: function test_ensure_pythonpath_is_not_required (line 56) | def test_ensure_pythonpath_is_not_required(): FILE: tools/converter_coco_stuff.py function remove_unannotated_mask_labels (line 199) | def remove_unannotated_mask_labels(src_path: str, dst_path: str) -> None: function main (line 214) | def main(opts: argparse.Namespace) -> None: