tf.image.transpose_image

tf.image.transpose_image(image)

Defined in tensorflow/python/ops/image_ops_impl.py.

Transpose image(s) by swapping the height and width dimension.

See also transpose().

Args:

  • image: 4-D Tensor of shape [batch, height, width, channels] or 3-D Tensor of shape [height, width, channels].

Returns:

If image was 4-D, a 4-D float Tensor of shape [batch, width, height, channels] If image was 3-D, a 3-D float Tensor of shape [width, height, channels]

Raises:

  • ValueError: if the shape of image not supported.