August 2018
Intermediate to advanced
438 pages
12h 3m
English
Each write head receives an erase vector, et, and an add vector, at, to reset and write to memory, just like an LSTM cell, as follows: Mt(i) ← Mt(i) [1- et (i) wt (i) ] + wt (i) at (i).
Here is the pseudo code for the preceding operations:
mem_size = 128 #The size of memory mem_dim = 16 #The dimensionality for memory shift_range = 1 # defining shift[-1, 0, 1]## last output layer from LSTM controller: last_output## Previous memory state: M_prevdef Linear(input_, output_size, stddev=0.5): '''Applies a linear transformation to the input data: input_ implements dense layer with tf.random_normal_initializer(stddev=stddev) as weight initializer ''''def get_controller_head(M_prev, last_output, is_read=True): k = tf.tanh(Linear(last_output, ...