def _determine_encoder_cell_index(self, cell_number, num_encoder_cells):
    """Attend to final encoder cell output first, then move down."""
    return max(
        0, num_encoder_cells -
        max(0, (cell_number - self.delay) * self.increment_step) - 1)
Attend to final encoder cell output first, then move down.
tensor2tensor/models/neural_architecture_search/nas_layers.py