MCPcopy Create free account

hub / github.com/HA-Transformer/MAT / functions

Functions2,038 in github.com/HA-Transformer/MAT

↓ 228 callersFunctionprint
(*args, **kwargs)
fairseq/distributed_utils.py:103
↓ 188 callersMethodsize
(self, index)
fairseq/data/list_dataset.py:25
↓ 89 callersMethodpad
Helper to get index of pad symbol
fairseq/data/dictionary.py:162
↓ 86 callersMethodeos
Helper to get index of end-of-sentence symbol
fairseq/data/dictionary.py:166
↓ 52 callersMethodadd_symbol
Adds a word to the dictionary
fairseq/data/dictionary.py:87
↓ 47 callersMethodexists
(path)
fairseq/data/indexed_dataset.py:172
↓ 42 callersMethodget_meter
Get a specific meter by name.
fairseq/trainer.py:480
↓ 40 callersMethodlog
Log intermediate stats according to log_interval.
fairseq/progress_bar.py:91
↓ 38 callersFunctioneval
(model)
fairseq/utils.py:349
↓ 35 callersMethodupdate
(self, val=1)
fairseq/meters.py:37
↓ 31 callersMethodunk
Helper to get index of unk symbol
fairseq/data/dictionary.py:170
↓ 29 callersFunctionLayerNorm
(normalized_shape, eps=1e-5, elementwise_affine=True, export=False)
fairseq/modules/layer_norm.py:9
↓ 28 callersMethodassertHypoScore
(self, hypo, pos_probs, normalized=True, lenpen=1.)
tests/test_sequence_generator.py:21
↓ 28 callersMethodassertHypoTokens
(self, hypo, tokens)
tests/test_sequence_generator.py:18
↓ 27 callersMethodencode_line
(self, line, line_tokenizer=tokenize_line, add_if_not_exist=True, consumer=None, append_eo
fairseq/data/dictionary.py:244
↓ 27 callersMethodload
Loads the dictionary from a text file with the format: ``` <symbol0> <count0> <symbol1> <count1> ... ```
fairseq/data/dictionary.py:175
↓ 21 callersMethodadd
(self, ref, pred)
fairseq/bleu.py:294
↓ 20 callersFunctioncreate_dummy_data
(data_dir, num_examples=1000, maxlen=20)
tests/test_binaries.py:424
↓ 19 callersFunctiongenerate_main
(data_dir, extra_flags=None)
tests/test_binaries.py:499
↓ 19 callersMethodsize
Return an example's size as a float or tuple. This value is used when filtering a dataset with ``--max-positions``.
examples/speech_recognition/data/asr_dataset.py:99
↓ 18 callersMethodmax_positions
Maximum input length supported by the encoder.
fairseq/models/lstm.py:270
↓ 18 callersFunctiontrain_translation_model
(data_dir, arch, extra_flags=None, task='translation', run_validation=False)
tests/test_binaries.py:462
↓ 17 callersMethodget_num_updates
Get the number of parameters updates.
fairseq/trainer.py:486
↓ 16 callersFunctionLinear
Weight-normalized Linear layer (input: N x T x C)
fairseq/models/fconv_self_att.py:503
↓ 16 callersMethoddataset
Return a loaded dataset split. Args: split (str): name of the split (e.g., train, valid, test) Returns:
fairseq/tasks/fairseq_task.py:73
↓ 16 callersMethodnext_epoch_itr
Return a new iterator over the dataset. Args: shuffle (bool, optional): shuffle batches before returning the iter
fairseq/data/iterators.py:164
↓ 16 callersFunctionpreprocess_translation_data
(data_dir, extra_flags=None)
tests/test_binaries.py:445
↓ 16 callersMethodstring
Helper for converting a tensor of token indices to a string. Can optionally remove BPE symbols or escape <unk> words.
fairseq/data/dictionary.py:63
↓ 16 callersMethodwrite
(self, sizes)
fairseq/data/indexed_dataset.py:379
↓ 16 callersMethodwrite
(self, data)
scripts/wav2vec_featurize.py:100
↓ 14 callersMethodupdate
Updates counts from new dictionary.
fairseq/data/dictionary.py:100
↓ 12 callersFunctionLinear
(in_features, out_features, bias=True)
fairseq/models/lightconv.py:657
↓ 12 callersFunction_current_postion_info
()
tests/speech_recognition/asr_test_base.py:126
↓ 11 callersMethodfc1
(self, x)
fairseq/models/transformer_mb/transformer_mb_layer.py:105
↓ 11 callersMethodfc2
(self, x)
fairseq/models/transformer_mb/transformer_mb_layer.py:109
↓ 11 callersMethodget_batch_iterator
Get an iterator that yields batches of data from the given dataset. Args: dataset (~fairseq.data.FairseqDataset): datase
fairseq/tasks/fairseq_task.py:90
↓ 11 callersFunctionmerge_branches
Merge branches. branch_outputs: list of Tensor or tuple of Tensors
fairseq/models/transformer_mb/transformer_mb_layer.py:10
↓ 11 callersMethodreset
(self, one_init=False)
fairseq/bleu.py:288
↓ 11 callersMethodsave
Stores dictionary into a text file
fairseq/data/dictionary.py:234
↓ 11 callersMethodset_lr
(self, lr)
fairseq/optim/bmuf.py:71
↓ 11 callersMethodsetup_task
(cls, args, src_dict=None, tgt_dict=None, model=None)
tests/utils.py:140
↓ 10 callersMethodget_lr
(self)
fairseq/optim/bmuf.py:68
↓ 10 callersMethodstart
(self)
fairseq/meters.py:54
↓ 9 callersFunctionLinear
Weight-normalized Linear layer (input: B x T x C)
fairseq/modules/downsampled_multihead_attention.py:240
↓ 9 callersFunctionLinear
Weight-normalized Linear layer (input: N x T x C)
fairseq/models/fconv.py:575
↓ 9 callersMethodbuild_model
(cls, args, task)
tests/utils.py:160
↓ 9 callersMethodencode
(self, sentence: str)
fairseq/hub_utils.py:201
↓ 9 callersMethodfinalize
Sort symbols by frequency in descending order, ignoring special ones. Args: - threshold defines the minimum word count
fairseq/data/dictionary.py:113
↓ 9 callersMethodgenerate
Generate a batch of translations. Args: models (List[~fairseq.models.FairseqModel]): ensemble of models sample (dict)
fairseq/sequence_generator.py:101
↓ 9 callersMethodmax_positions
Maximum length supported by the model.
fairseq/models/fairseq_model.py:57
↓ 9 callersMethodseek
(self, i)
fairseq/data/token_block_dataset.py:210
↓ 9 callersMethodstop
(self, n=1)
fairseq/meters.py:57
↓ 8 callersMethod_get_test_data_with_bpe_cont_marker
Args: append_eos: if True, each input sentence in the source tokens tensor will have an EOS appended to the end.
tests/test_noising.py:22
↓ 8 callersMethod_set_input_buffer
(self, incremental_state, new_buffer)
fairseq/modules/dynamic_convolution.py:211
↓ 8 callersMethodadd_args
Add optimizer-specific arguments to the parser.
fairseq/optim/sgd.py:18
↓ 8 callersMethodassert_word_shuffle_matches_expected
This verifies that with a given x, x_len, max_shuffle_distance, and vocab, we get the expected shuffle result. Args:
tests/test_noising.py:194
↓ 8 callersMethoddecode
(self, sentence: str)
fairseq/hub_utils.py:204
↓ 8 callersFunctionget_dummy_input
(T=100, D=80, B=5, K=100)
tests/speech_recognition/asr_test_base.py:70
↓ 8 callersMethodhypoScore
(self, hypo, pos_probs, normalized=True, lenpen=1.)
tests/test_sequence_generator.py:353
↓ 8 callersMethodhypoTokens
(self, hypo, tokens)
tests/test_sequence_generator.py:350
↓ 8 callersMethodload_dataset
Load a given dataset split. Args: split (str): name of the split (e.g., train, valid, test)
fairseq/tasks/masked_lm.py:74
↓ 8 callersMethodmake_generation_fast_
(self, need_attn=False, **kwargs)
fairseq/models/lstm.py:467
↓ 8 callersMethodstate_dict
(self)
fairseq/optim/bmuf.py:74
↓ 7 callersFunctionPositionalEmbedding
( num_embeddings: int, embedding_dim: int, padding_idx: int, learned: bool = F
fairseq/modules/positional_embedding.py:12
↓ 7 callersMethod__init__
(self, pad_left, pad_right)
fairseq/models/wav2vec.py:302
↓ 7 callersMethodbackward
(ctx, grad)
fairseq/modules/scalar_bias.py:26
↓ 7 callersMethodbos
Helper to get index of beginning-of-sentence symbol
fairseq/data/dictionary.py:158
↓ 7 callersFunctiondata_file_path
(prefix_path)
fairseq/data/indexed_dataset.py:106
↓ 7 callersMethoddecoder
(self)
fairseq/models/fairseq_model.py:335
↓ 7 callersMethodencoder
(self)
fairseq/models/fairseq_model.py:331
↓ 7 callersMethodgenerate
Score a batch of translations.
fairseq/sequence_scorer.py:21
↓ 7 callersMethodgenerate_unchanged_shuffle_map
(self, length)
tests/test_noising.py:191
↓ 7 callersMethodget_targets
(self, *unused)
fairseq/criterions/composite_loss.py:52
↓ 7 callersMethodhas_next
Whether the iterator has been exhausted.
fairseq/data/iterators.py:42
↓ 7 callersMethodinference_step
(self, generator, models, sample, prefix_tokens=None)
fairseq/tasks/fairseq_task.py:242
↓ 7 callersMethodload_state_dict
(self, state_dict, optimizer_overrides=None)
fairseq/optim/bmuf.py:77
↓ 7 callersMethodsetup_task
(cls, args, **kwargs)
fairseq/tasks/masked_lm.py:67
↓ 7 callersMethodtrain
(mode=True)
fairseq/models/fairseq_model.py:123
↓ 6 callersFunctionLinear
Linear layer (input: N x T x C)
fairseq/models/lstm.py:494
↓ 6 callersFunctionLinear
Linear layer (input: N x T x C)
examples/speech_recognition/models/vggtransformer.py:720
↓ 6 callersFunction_create_dummy_data
(filename)
tests/test_binaries.py:426
↓ 6 callersMethodadd
increments counters for the sum of log probs of current word and next word (given context ending at current word). Since the next word mi
eval_lm.py:29
↓ 6 callersMethodalter_dataset_langtok
(self, lang_pair_dataset, src_eos=None, src_lang=None, tgt_eos=None, tgt_lang=No
fairseq/tasks/multilingual_translation.py:171
↓ 6 callersFunctionbase_lm_architecture
(args)
fairseq/models/transformer_lm.py:142
↓ 6 callersMethodbuild_generator
(self, args)
fairseq/tasks/fairseq_task.py:184
↓ 6 callersMethodcumsum
(sequence, sample_ratios)
fairseq/data/concat_dataset.py:16
↓ 6 callersFunctiondict_path
(lang)
preprocess.py:45
↓ 6 callersFunctiondict_path
(lang)
fairseq_cli/preprocess.py:45
↓ 6 callersMethodforward
(self, src_tokens, src_lengths)
tests/speech_recognition/asr_test_base.py:493
↓ 6 callersMethodindex
Returns the index of the specified symbol
fairseq/data/dictionary.py:56
↓ 6 callersFunctionindex_file_path
(prefix_path)
fairseq/data/indexed_dataset.py:102
↓ 6 callersMethodload_checkpoint
Load all training state from a checkpoint file.
fairseq/trainer.py:134
↓ 6 callersMethodload_dictionary
Load the dictionary from the filename Args: filename (str): the filename
fairseq/tasks/fairseq_task.py:28
↓ 6 callersMethodmaybe_layer_norm
(self, layer_norm, x, before=False, after=False)
fairseq/modules/transformer_layer.py:263
↓ 6 callersMethodmaybe_layer_norm
(self, layer_norm, x, before=False, after=False)
fairseq/models/lightconv.py:635
↓ 6 callersMethodmaybe_layer_norm
(self, layer_norm, x, before=False, after=False)
fairseq/models/transformer_mb/transformer_mb_layer.py:368
↓ 6 callersMethodprint
Print end-of-epoch stats.
fairseq/progress_bar.py:95
↓ 6 callersFunctionsplit_exists
(split, src, tgt, lang, data_path)
fairseq/tasks/translation.py:27
↓ 5 callersMethod__init__
(self, *args, **kwargs)
fairseq/models/fairseq_model.py:253
↓ 5 callersMethod_build_dataset
(self, data, **kwargs)
tests/test_token_block_dataset.py:17
next →1–100 of 2,038, ranked by callers