MCPcopy Create free account

hub / github.com/barronalex/Dynamic-Memory-Networks-in-TensorFlow / functions

Functions31 in github.com/barronalex/Dynamic-Memory-Networks-in-TensorFlow

↓ 5 callersFunctionprocess_word
(word, word2vec, vocab, ivocab, word_vector_size, to_return="word2vec", silent=True)
babi_input.py:124
↓ 4 callersFunctionpad_inputs
(inputs, lens, max_len, mode="", sen_lens=None, max_sen_len=None)
babi_input.py:221
↓ 3 callersFunction_linear
Linear map: sum_i(args[i] * W[i]), where W[i] is a variable. Args: args: a 2D Tensor or a list of 2D, batch x n, Tensors. output_size: int
attention_gru_cell.py:72
↓ 3 callersFunctionget_lens
(inputs, split_sentences=False)
babi_input.py:201
↓ 3 callersMethodrun_epoch
(self, session, data, num_epoch=0, train_writer=None, train_op=None, verbose=2, train=False)
dmn_plus.py:275
↓ 2 callersFunctioninit_babi
(fname)
babi_input.py:13
↓ 2 callersFunctionprocess_input
(data_raw, floatX, word2vec, vocab, ivocab, embed_size, split_sentences=False)
babi_input.py:139
↓ 1 callersFunction_add_gradient_noise
Adds gradient noise as described in http://arxiv.org/abs/1511.06807 The input Tensor `t` should be a gradient. The output will be `t` + gaussi
dmn_plus.py:55
↓ 1 callersFunction_position_encoding
We could have used RNN for parsing sentence but that tends to overfit. The simpler choice would be to take sum of embedding but we loose loose pos
dmn_plus.py:65
↓ 1 callersMethodadd_answer_module
Linear softmax answer module
dmn_plus.py:221
↓ 1 callersMethodadd_loss_op
Calculate loss
dmn_plus.py:105
↓ 1 callersMethodadd_placeholders
add data placeholder to graph
dmn_plus.py:88
↓ 1 callersMethodadd_training_op
Calculate and apply gradients
dmn_plus.py:118
↓ 1 callersFunctioncreate_embedding
(word2vec, ivocab, embed_size)
babi_input.py:242
↓ 1 callersFunctioncreate_vector
(word, word2vec, word_vector_size, silent=True)
babi_input.py:116
↓ 1 callersMethodgenerate_episode
Generate episode by applying attention to current fact vectors through a modified GRU
dmn_plus.py:195
↓ 1 callersMethodget_attention
Use question vector and previous memory to create scalar attention for current fact
dmn_plus.py:172
↓ 1 callersFunctionget_babi_raw
(id, test_id)
babi_input.py:47
↓ 1 callersMethodget_input_representation
Get fact (sentence) vectors via embedding, positional encoding and bi-directional GRU
dmn_plus.py:146
↓ 1 callersMethodget_predictions
(self, output)
dmn_plus.py:100
↓ 1 callersMethodget_question_representation
Get question vectors via embedding and GRU
dmn_plus.py:133
↓ 1 callersFunctionget_sentence_lens
(inputs)
babi_input.py:207
↓ 1 callersMethodinference
Performs inference on the DMN model
dmn_plus.py:232
↓ 1 callersMethodload_data
Loads train/valid/test data and sentence encoding
dmn_plus.py:80
↓ 1 callersFunctionload_glove
(dim)
babi_input.py:102
Method__call__
Attention GRU with nunits cells.
attention_gru_cell.py:50
Method__init__
(self, num_units, input_size=None, activation=tanh)
attention_gru_cell.py:35
Method__init__
(self, config)
dmn_plus.py:326
Functionload_babi
(config, split_sentences=False)
babi_input.py:249
Methodoutput_size
(self)
attention_gru_cell.py:47
Methodstate_size
(self)
attention_gru_cell.py:42