MCPcopy Create free account

hub / github.com/audioku/meta-transfer-learning / functions

Functions269 in github.com/audioku/meta-transfer-learning

↓ 20 callersMethodzero_grad
(self)
utils/optimizer.py:24
↓ 19 callersMethodstep
Update parameters and rate
utils/optimizer.py:15
↓ 18 callersMethodinit_hidden
(self, bsz)
lm/model/rnn_model.py:64
↓ 12 callersFunctioncompute_num_params
Computes number of trainable and non-trainable parameters
utils/functions.py:36
↓ 12 callersFunctionpost_process
(string, special_token_list)
utils/functions.py:360
↓ 12 callersMethodtrain
Training args: model: Model object train_loader: DataLoader object of the training set valid
trainer/asr/trainer.py:64
↓ 9 callersMethodsample
(self, manifest_id, i)
lm/util/data.py:46
↓ 8 callersFunctioncalculate_cer
Computes the Character Error Rate, defined as the edit distance. Arguments: s1 (string): space-separated sentence (hyp)
utils/metrics.py:38
↓ 8 callersFunctionsave_meta_model
Saving model, TODO adding history
utils/functions.py:101
↓ 8 callersMethodwrite
(self, message)
utils/logger.py:13
↓ 7 callersMethod__init__
(self, dim_model, max_length=2000)
modules/common_layers.py:90
↓ 7 callersFunctionis_contain_chinese_word
(seq)
lm/util/texthelper.py:150
↓ 6 callersFunctioncalculate_wer
Computes the Word Error Rate, defined as the edit distance between the two provided sentences after tokenizing to words. Arguments:
utils/metrics.py:48
↓ 6 callersMethoddecode
args: encoder_padded_outputs: B x T x H padded_input: B x T x D input_lengths: B output:
models/asr/transformer.py:100
↓ 6 callersMethodflush
(self)
utils/logger.py:17
↓ 6 callersMethodget_lr
(self, optimizer)
trainer/asr/joint_trainer.py:93
↓ 6 callersMethodget_lr
(self, optimizer)
trainer/asr/multitask_joint_trainer.py:93
↓ 6 callersFunctioninit_transformer_model
Initiate a new transformer object
utils/functions.py:307
↓ 6 callersFunctionis_contain_chinese_word
Check if the sequence has chinese character(s) args: seq: String output: boolean
utils/data.py:71
↓ 6 callersFunctionsave_discriminator
Saving discriminator
utils/functions.py:73
↓ 6 callersMethodzero_copy_grad
(self)
models/asr/transformer.py:211
↓ 5 callersMethod__init__
Adds noise to an input signal with specific SNR. Higher the noise level, the more noise added. Modified code from https://github.co
utils/data_loader.py:368
↓ 5 callersMethodadd_label
(self, label)
utils/data.py:24
↓ 5 callersMethodadd_token
(self, token)
utils/data.py:18
↓ 5 callersFunctionbatchify
(data, bsz)
lm/test.py:110
↓ 5 callersFunctionbatchify
(data, bsz)
lm/main_joint.py:96
↓ 5 callersFunctionbatchify
(data, bsz)
lm/main_meta_transfer.py:98
↓ 5 callersFunctionbatchify
(data, bsz)
lm/convert.py:110
↓ 5 callersFunctioncalculate_metrics
Calculate metrics args: pred: B x T x C gold: B x T input_lengths: B (for CTC) target_lengths: B (for C
utils/metrics.py:68
↓ 5 callersMethodencode
args: padded_input: B x 1 (channel for spectrogram=1) x (freq) x T padded_input: B x T x D input_leng
models/asr/transformer.py:78
↓ 5 callersFunctionevaluate
(data_source, type_evaluation="val")
lm/main_joint.py:212
↓ 5 callersFunctionevaluate
(data_source, type_evaluation="val")
lm/main_meta_transfer.py:214
↓ 5 callersMethodforward_one_batch
(self, model, vocab, src, trg, src_percentages, src_lengths, trg_lengths, smoothing, loss_type, verbose=False,
trainer/asr/meta_trainer.py:25
↓ 5 callersFunctionrepackage_hidden
Wraps hidden states in new Tensors, to detach them from their history.
lm/test.py:157
↓ 5 callersFunctionrepackage_hidden
Wraps hidden states in new Tensors, to detach them from their history.
lm/convert.py:157
↓ 5 callersMethodtokenize
Tokenizes a text file.
lm/util/data.py:146
↓ 4 callersFunctionevaluate
(data_source, type_evaluation="val")
lm/finetune.py:211
↓ 4 callersMethodforward_one_batch
(self, model, vocab, src, trg, src_percentages, src_lengths, trg_lengths, smoothing, loss_type, verbose=False,
trainer/asr/joint_trainer.py:25
↓ 4 callersMethodforward_one_batch
(self, model, vocab, src, trg, src_percentages, src_lengths, trg_lengths, smoothing, loss_type, verbose=False,
trainer/asr/multitask_joint_trainer.py:25
↓ 4 callersMethodget_lr
(self, optimizer)
trainer/asr/meta_trainer.py:88
↓ 4 callersFunctionget_word_segments_per_language
Get word segments args: seq: String output: word_segments: list of String
utils/data.py:84
↓ 4 callersMethodinit_copy_grad_
(self)
modules/discriminator.py:27
↓ 4 callersMethodinit_copy_grad_
(self)
models/asr/transformer.py:205
↓ 4 callersMethodparse_audio
:param audio_path: Path where audio is stored from the manifest file :return: Audio in training/testing format
utils/data_loader.py:37
↓ 4 callersMethodparse_transcript
(self, transcript_path)
utils/data_loader.py:342
↓ 4 callersFunctionsave_joint_model
Saving model, TODO adding history
utils/functions.py:43
↓ 4 callersMethodtrain_one_batch
(self, model, vocab, src, trg, src_percentages, src_lengths, trg_lengths, smoothing, loss_type)
trainer/asr/trainer.py:25
↓ 3 callersMethodadd_copy_grad
(self)
models/asr/transformer.py:219
↓ 3 callersFunctionbatchify
(data, bsz)
lm/finetune.py:136
↓ 3 callersFunctionbatchify
(data, bsz)
lm/main.py:108
↓ 3 callersFunctioncalculate_adversarial
args: pred: prediction for one batch (B x C) accent_id: accent id for this batch (1) output: discriminator_loss
utils/metrics.py:164
↓ 3 callersMethodforward_one_batch
(self, model, vocab, src, trg, src_percentages, src_lengths, trg_lengths, smoothing, loss_type, verbose=False)
trainer/asr/transient_trainer.py:25
↓ 3 callersMethodfrom_copy_grad
(self)
models/asr/transformer.py:235
↓ 3 callersFunctionget_batch
(source, i, evaluation=False)
lm/test.py:165
↓ 3 callersFunctionget_batch
(source, i, evaluation=False)
lm/convert.py:165
↓ 3 callersMethodget_lr
(self, optimizer)
trainer/asr/trainer.py:21
↓ 3 callersFunctionget_non_pad_mask
padding position is set to 0, either use input_lengths or pad_idx
modules/common_layers.py:38
↓ 3 callersFunctionget_subsequent_mask
For masking out the subsequent info.
modules/common_layers.py:76
↓ 3 callersMethodgreedy_search
Greedy search, decode 1-best utterance args: encoder_padded_outputs: B x T x H output: batch_ids
modules/decoder.py:131
↓ 3 callersFunctionload_audio
(path)
utils/audio.py:7
↓ 3 callersFunctionload_joint_model
Loading model args: load_path: string
utils/functions.py:190
↓ 3 callersFunctionload_meta_model
Loading model args: load_path: string
utils/functions.py:158
↓ 3 callersFunctionremove_space_in_between_words
Remove space between words args: seq: String output: seq: String
utils/data.py:322
↓ 3 callersFunctionrepackage_hidden
Wraps hidden states in new Tensors, to detach them from their history.
lm/finetune.py:179
↓ 3 callersFunctionrepackage_hidden
Wraps hidden states in new Tensors, to detach them from their history.
lm/main.py:157
↓ 3 callersFunctionsave_model
Saving model, TODO adding history
utils/functions.py:128
↓ 3 callersMethodshuffle
(self, epoch)
utils/data_loader.py:499
↓ 2 callersMethodadd_word
(self, word)
lm/util/data.py:74
↓ 2 callersFunctioncalculate_multi_task
args: pred: prediction for one batch (B x C) accent_id: accent id for this batch (1) output: discriminator_loss
utils/metrics.py:185
↓ 2 callersFunctionevaluate
(data_source, type_evaluation="val")
lm/test.py:189
↓ 2 callersFunctionevaluate
(data_source, type_evaluation="val")
lm/main.py:189
↓ 2 callersMethodevaluate
batch_size = 1
utils/lm.py:101
↓ 2 callersFunctionevaluate_test
(data_source, type_evaluation="val")
lm/test.py:243
↓ 2 callersFunctionforward_one_batch
(model, hidden, inputs)
lm/main_meta_transfer.py:269
↓ 2 callersFunctionget_attn_pad_mask
mask position is set to 1
modules/common_layers.py:67
↓ 2 callersFunctionget_batch
(source, i, evaluation=False)
lm/finetune.py:187
↓ 2 callersFunctionget_batch
(source, i, evaluation=False)
lm/main.py:165
↓ 2 callersMethodget_batch
(self, source, i, evaluation=False)
lm/util/data.py:36
↓ 2 callersMethodget_lr
(self, optimizer)
trainer/asr/transient_trainer.py:75
↓ 2 callersFunctioninit_discriminator_model
(args)
utils/functions.py:353
↓ 2 callersFunctioninit_optimizer
(args, model, opt_type="noam")
utils/functions.py:292
↓ 2 callersFunctionpad_list
(xs, pad_value)
modules/common_layers.py:13
↓ 2 callersMethodpreprocess
Add SOS TOKEN and EOS TOKEN into padded_input
modules/decoder.py:55
↓ 2 callersFunctionremove_space_in_between_words
(seq)
lm/util/texthelper.py:102
↓ 2 callersFunctionrepackage_hidden
Wraps hidden states in new Tensors, to detach them from their history.
lm/main_joint.py:180
↓ 2 callersFunctionrepackage_hidden
Wraps hidden states in new Tensors, to detach them from their history.
lm/main_meta_transfer.py:182
↓ 1 callersMethod__init__
(self, vocab, num_layers, num_heads, dim_emb, dim_model, dim_inner, dim_key, dim_value, dropout=0.1, trg_max_l
modules/decoder.py:19
↓ 1 callersMethod__init__
(self, num_layers, num_heads, dim_model, dim_key, dim_value, dim_input, dim_inner, dropout=0.1, src_max_length
modules/encoder.py:20
↓ 1 callersMethod__init__
(self, model_path, args)
utils/lm.py:43
↓ 1 callersMethod__init__
(self, train_path, valid_path=None, test_path=None, dictionary=None, seed=1000)
lm/util/data.py:84
↓ 1 callersMethod_tokenize_chinese_chars
(self,text)
utils/tokenizer.py:103
↓ 1 callersFunctionaudio_with_sox
crop and resample the recording with sox and loads it.
utils/audio.py:22
↓ 1 callersFunctionaugment_audio_with_sox
Changes tempo and gain of the recording with sox and loads it.
utils/audio.py:35
↓ 1 callersMethodbatchify
(self, data, bsz, cuda)
utils/lm.py:67
↓ 1 callersMethodbatchify
(self, data, bsz)
lm/util/data.py:25
↓ 1 callersFunctionbatchwise_sample
Sample num_samples samples batch_size samples at a time from gen. Does not require gpu since gen.sample() takes care of that.
lm/util/helpers.py:66
↓ 1 callersMethodbeam_search
Beam search, decode nbest utterances args: encoder_padded_outputs: B x T x H beam_size: int
modules/decoder.py:186
↓ 1 callersFunctioncalculate_cer_en_zh
Computes the Character Error Rate, defined as the edit distance. Arguments: s1 (string): space-separated sentence (hyp)
utils/metrics.py:7
↓ 1 callersFunctioncalculate_lm_score
seq: (1, seq_len) id2label: map
utils/lm.py:8
↓ 1 callersFunctioncalculate_loss
Calculate loss args: pred: B x T x C gold: B x T input_lengths: B (for CTC) target_lengths: B (for CTC)
utils/metrics.py:96
next →1–100 of 269, ranked by callers