'Combines previous state (from encoder) with internal attention values.
You must use this function to derive the initial state passed into
this cell as it expects a named tuple (AttentionTuple).
Args:
previous_state: State from another block that will be fed into this cell;
Must have same structure as the state of the cell wrapped by this.
Returns:
Combined state (AttentionTuple).'

def combine_state(self, previous_state):

    batch_size = self._attn_states.get_shape()[0].value
    if (batch_size is None):
        batch_size = tf.shape(self._attn_states)[0]
    zeroed_state = self.zero_state(batch_size, self._attn_states.dtype)
    return AttentionTuple(previous_state, zeroed_state.attention)
