def update_values(old_values, current_value):
      """Update stored values with this time step."""
      shape = [1] * len(tensor_utils.shape(old_values))
      shape[:2] = [batch_size, num_steps]
      tile = tensor_utils.shape(old_values)
      tile[:2] = [1, 1]
      condition = tf.tile(tf.reshape(is_written, shape), tile)
      tile = [1] * len(tensor_utils.shape(old_values))
      tile[1] = num_steps
      current_value = tf.tile(current_value, tile)
      return tf.where(condition, old_values, current_value)
Update stored values with this time step.
language/capwap/utils/transformer_utils.py