December 2017
Intermediate to advanced
536 pages
14h 23m
English
We proceed with the recipe as follows:
# attention_states: [batch_size, max_time, num_units] attention_states = tf.transpose(encoder_outputs, [1, 0, 2]) # Create an attention mechanism attention_mechanism = tf.contrib.seq2seq.LuongAttention( num_units, attention_states, memory_sequence_length=source_sequence_length)
decoder_cell = tf.contrib.seq2seq.AttentionWrapper( ...
Read now
Unlock full access