MCPcopy Create free account

hub / github.com/ankit-ai/cs224n-natural-language-processing-winter2019 / functions

Functions156 in github.com/ankit-ai/cs224n-natural-language-processing-winter2019

↓ 1 callersFunctiontrain
Train the neural dependency parser. @param parser (Parser): Neural Dependency Parser @param train_data (): @param dev_data (): @para
a3_neural_dependency_parsing/run.py:24
↓ 1 callersFunctiontrain
Train the NMT Model. @param args (Dict): args from cmd line
a5_neural_machine_translation_convnet_subword/run.py:106
↓ 1 callersFunctiontrain
Train the NMT Model. @param args (Dict): args from cmd line
a4_neural_machine_translation_s2s_attention/run.py:105
↓ 1 callersFunctiontrain_for_epoch
Train the neural dependency parser for single epoch. Note: In PyTorch we can signify train versus test and automatically have the Dropout La
a3_neural_dependency_parsing/run.py:63
↓ 1 callersMethodwords2indices
Convert list of words or list of sentences of words into list of list of indices. @param sents (list[str] or list[list[str]]): senten
a5_neural_machine_translation_convnet_subword/vocab.py:136
↓ 1 callersMethodwords2indices
Convert list of words or list of sentences of words into list or list of list of indices. @param sents (list[str] or list[list[str]])
a4_neural_machine_translation_s2s_attention/vocab.py:100
Method__contains__
Check if word is captured by VocabEntry. @param word (str): word to look up @returns contains (bool): whether word is contained
a5_neural_machine_translation_convnet_subword/vocab.py:74
Method__contains__
Check if word is captured by VocabEntry. @param word (str): word to look up @returns contains (bool): whether word is contained
a4_neural_machine_translation_s2s_attention/vocab.py:57
Method__getitem__
Retrieve word's index. Return the index for the unk token if the word is out of vocabulary. @param word (str): word to look up.
a5_neural_machine_translation_convnet_subword/vocab.py:66
Method__getitem__
Retrieve word's index. Return the index for the unk token if the word is out of vocabulary. @param word (str): word to look up.
a4_neural_machine_translation_s2s_attention/vocab.py:49
Method__init__
Initialize the parser model. @param embeddings (Tensor): word embeddings (num_words, embedding_size) @param n_features (int): number
a3_neural_dependency_parsing/parser_model.py:33
Method__init__
Initializes this partial parse. @param sentence (list of str): The sentence to be parsed as a list of words.
a3_neural_dependency_parsing/parser_transitions.py:12
Method__init__
(self, dataset)
a3_neural_dependency_parsing/utils/parser_utils.py:45
Method__init__
(self, parser, dataset, sentence_id_to_idx)
a3_neural_dependency_parsing/utils/parser_utils.py:270
Method__init__
(self)
a3_neural_dependency_parsing/utils/parser_utils.py:405
Method__init__
Apply the output of the convolution later (x_conv) through a highway network @param D_in (int): Size of input layer
a5_neural_machine_translation_convnet_subword/cnn.py:13
Method__init__
Init Character Decoder. @param hidden_size (int): Hidden size of the decoder LSTM @param char_embedding_size (int): dimensionality o
a5_neural_machine_translation_convnet_subword/char_decoder.py:12
Method__init__
Init NMT Model. @param embed_size (int): Embedding size (dimensionality) @param hidden_size (int): Hidden Size (dimensionality)
a5_neural_machine_translation_convnet_subword/nmt_model.py:32
Method__init__
Apply the output of the convolution later (x_conv) through a highway network @param D_in (int): Size of input layer
a5_neural_machine_translation_convnet_subword/highway.py:12
Method__init__
Init VocabEntry Instance. @param word2id (dict): dictionary mapping words 2 indices
a5_neural_machine_translation_convnet_subword/vocab.py:33
Method__init__
Init Vocab. @param src_vocab (VocabEntry): VocabEntry for source language @param tgt_vocab (VocabEntry): VocabEntry for target langua
a5_neural_machine_translation_convnet_subword/vocab.py:214
Method__init__
(self)
a5_neural_machine_translation_convnet_subword/sanity_check.py:53
Method__init__
Init the Embedding layer for one language @param embed_size (int): Embedding size (dimensionality) for the output @param voc
a5_neural_machine_translation_convnet_subword/model_embeddings.py:29
Method__init__
Init NMT Model. @param embed_size (int): Embedding size (dimensionality) @param hidden_size (int): Hidden Size (dimensionality)
a4_neural_machine_translation_s2s_attention/nmt_model.py:29
Method__init__
Init VocabEntry Instance. @param word2id (dict): dictionary mapping words 2 indices
a4_neural_machine_translation_s2s_attention/vocab.py:34
Method__init__
Init Vocab. @param src_vocab (VocabEntry): VocabEntry for source language @param tgt_vocab (VocabEntry): VocabEntry for target langua
a4_neural_machine_translation_s2s_attention/vocab.py:154
Method__init__
Init the Embedding layers. @param embed_size (int): Embedding size (dimensionality) @param vocab (Vocab): Vocabulary object
a4_neural_machine_translation_s2s_attention/model_embeddings.py:18
Method__len__
Compute number of words in VocabEntry. @returns len (int): number of words in VocabEntry
a5_neural_machine_translation_convnet_subword/vocab.py:86
Method__len__
Compute number of words in VocabEntry. @returns len (int): number of words in VocabEntry
a4_neural_machine_translation_s2s_attention/vocab.py:69
Method__repr__
Representation of VocabEntry to be used when printing the object.
a5_neural_machine_translation_convnet_subword/vocab.py:92
Method__repr__
Representation of Vocab to be used when printing the object.
a5_neural_machine_translation_convnet_subword/vocab.py:258
Method__repr__
Representation of VocabEntry to be used when printing the object.
a4_neural_machine_translation_s2s_attention/vocab.py:75
Method__repr__
Representation of Vocab to be used when printing the object.
a4_neural_machine_translation_s2s_attention/vocab.py:198
Method__setitem__
Raise error, if one tries to edit the VocabEntry.
a5_neural_machine_translation_convnet_subword/vocab.py:81
Method__setitem__
Raise error, if one tries to edit the VocabEntry.
a4_neural_machine_translation_s2s_attention/vocab.py:64
FunctiondummySampleTokenIdx
()
a2_word2vec/word2vec.py:226
Methodforward
Run the model forward. Note that we will not apply the softmax function here because it is included in the loss function nn.CrossEntropy
a3_neural_dependency_parsing/parser_model.py:119
Methodforward
Take a mini-batch of source and target sentences, compute the log-likelihood of target sentences under the language models learned by the NMT
a5_neural_machine_translation_convnet_subword/nmt_model.py:65
Methodforward
Looks up character-based CNN embeddings for the words in a batch of sentences. @param input: Tensor of integers of shape (sentence_le
a5_neural_machine_translation_convnet_subword/model_embeddings.py:52
Methodforward
Take a mini-batch of source and target sentences, compute the log-likelihood of target sentences under the language models learned by the NMT
a4_neural_machine_translation_s2s_attention/nmt_model.py:86
Functiongenerate_outputs
Generate outputs.
a4_neural_machine_translation_s2s_attention/sanity_check.py:60
FunctiongetRandomContext
(C)
a2_word2vec/word2vec.py:229
Methodget_lc
(k)
a3_neural_dependency_parsing/utils/parser_utils.py:115
Methodget_rc
(k)
a3_neural_dependency_parsing/utils/parser_utils.py:118
Methodid2word
Return mapping of index to word. @param wid (int): word index @returns word (str): word corresponding to index
a5_neural_machine_translation_convnet_subword/vocab.py:98
Methodid2word
Return mapping of index to word. @param wid (int): word index @returns word (str): word corresponding to index
a4_neural_machine_translation_s2s_attention/vocab.py:81
Methodindices2words
Convert list of indices into words. @param word_ids (list[int]): list of word ids @return sents (list[str]): list of words
a5_neural_machine_translation_convnet_subword/vocab.py:144
Methodindices2words
Convert list of indices into words. @param word_ids (list[int]): list of word ids @return sents (list[str]): list of words
a4_neural_machine_translation_s2s_attention/vocab.py:111
Functioninit_weights
(m)
a4_neural_machine_translation_s2s_attention/sanity_check.py:47
Methodload
Load the model from a file. @param model_path (str): path to model
a5_neural_machine_translation_convnet_subword/nmt_model.py:390
Methodload
Load the model from a file. @param model_path (str): path to model
a4_neural_machine_translation_s2s_attention/nmt_model.py:492
FunctionnaiveSoftmaxLossAndGradient
Naive Softmax loss & gradient function for word2vec models Implement the naive softmax loss and gradients between a center word's embedding
a2_word2vec/word2vec.py:26
FunctionnegSamplingLossAndGradient
Negative sampling loss function for word2vec models Implement the negative sampling loss and gradients for a centerWordVec and a outsideWord
a2_word2vec/word2vec.py:83
Methodpredict
(self, partial_parses)
a3_neural_dependency_parsing/utils/parser_utils.py:275
FunctionstepFunction
(Ybar_t, dec_state, enc_hiddens, enc_hiddens_proj, enc_masks)
a4_neural_machine_translation_s2s_attention/sanity_check.py:137
Functiontest_all_close
(name, actual, expected)
a3_neural_dependency_parsing/utils/general_utils.py:56
← previous101–156 of 156, ranked by callers