Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/barronalex/Dynamic-Memory-Networks-in-TensorFlow
/ functions
Functions
31 in github.com/barronalex/Dynamic-Memory-Networks-in-TensorFlow
⨍
Functions
31
◇
Types & classes
3
↓ 5 callers
Function
process_word
(word, word2vec, vocab, ivocab, word_vector_size, to_return="word2vec", silent=True)
babi_input.py:124
↓ 4 callers
Function
pad_inputs
(inputs, lens, max_len, mode="", sen_lens=None, max_sen_len=None)
babi_input.py:221
↓ 3 callers
Function
_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 callers
Function
get_lens
(inputs, split_sentences=False)
babi_input.py:201
↓ 3 callers
Method
run_epoch
(self, session, data, num_epoch=0, train_writer=None, train_op=None, verbose=2, train=False)
dmn_plus.py:275
↓ 2 callers
Function
init_babi
(fname)
babi_input.py:13
↓ 2 callers
Function
process_input
(data_raw, floatX, word2vec, vocab, ivocab, embed_size, split_sentences=False)
babi_input.py:139
↓ 1 callers
Function
_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 callers
Function
_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 callers
Method
add_answer_module
Linear softmax answer module
dmn_plus.py:221
↓ 1 callers
Method
add_loss_op
Calculate loss
dmn_plus.py:105
↓ 1 callers
Method
add_placeholders
add data placeholder to graph
dmn_plus.py:88
↓ 1 callers
Method
add_training_op
Calculate and apply gradients
dmn_plus.py:118
↓ 1 callers
Function
create_embedding
(word2vec, ivocab, embed_size)
babi_input.py:242
↓ 1 callers
Function
create_vector
(word, word2vec, word_vector_size, silent=True)
babi_input.py:116
↓ 1 callers
Method
generate_episode
Generate episode by applying attention to current fact vectors through a modified GRU
dmn_plus.py:195
↓ 1 callers
Method
get_attention
Use question vector and previous memory to create scalar attention for current fact
dmn_plus.py:172
↓ 1 callers
Function
get_babi_raw
(id, test_id)
babi_input.py:47
↓ 1 callers
Method
get_input_representation
Get fact (sentence) vectors via embedding, positional encoding and bi-directional GRU
dmn_plus.py:146
↓ 1 callers
Method
get_predictions
(self, output)
dmn_plus.py:100
↓ 1 callers
Method
get_question_representation
Get question vectors via embedding and GRU
dmn_plus.py:133
↓ 1 callers
Function
get_sentence_lens
(inputs)
babi_input.py:207
↓ 1 callers
Method
inference
Performs inference on the DMN model
dmn_plus.py:232
↓ 1 callers
Method
load_data
Loads train/valid/test data and sentence encoding
dmn_plus.py:80
↓ 1 callers
Function
load_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
Function
load_babi
(config, split_sentences=False)
babi_input.py:249
Method
output_size
(self)
attention_gru_cell.py:47
Method
state_size
(self)
attention_gru_cell.py:42