def _flatten_spatial_dimensions(batch_images):
    (batch_size, height, width, channels) = _get_shape(batch_images, 4)
    return tf.reshape(batch_images, [batch_size, (height * width), channels])
def _flatten_spatial_dimensions(batch_images):
    (batch_size, height, width, channels) = _get_shape(batch_images, 4)
    return tf.reshape(batch_images, [batch_size, (height * width), channels])