SYMBOL INDEX (583 symbols across 33 files) FILE: args.py function get_parser (line 4) | def get_parser(): FILE: bert/activations.py function swish (line 11) | def swish(x): function _gelu_python (line 15) | def _gelu_python(x): function gelu_new (line 25) | def gelu_new(x): function gelu_fast (line 38) | def gelu_fast(x): function get_activation (line 52) | def get_activation(activation_string): FILE: bert/configuration_bert.py class BertConfig (line 53) | class BertConfig(PretrainedConfig): method __init__ (line 111) | def __init__( FILE: bert/configuration_utils.py class PretrainedConfig (line 31) | class PretrainedConfig(object): method __init__ (line 56) | def __init__(self, **kwargs): method num_labels (line 118) | def num_labels(self): method num_labels (line 122) | def num_labels(self, num_labels): method save_pretrained (line 126) | def save_pretrained(self, save_directory): method from_pretrained (line 145) | def from_pretrained(cls, pretrained_model_name_or_path, **kwargs) -> "... method get_config_dict (line 204) | def get_config_dict(cls, pretrained_model_name_or_path: str, **kwargs)... method from_dict (line 269) | def from_dict(cls, config_dict: Dict, **kwargs) -> "PretrainedConfig": method from_json_file (line 307) | def from_json_file(cls, json_file: str) -> "PretrainedConfig": method _dict_from_json_file (line 323) | def _dict_from_json_file(cls, json_file: str): method __eq__ (line 328) | def __eq__(self, other): method __repr__ (line 331) | def __repr__(self): method to_diff_dict (line 334) | def to_diff_dict(self): method to_dict (line 357) | def to_dict(self): method to_json_string (line 369) | def to_json_string(self, use_diff=True): method to_json_file (line 386) | def to_json_file(self, json_file_path, use_diff=True): method update (line 399) | def update(self, config_dict: Dict): FILE: bert/file_utils.py function is_torch_available (line 131) | def is_torch_available(): function is_tf_available (line 135) | def is_tf_available(): function is_torch_tpu_available (line 139) | def is_torch_tpu_available(): function is_psutil_available (line 143) | def is_psutil_available(): function is_py3nvml_available (line 147) | def is_py3nvml_available(): function is_apex_available (line 151) | def is_apex_available(): function add_start_docstrings (line 155) | def add_start_docstrings(*docstr): function add_start_docstrings_to_callable (line 163) | def add_start_docstrings_to_callable(*docstr): function add_end_docstrings (line 181) | def add_end_docstrings(*docstr): function add_code_sample_docstrings (line 417) | def add_code_sample_docstrings(*docstr, tokenizer_class=None, checkpoint... function is_remote_url (line 446) | def is_remote_url(url_or_filename): function hf_bucket_url (line 451) | def hf_bucket_url(model_id: str, filename: str, use_cdn=True) -> str: function url_to_filename (line 475) | def url_to_filename(url, etag=None): function filename_to_url (line 499) | def filename_to_url(filename, cache_dir=None): function cached_path (line 525) | def cached_path( function http_get (line 617) | def http_get(url, temp_file, proxies=None, resume_size=0, user_agent: Un... function get_from_cache (line 650) | def get_from_cache( class cached_property (line 764) | class cached_property(property): method __get__ (line 773) | def __get__(self, obj, objtype=None): function torch_required (line 787) | def torch_required(func): function tf_required (line 799) | def tf_required(func): FILE: bert/generation_utils.py class GenerationMixin (line 28) | class GenerationMixin: method prepare_inputs_for_generation (line 33) | def prepare_inputs_for_generation(self, input_ids, **kwargs): method adjust_logits_during_generation (line 36) | def adjust_logits_during_generation(self, logits, **kwargs): method _use_cache (line 39) | def _use_cache(self, outputs, use_cache): method enforce_repetition_penalty_ (line 47) | def enforce_repetition_penalty_(self, lprobs, batch_size, num_beams, p... method postprocess_next_token_scores (line 57) | def postprocess_next_token_scores( method generate (line 101) | def generate( method _generate_no_beam_search (line 485) | def _generate_no_beam_search( method _generate_beam_search (line 585) | def _generate_beam_search( method _reorder_cache (line 844) | def _reorder_cache(past: Tuple, beam_idx: Tensor) -> Tuple[Tensor]: function calc_banned_ngram_tokens (line 848) | def calc_banned_ngram_tokens(prev_input_ids: Tensor, num_hypos: int, no_... function calc_banned_bad_words_ids (line 871) | def calc_banned_bad_words_ids(prev_input_ids: Iterable[int], bad_words_i... function top_k_top_p_filtering (line 907) | def top_k_top_p_filtering( class BeamHypotheses (line 948) | class BeamHypotheses(object): method __init__ (line 949) | def __init__(self, num_beams, max_length, length_penalty, early_stoppi... method __len__ (line 960) | def __len__(self): method add (line 966) | def add(self, hyp, sum_logprobs): method is_done (line 980) | def is_done(self, best_sum_logprobs, cur_len): FILE: bert/modeling_bert.py function load_tf_weights_in_bert (line 66) | def load_tf_weights_in_bert(model, config, tf_checkpoint_path): function mish (line 138) | def mish(x): class BertEmbeddings (line 148) | class BertEmbeddings(nn.Module): method __init__ (line 152) | def __init__(self, config): method forward (line 163) | def forward(self, input_ids=None, token_type_ids=None, position_ids=No... class BertSelfAttention (line 188) | class BertSelfAttention(nn.Module): method __init__ (line 189) | def __init__(self, config): method transpose_for_scores (line 207) | def transpose_for_scores(self, x): method forward (line 212) | def forward( class BertSelfOutput (line 266) | class BertSelfOutput(nn.Module): method __init__ (line 267) | def __init__(self, config): method forward (line 273) | def forward(self, hidden_states, input_tensor): class BertAttention (line 280) | class BertAttention(nn.Module): method __init__ (line 281) | def __init__(self, config): method prune_heads (line 287) | def prune_heads(self, heads): method forward (line 305) | def forward( class BertIntermediate (line 322) | class BertIntermediate(nn.Module): method __init__ (line 323) | def __init__(self, config): method forward (line 331) | def forward(self, hidden_states): class BertOutput (line 337) | class BertOutput(nn.Module): method __init__ (line 338) | def __init__(self, config): method forward (line 344) | def forward(self, hidden_states, input_tensor): class BertLayer (line 351) | class BertLayer(nn.Module): method __init__ (line 352) | def __init__(self, config): method forward (line 361) | def forward( class BertEncoder (line 394) | class BertEncoder(nn.Module): method __init__ (line 395) | def __init__(self, config): method forward (line 400) | def forward( class BertPooler (line 458) | class BertPooler(nn.Module): method __init__ (line 459) | def __init__(self, config): method forward (line 464) | def forward(self, hidden_states): class BertPredictionHeadTransform (line 473) | class BertPredictionHeadTransform(nn.Module): method __init__ (line 474) | def __init__(self, config): method forward (line 483) | def forward(self, hidden_states): class BertLMPredictionHead (line 490) | class BertLMPredictionHead(nn.Module): method __init__ (line 491) | def __init__(self, config): method forward (line 504) | def forward(self, hidden_states): class BertOnlyMLMHead (line 510) | class BertOnlyMLMHead(nn.Module): method __init__ (line 511) | def __init__(self, config): method forward (line 515) | def forward(self, sequence_output): class BertOnlyNSPHead (line 520) | class BertOnlyNSPHead(nn.Module): method __init__ (line 521) | def __init__(self, config): method forward (line 525) | def forward(self, pooled_output): class BertPreTrainingHeads (line 530) | class BertPreTrainingHeads(nn.Module): method __init__ (line 531) | def __init__(self, config): method forward (line 536) | def forward(self, sequence_output, pooled_output): class BertPreTrainedModel (line 542) | class BertPreTrainedModel(PreTrainedModel): method _init_weights (line 551) | def _init_weights(self, module): class BertModel (line 627) | class BertModel(BertPreTrainedModel): method __init__ (line 644) | def __init__(self, config): method get_input_embeddings (line 654) | def get_input_embeddings(self): method set_input_embeddings (line 657) | def set_input_embeddings(self, value): method _prune_heads (line 660) | def _prune_heads(self, heads_to_prune): method forward (line 670) | def forward( class BertForPreTraining (line 778) | class BertForPreTraining(BertPreTrainedModel): method __init__ (line 779) | def __init__(self, config): method get_output_embeddings (line 787) | def get_output_embeddings(self): method forward (line 791) | def forward( class BertLMHeadModel (line 894) | class BertLMHeadModel(BertPreTrainedModel): method __init__ (line 895) | def __init__(self, config): method get_output_embeddings (line 904) | def get_output_embeddings(self): method forward (line 908) | def forward( method prepare_inputs_for_generation (line 994) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BertForMaskedLM (line 1005) | class BertForMaskedLM(BertPreTrainedModel): method __init__ (line 1006) | def __init__(self, config): method get_output_embeddings (line 1017) | def get_output_embeddings(self): method forward (line 1022) | def forward( method prepare_inputs_for_generation (line 1098) | def prepare_inputs_for_generation(self, input_ids, attention_mask=None... class BertForNextSentencePrediction (line 1116) | class BertForNextSentencePrediction(BertPreTrainedModel): method __init__ (line 1117) | def __init__(self, config): method forward (line 1126) | def forward( class BertForSequenceClassification (line 1208) | class BertForSequenceClassification(BertPreTrainedModel): method __init__ (line 1209) | def __init__(self, config): method forward (line 1221) | def forward( class BertForMultipleChoice (line 1295) | class BertForMultipleChoice(BertPreTrainedModel): method __init__ (line 1296) | def __init__(self, config): method forward (line 1307) | def forward( class BertForTokenClassification (line 1389) | class BertForTokenClassification(BertPreTrainedModel): method __init__ (line 1390) | def __init__(self, config): method forward (line 1402) | def forward( class BertForQuestionAnswering (line 1477) | class BertForQuestionAnswering(BertPreTrainedModel): method __init__ (line 1478) | def __init__(self, config): method forward (line 1489) | def forward( FILE: bert/modeling_utils.py class Identity (line 48) | class Identity(nn.Module): method __init__ (line 52) | def __init__(self, *args, **kwargs): method forward (line 55) | def forward(self, input): function find_pruneable_heads_and_indices (line 59) | def find_pruneable_heads_and_indices( class ModuleUtilsMixin (line 73) | class ModuleUtilsMixin: method num_parameters (line 78) | def num_parameters(self, only_trainable: bool = False) -> int: method _hook_rss_memory_pre_forward (line 86) | def _hook_rss_memory_pre_forward(module, *args, **kwargs): method _hook_rss_memory_post_forward (line 98) | def _hook_rss_memory_post_forward(module, *args, **kwargs): method add_memory_hooks (line 111) | def add_memory_hooks(self): method reset_memory_hooks_state (line 120) | def reset_memory_hooks_state(self): method device (line 127) | def device(self) -> device: method dtype (line 145) | def dtype(self) -> dtype: method invert_attention_mask (line 162) | def invert_attention_mask(self, encoder_attention_mask: Tensor) -> Ten... method get_extended_attention_mask (line 188) | def get_extended_attention_mask(self, attention_mask: Tensor, input_sh... method get_head_mask (line 232) | def get_head_mask(self, head_mask: Tensor, num_hidden_layers: int, is_... method _convert_head_mask_to_5d (line 253) | def _convert_head_mask_to_5d(self, head_mask, num_hidden_layers): class PreTrainedModel (line 265) | class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin): method dummy_inputs (line 285) | def dummy_inputs(self): method __init__ (line 293) | def __init__(self, config, *inputs, **kwargs): method base_model (line 307) | def base_model(self): method get_input_embeddings (line 310) | def get_input_embeddings(self): method set_input_embeddings (line 324) | def set_input_embeddings(self, value: nn.Module): method get_output_embeddings (line 338) | def get_output_embeddings(self): method tie_weights (line 348) | def tie_weights(self): method _tie_or_clone_weights (line 358) | def _tie_or_clone_weights(self, output_embeddings, input_embeddings): method resize_token_embeddings (line 376) | def resize_token_embeddings(self, new_num_tokens: Optional[int] = None): method _resize_token_embeddings (line 403) | def _resize_token_embeddings(self, new_num_tokens): method _get_resized_embeddings (line 409) | def _get_resized_embeddings( method init_weights (line 447) | def init_weights(self): method prune_heads (line 459) | def prune_heads(self, heads_to_prune: Dict): method save_pretrained (line 474) | def save_pretrained(self, save_directory): method from_pretrained (line 510) | def from_pretrained(cls, pretrained_model_name_or_path, *model_args, *... class Conv1D (line 815) | class Conv1D(nn.Module): method __init__ (line 816) | def __init__(self, nf, nx): method forward (line 827) | def forward(self, x): class PoolerStartLogits (line 834) | class PoolerStartLogits(nn.Module): method __init__ (line 837) | def __init__(self, config): method forward (line 841) | def forward(self, hidden_states, p_mask=None): class PoolerEndLogits (line 858) | class PoolerEndLogits(nn.Module): method __init__ (line 862) | def __init__(self, config): method forward (line 869) | def forward(self, hidden_states, start_states=None, start_positions=No... class PoolerAnswerClass (line 905) | class PoolerAnswerClass(nn.Module): method __init__ (line 908) | def __init__(self, config): method forward (line 914) | def forward(self, hidden_states, start_states=None, start_positions=No... class SQuADHead (line 952) | class SQuADHead(nn.Module): method __init__ (line 993) | def __init__(self, config): method forward (line 1002) | def forward( class SequenceSummary (line 1069) | class SequenceSummary(nn.Module): method __init__ (line 1085) | def __init__(self, config: PretrainedConfig): method forward (line 1114) | def forward(self, hidden_states, cls_index=None): function prune_linear_layer (line 1146) | def prune_linear_layer(layer, index, dim=0): function prune_conv1d_layer (line 1171) | def prune_conv1d_layer(layer, index, dim=1): function prune_layer (line 1195) | def prune_layer(layer, index, dim=None): function apply_chunking_to_forward (line 1208) | def apply_chunking_to_forward( FILE: bert/tokenization_bert.py function load_vocab (line 97) | def load_vocab(vocab_file): function whitespace_tokenize (line 108) | def whitespace_tokenize(text): class BertTokenizer (line 117) | class BertTokenizer(PreTrainedTokenizer): method __init__ (line 161) | def __init__( method vocab_size (line 199) | def vocab_size(self): method get_vocab (line 202) | def get_vocab(self): method _tokenize (line 205) | def _tokenize(self, text): method _convert_token_to_id (line 219) | def _convert_token_to_id(self, token): method _convert_id_to_token (line 223) | def _convert_id_to_token(self, index): method convert_tokens_to_string (line 227) | def convert_tokens_to_string(self, tokens): method build_inputs_with_special_tokens (line 232) | def build_inputs_with_special_tokens( method get_special_tokens_mask (line 258) | def get_special_tokens_mask( method create_token_type_ids_from_sequences (line 289) | def create_token_type_ids_from_sequences( method save_vocabulary (line 319) | def save_vocabulary(self, vocab_path): class BasicTokenizer (line 348) | class BasicTokenizer(object): method __init__ (line 351) | def __init__(self, do_lower_case=True, never_split=None, tokenize_chin... method tokenize (line 371) | def tokenize(self, text, never_split=None): method _run_strip_accents (line 403) | def _run_strip_accents(self, text): method _run_split_on_punc (line 414) | def _run_split_on_punc(self, text, never_split=None): method _tokenize_chinese_chars (line 436) | def _tokenize_chinese_chars(self, text): method _is_chinese_char (line 449) | def _is_chinese_char(self, cp): method _clean_text (line 473) | def _clean_text(self, text): class WordpieceTokenizer (line 487) | class WordpieceTokenizer(object): method __init__ (line 490) | def __init__(self, vocab, unk_token, max_input_chars_per_word=100): method tokenize (line 495) | def tokenize(self, text): FILE: bert/tokenization_utils.py function _is_whitespace (line 47) | def _is_whitespace(char): function _is_control (line 59) | def _is_control(char): function _is_punctuation (line 71) | def _is_punctuation(char): function _is_end_of_word (line 86) | def _is_end_of_word(text): function _is_start_of_word (line 92) | def _is_start_of_word(text): class PreTrainedTokenizer (line 98) | class PreTrainedTokenizer(PreTrainedTokenizerBase): method __init__ (line 156) | def __init__(self, **kwargs): method is_fast (line 166) | def is_fast(self) -> bool: method vocab_size (line 170) | def vocab_size(self) -> int: method get_vocab (line 174) | def get_vocab(self): method get_added_vocab (line 178) | def get_added_vocab(self) -> Dict[str, int]: method __len__ (line 181) | def __len__(self): method _add_tokens (line 185) | def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], ... method num_special_tokens_to_add (line 237) | def num_special_tokens_to_add(self, pair=False): method tokenize (line 256) | def tokenize(self, text: TextInput, **kwargs): method _tokenize (line 367) | def _tokenize(self, text, **kwargs): method convert_tokens_to_ids (line 376) | def convert_tokens_to_ids(self, tokens): method _convert_token_to_id_with_added_voc (line 391) | def _convert_token_to_id_with_added_voc(self, token): method _convert_token_to_id (line 399) | def _convert_token_to_id(self, token): method _encode_plus (line 402) | def _encode_plus( method _batch_encode_plus (line 476) | def _batch_encode_plus( method _batch_prepare_for_model (line 560) | def _batch_prepare_for_model( method prepare_for_tokenization (line 623) | def prepare_for_tokenization(self, text: str, is_pretokenized=False, *... method get_special_tokens_mask (line 631) | def get_special_tokens_mask( method convert_ids_to_tokens (line 650) | def convert_ids_to_tokens( method _convert_id_to_token (line 675) | def _convert_id_to_token(self, index: int) -> str: method convert_tokens_to_string (line 678) | def convert_tokens_to_string(self, tokens: List[str]) -> str: method decode (line 685) | def decode( method save_vocabulary (line 715) | def save_vocabulary(self, save_directory) -> Tuple[str]: FILE: bert/tokenization_utils_base.py class ExplicitEnum (line 74) | class ExplicitEnum(Enum): method _missing_ (line 79) | def _missing_(cls, value): class TruncationStrategy (line 86) | class TruncationStrategy(ExplicitEnum): class PaddingStrategy (line 93) | class PaddingStrategy(ExplicitEnum): class TensorType (line 99) | class TensorType(ExplicitEnum): class CharSpan (line 105) | class CharSpan(NamedTuple): class TokenSpan (line 117) | class TokenSpan(NamedTuple): class BatchEncoding (line 129) | class BatchEncoding(UserDict): method __init__ (line 145) | def __init__( method is_fast (line 162) | def is_fast(self): method __getitem__ (line 169) | def __getitem__(self, item: Union[int, str]) -> EncodingFast: method __getattr__ (line 183) | def __getattr__(self, item: str): method __getstate__ (line 189) | def __getstate__(self): method __setstate__ (line 192) | def __setstate__(self, state): method keys (line 199) | def keys(self): method values (line 202) | def values(self): method items (line 205) | def items(self): method encodings (line 213) | def encodings(self) -> Optional[List[EncodingFast]]: method tokens (line 221) | def tokens(self, batch_index: int = 0) -> List[str]: method words (line 226) | def words(self, batch_index: int = 0) -> List[Optional[int]]: method token_to_word (line 231) | def token_to_word(self, batch_or_token_index: int, token_index: Option... method word_to_tokens (line 272) | def word_to_tokens(self, batch_or_word_index: int, word_index: Optiona... method token_to_chars (line 321) | def token_to_chars(self, batch_or_token_index: int, token_index: Optio... method char_to_token (line 362) | def char_to_token(self, batch_or_char_index: int, char_index: Optional... method word_to_chars (line 398) | def word_to_chars(self, batch_or_word_index: int, word_index: Optional... method char_to_word (line 439) | def char_to_word(self, batch_or_char_index: int, char_index: Optional[... method convert_to_tensors (line 476) | def convert_to_tensors(self, tensor_type: Union[None, str, TensorType]... method to (line 522) | def to(self, device: str): class SpecialTokensMixin (line 565) | class SpecialTokensMixin: method __init__ (line 583) | def __init__(self, verbose=True, **kwargs): method sanitize_special_tokens (line 610) | def sanitize_special_tokens(self) -> int: method add_special_tokens (line 619) | def add_special_tokens(self, special_tokens_dict: Dict[str, Union[str,... method add_tokens (line 680) | def add_tokens(self, new_tokens: Union[str, AddedToken, List[str], Lis... method bos_token (line 718) | def bos_token(self): method eos_token (line 726) | def eos_token(self): method unk_token (line 734) | def unk_token(self): method sep_token (line 742) | def sep_token(self): method pad_token (line 750) | def pad_token(self): method cls_token (line 758) | def cls_token(self): method mask_token (line 766) | def mask_token(self): method additional_special_tokens (line 774) | def additional_special_tokens(self): method bos_token (line 782) | def bos_token(self, value): method eos_token (line 786) | def eos_token(self, value): method unk_token (line 790) | def unk_token(self, value): method sep_token (line 794) | def sep_token(self, value): method pad_token (line 798) | def pad_token(self, value): method cls_token (line 802) | def cls_token(self, value): method mask_token (line 806) | def mask_token(self, value): method additional_special_tokens (line 810) | def additional_special_tokens(self, value): method bos_token_id (line 814) | def bos_token_id(self): method eos_token_id (line 821) | def eos_token_id(self): method unk_token_id (line 828) | def unk_token_id(self): method sep_token_id (line 835) | def sep_token_id(self): method pad_token_id (line 842) | def pad_token_id(self): method pad_token_type_id (line 849) | def pad_token_type_id(self): method cls_token_id (line 854) | def cls_token_id(self): method mask_token_id (line 861) | def mask_token_id(self): method additional_special_tokens_ids (line 868) | def additional_special_tokens_ids(self): method special_tokens_map (line 873) | def special_tokens_map(self): method special_tokens_map_extended (line 887) | def special_tokens_map_extended(self): method all_special_tokens (line 902) | def all_special_tokens(self): method all_special_tokens_extended (line 912) | def all_special_tokens_extended(self): method all_special_ids (line 926) | def all_special_ids(self): class PreTrainedTokenizerBase (line 1015) | class PreTrainedTokenizerBase(SpecialTokensMixin): method __init__ (line 1029) | def __init__(self, **kwargs): method max_len (line 1049) | def max_len(self) -> int: method max_len_single_sentence (line 1056) | def max_len_single_sentence(self) -> int: method max_len_sentences_pair (line 1060) | def max_len_sentences_pair(self) -> int: method max_len_single_sentence (line 1064) | def max_len_single_sentence(self, value) -> int: method max_len_sentences_pair (line 1076) | def max_len_sentences_pair(self, value) -> int: method from_pretrained (line 1088) | def from_pretrained(cls, *inputs, **kwargs): method _from_pretrained (line 1143) | def _from_pretrained(cls, pretrained_model_name_or_path, *init_inputs,... method save_pretrained (line 1334) | def save_pretrained(self, save_directory) -> Tuple[str]: method encode (line 1389) | def encode( method num_special_tokens_to_add (line 1430) | def num_special_tokens_to_add(self, pair: bool = False) -> int: method _get_padding_truncation_strategies (line 1433) | def _get_padding_truncation_strategies( method __call__ (line 1551) | def __call__( method encode_plus (line 1673) | def encode_plus( method _encode_plus (line 1740) | def _encode_plus( method batch_encode_plus (line 1764) | def batch_encode_plus( method _batch_encode_plus (line 1835) | def _batch_encode_plus( method pad (line 1864) | def pad( method create_token_type_ids_from_sequences (line 1964) | def create_token_type_ids_from_sequences(self, token_ids_0: List, toke... method build_inputs_with_special_tokens (line 1969) | def build_inputs_with_special_tokens(self, token_ids_0: List, token_id... method prepare_for_model (line 1979) | def prepare_for_model( method truncate_sequences (line 2103) | def truncate_sequences( method _pad (line 2183) | def _pad( method batch_decode (line 2253) | def batch_decode(self, sequences: List[List[int]], **kwargs) -> List[s... method decode (line 2256) | def decode( method get_special_tokens_mask (line 2271) | def get_special_tokens_mask( method clean_up_tokenization (line 2302) | def clean_up_tokenization(out_string: str) -> str: FILE: data/dataset_refer_bert.py class ReferDataset (line 24) | class ReferDataset(data.Dataset): method __init__ (line 26) | def __init__(self, method get_classes (line 80) | def get_classes(self): method __len__ (line 83) | def __len__(self): method __getitem__ (line 86) | def __getitem__(self, index): FILE: demo_inference.py class args (line 50) | class args: function overlay_davis (line 82) | def overlay_davis(image, mask, colors=[[0, 0, 0], [255, 0, 0]], cscale=1... FILE: lib/_utils.py class _LAVTSimpleDecode (line 9) | class _LAVTSimpleDecode(nn.Module): method __init__ (line 10) | def __init__(self, backbone, classifier): method forward (line 15) | def forward(self, x, l_feats, l_mask): class LAVT (line 25) | class LAVT(_LAVTSimpleDecode): class _LAVTOneSimpleDecode (line 32) | class _LAVTOneSimpleDecode(nn.Module): method __init__ (line 33) | def __init__(self, backbone, classifier, args): method forward (line 40) | def forward(self, x, text, l_mask): class LAVTOne (line 55) | class LAVTOne(_LAVTOneSimpleDecode): FILE: lib/backbone.py class Mlp (line 11) | class Mlp(nn.Module): method __init__ (line 14) | def __init__(self, in_features, hidden_features=None, out_features=Non... method forward (line 23) | def forward(self, x): function window_partition (line 32) | def window_partition(x, window_size): function window_reverse (line 47) | def window_reverse(windows, window_size, H, W): class WindowAttention (line 64) | class WindowAttention(nn.Module): method __init__ (line 78) | def __init__(self, dim, window_size, num_heads, qkv_bias=True, qk_scal... method forward (line 112) | def forward(self, x, mask=None): class SwinTransformerBlock (line 145) | class SwinTransformerBlock(nn.Module): method __init__ (line 163) | def __init__(self, dim, num_heads, window_size=7, shift_size=0, method forward (line 187) | def forward(self, x, mask_matrix): class PatchMerging (line 247) | class PatchMerging(nn.Module): method __init__ (line 254) | def __init__(self, dim, norm_layer=nn.LayerNorm): method forward (line 260) | def forward(self, x, H, W): class PatchEmbed (line 290) | class PatchEmbed(nn.Module): method __init__ (line 300) | def __init__(self, patch_size=4, in_chans=3, embed_dim=96, norm_layer=... method forward (line 314) | def forward(self, x): class MultiModalSwinTransformer (line 333) | class MultiModalSwinTransformer(nn.Module): method __init__ (line 334) | def __init__(self, method _freeze_stages (line 419) | def _freeze_stages(self): method init_weights (line 436) | def init_weights(self, pretrained=None): method forward (line 462) | def forward(self, x, l, l_mask): method train (line 489) | def train(self, mode=True): class MMBasicLayer (line 495) | class MMBasicLayer(nn.Module): method __init__ (line 496) | def __init__(self, method forward (line 557) | def forward(self, x, H, W, l, l_mask): class PWAM (line 606) | class PWAM(nn.Module): method __init__ (line 607) | def __init__(self, dim, v_in_channels, l_in_channels, key_channels, va... method forward (line 627) | def forward(self, x, l, l_mask): class SpatialImageLanguageAttention (line 643) | class SpatialImageLanguageAttention(nn.Module): method __init__ (line 644) | def __init__(self, v_in_channels, l_in_channels, key_channels, value_c... method forward (line 681) | def forward(self, x, l, l_mask): FILE: lib/mask_predictor.py class SimpleDecoding (line 7) | class SimpleDecoding(nn.Module): method __init__ (line 8) | def __init__(self, c4_dims, factor=2): method forward (line 40) | def forward(self, x_c4, x_c3, x_c2, x_c1): FILE: lib/mmcv_custom/checkpoint.py function _get_mmcv_home (line 30) | def _get_mmcv_home(): function load_state_dict (line 41) | def load_state_dict(module, state_dict, strict=False, logger=None): function load_url_dist (line 110) | def load_url_dist(url, model_dir=None): function load_pavimodel_dist (line 124) | def load_pavimodel_dist(model_path, map_location=None): function load_fileclient_dist (line 152) | def load_fileclient_dist(filename, backend, map_location): function get_torchvision_models (line 173) | def get_torchvision_models(): function get_external_models (line 185) | def get_external_models(): function get_mmcls_models (line 199) | def get_mmcls_models(): function get_deprecated_model_names (line 206) | def get_deprecated_model_names(): function _process_mmcls_checkpoint (line 215) | def _process_mmcls_checkpoint(checkpoint): function _load_checkpoint (line 226) | def _load_checkpoint(filename, map_location=None): function load_checkpoint (line 287) | def load_checkpoint(model, function weights_to_cpu (line 363) | def weights_to_cpu(state_dict): function _save_to_state_dict (line 378) | def _save_to_state_dict(module, destination, prefix, keep_vars): function get_state_dict (line 398) | def get_state_dict(module, destination=None, prefix='', keep_vars=False): function save_checkpoint (line 442) | def save_checkpoint(model, filename, optimizer=None, meta=None): FILE: lib/segmentation.py function _segm_lavt (line 11) | def _segm_lavt(pretrained, args): function _load_model_lavt (line 68) | def _load_model_lavt(pretrained, args): function lavt (line 73) | def lavt(pretrained='', args=None): function _segm_lavt_one (line 80) | def _segm_lavt_one(pretrained, args): function _load_model_lavt_one (line 137) | def _load_model_lavt_one(pretrained, args): function lavt_one (line 142) | def lavt_one(pretrained='', args=None): FILE: refer/evaluation/bleu/bleu.py class Bleu (line 14) | class Bleu: method __init__ (line 15) | def __init__(self, n=4): method compute_score (line 21) | def compute_score(self, gts, res): method method (line 46) | def method(self): FILE: refer/evaluation/bleu/bleu_scorer.py function precook (line 23) | def precook(s, n=4, out=False): function cook_refs (line 35) | def cook_refs(refs, eff=None, n=4): ## lhuang: oracle will call with "av... function cook_test (line 60) | def cook_test(test, (reflen, refmaxcounts), eff=None, n=4): class BleuScorer (line 85) | class BleuScorer(object): method copy (line 92) | def copy(self): method __init__ (line 100) | def __init__(self, test=None, refs=None, n=4, special_reflen=None): method cook_append (line 109) | def cook_append(self, test, refs): method ratio (line 122) | def ratio(self, option=None): method score_ratio (line 126) | def score_ratio(self, option=None): method score_ratio_str (line 130) | def score_ratio_str(self, option=None): method reflen (line 133) | def reflen(self, option=None): method testlen (line 137) | def testlen(self, option=None): method retest (line 141) | def retest(self, new_test): method rescore (line 152) | def rescore(self, new_test): method size (line 157) | def size(self): method __iadd__ (line 161) | def __iadd__(self, other): method compatible (line 175) | def compatible(self, other): method single_reflen (line 178) | def single_reflen(self, option="average"): method _single_reflen (line 181) | def _single_reflen(self, reflens, option=None, testlen=None): method recompute_score (line 194) | def recompute_score(self, option=None, verbose=0): method compute_score (line 198) | def compute_score(self, option=None, verbose=0): FILE: refer/evaluation/cider/cider.py class Cider (line 13) | class Cider: method __init__ (line 18) | def __init__(self, test=None, refs=None, n=4, sigma=6.0): method compute_score (line 24) | def compute_score(self, gts, res): method method (line 53) | def method(self): FILE: refer/evaluation/cider/cider_scorer.py function precook (line 11) | def precook(s, n=4, out=False): function cook_refs (line 28) | def cook_refs(refs, n=4): ## lhuang: oracle will call with "average" function cook_test (line 38) | def cook_test(test, n=4): class CiderScorer (line 47) | class CiderScorer(object): method copy (line 51) | def copy(self): method __init__ (line 58) | def __init__(self, test=None, refs=None, n=4, sigma=6.0): method cook_append (line 68) | def cook_append(self, test, refs): method size (line 78) | def size(self): method __iadd__ (line 82) | def __iadd__(self, other): method compute_doc_freq (line 93) | def compute_doc_freq(self): method compute_cider (line 106) | def compute_cider(self): method compute_score (line 183) | def compute_score(self, option=None, verbose=0): FILE: refer/evaluation/meteor/meteor.py class Meteor (line 15) | class Meteor: method __init__ (line 17) | def __init__(self): method compute_score (line 28) | def compute_score(self, gts, res): method method (line 48) | def method(self): method _stat (line 51) | def _stat(self, hypothesis_str, reference_list): method _score (line 58) | def _score(self, hypothesis_str, reference_list): method __exit__ (line 72) | def __exit__(self): FILE: refer/evaluation/refEvaluation.py class RefEvaluation (line 16) | class RefEvaluation: method __init__ (line 17) | def __init__ (self, refer, Res): method evaluate (line 28) | def evaluate(self): method setEval (line 72) | def setEval(self, score, method): method setRefToEvalRefs (line 75) | def setRefToEvalRefs(self, scores, refIds, method): method setEvalRefs (line 82) | def setEvalRefs(self): FILE: refer/evaluation/rouge/rouge.py function my_lcs (line 13) | def my_lcs(string, sub): class Rouge (line 36) | class Rouge(): method __init__ (line 41) | def __init__(self): method calc_score (line 45) | def calc_score(self, candidate, refs): method compute_score (line 77) | def compute_score(self, gts, res): method method (line 104) | def method(self): FILE: refer/evaluation/tokenizer/ptbtokenizer.py class PTBTokenizer (line 24) | class PTBTokenizer: method tokenize (line 27) | def tokenize(self, captions_for_image): FILE: refer/external/maskApi.c function uint (line 11) | uint umin( uint a, uint b ) { return (ab) ? a : b; } function rleInit (line 14) | void rleInit( RLE *R, siz h, siz w, siz m, uint *cnts ) { function rleFree (line 19) | void rleFree( RLE *R ) { function rlesInit (line 23) | void rlesInit( RLE **R, siz n ) { function rlesFree (line 28) | void rlesFree( RLE **R, siz n ) { function rleEncode (line 32) | void rleEncode( RLE *R, const byte *M, siz h, siz w, siz n ) { function rleDecode (line 43) | void rleDecode( const RLE *R, byte *M, siz n ) { function rleMerge (line 49) | void rleMerge( const RLE *R, RLE *M, siz n, int intersect ) { function rleArea (line 72) | void rleArea( const RLE *R, siz n, uint *a ) { function rleIou (line 77) | void rleIou( RLE *dt, RLE *gt, siz m, siz n, byte *iscrowd, double *o ) { function rleNms (line 98) | void rleNms( RLE *dt, siz n, uint *keep, double thr ) { function bbIou (line 109) | void bbIou( BB dt, BB gt, siz m, siz n, byte *iscrowd, double *o ) { function bbNms (line 122) | void bbNms( BB dt, siz n, uint *keep, double thr ) { function rleToBbox (line 133) | void rleToBbox( const RLE *R, BB bb, siz n ) { function rleFrBbox (line 148) | void rleFrBbox( RLE *R, const BB bb, siz h, siz w, siz n ) { function uintCompare (line 157) | int uintCompare(const void *a, const void *b) { function rleFrPoly (line 161) | void rleFrPoly( RLE *R, const double *xy, siz k, siz h, siz w ) { function rleFrString (line 217) | void rleFrString( RLE *R, char *s, siz h, siz w ) { FILE: refer/external/maskApi.h type uint (line 9) | typedef unsigned int uint; type siz (line 10) | typedef unsigned long siz; type byte (line 11) | typedef unsigned char byte; type RLE (line 13) | typedef struct { siz h, w, m; uint *cnts; } RLE; FILE: refer/refer.py class REFER (line 40) | class REFER: method __init__ (line 42) | def __init__(self, data_root, dataset='refcoco', splitBy='unc'): method createIndex (line 78) | def createIndex(self): method getRefIds (line 141) | def getRefIds(self, image_ids=[], cat_ids=[], ref_ids=[], split=''): method getAnnIds (line 172) | def getAnnIds(self, image_ids=[], cat_ids=[], ref_ids=[]): method getImgIds (line 193) | def getImgIds(self, ref_ids=[]): method getCatIds (line 202) | def getCatIds(self): method loadRefs (line 205) | def loadRefs(self, ref_ids=[]): method loadAnns (line 211) | def loadAnns(self, ann_ids=[]): method loadImgs (line 217) | def loadImgs(self, image_ids=[]): method loadCats (line 223) | def loadCats(self, cat_ids=[]): method getRefBox (line 229) | def getRefBox(self, ref_id): method showRef (line 234) | def showRef(self, ref, seg_box='seg'): method getMask (line 277) | def getMask(self, ref): method showMask (line 295) | def showMask(self, ref): FILE: test.py function get_dataset (line 21) | def get_dataset(image_set, transform, args): function evaluate (line 33) | def evaluate(model, data_loader, bert_model, device): function get_transform (line 92) | def get_transform(args): function computeIoU (line 101) | def computeIoU(pred_seg, gd_seg): function main (line 108) | def main(args): FILE: train.py function get_dataset (line 26) | def get_dataset(image_set, transform, args): function IoU (line 39) | def IoU(pred, gt): function get_transform (line 53) | def get_transform(args): function criterion (line 62) | def criterion(input, target): function evaluate (line 67) | def evaluate(model, data_loader, bert_model): function train_one_epoch (line 126) | def train_one_epoch(model, criterion, optimizer, data_loader, lr_schedul... function main (line 174) | def main(args): FILE: transforms.py function pad_if_smaller (line 10) | def pad_if_smaller(img, size, fill=0): class Compose (line 20) | class Compose(object): method __init__ (line 21) | def __init__(self, transforms): method __call__ (line 24) | def __call__(self, image, target): class Resize (line 30) | class Resize(object): method __init__ (line 31) | def __init__(self, h, w): method __call__ (line 35) | def __call__(self, image, target): class RandomResize (line 43) | class RandomResize(object): method __init__ (line 44) | def __init__(self, min_size, max_size=None): method __call__ (line 50) | def __call__(self, image, target): class RandomHorizontalFlip (line 59) | class RandomHorizontalFlip(object): method __init__ (line 60) | def __init__(self, flip_prob): method __call__ (line 63) | def __call__(self, image, target): class RandomCrop (line 70) | class RandomCrop(object): method __init__ (line 71) | def __init__(self, size): method __call__ (line 74) | def __call__(self, image, target): class CenterCrop (line 83) | class CenterCrop(object): method __init__ (line 84) | def __init__(self, size): method __call__ (line 87) | def __call__(self, image, target): class ToTensor (line 93) | class ToTensor(object): method __call__ (line 94) | def __call__(self, image, target): class RandomAffine (line 100) | class RandomAffine(object): method __init__ (line 101) | def __init__(self, angle, translate, scale, shear, resample=0, fillcol... method __call__ (line 109) | def __call__(self, image, target): class Normalize (line 116) | class Normalize(object): method __init__ (line 117) | def __init__(self, mean, std): method __call__ (line 121) | def __call__(self, image, target): FILE: utils.py class SmoothedValue (line 16) | class SmoothedValue(object): method __init__ (line 21) | def __init__(self, window_size=20, fmt=None): method update (line 29) | def update(self, value, n=1): method synchronize_between_processes (line 34) | def synchronize_between_processes(self): method median (line 48) | def median(self): method avg (line 53) | def avg(self): method global_avg (line 58) | def global_avg(self): method max (line 62) | def max(self): method value (line 66) | def value(self): method __str__ (line 69) | def __str__(self): class MetricLogger (line 78) | class MetricLogger(object): method __init__ (line 79) | def __init__(self, delimiter="\t"): method update (line 83) | def update(self, **kwargs): method __getattr__ (line 90) | def __getattr__(self, attr): method __str__ (line 98) | def __str__(self): method synchronize_between_processes (line 106) | def synchronize_between_processes(self): method add_meter (line 110) | def add_meter(self, name, meter): method log_every (line 113) | def log_every(self, iterable, print_freq, header=None): function mkdir (line 153) | def mkdir(path): function setup_for_distributed (line 161) | def setup_for_distributed(is_master): function is_dist_avail_and_initialized (line 176) | def is_dist_avail_and_initialized(): function get_world_size (line 184) | def get_world_size(): function get_rank (line 190) | def get_rank(): function is_main_process (line 196) | def is_main_process(): function save_on_master (line 200) | def save_on_master(*args, **kwargs): function init_distributed_mode (line 205) | def init_distributed_mode(args):