Flip an image horizontally (left to right). Outputs the contents of `image` flipped along the width dimension. See also `reverse()`. Args: image: 4-D Tensor of shape `[batch, height, width, channels]` or 3-D Tensor of shape `[height, width, channels]`. Returns: A tensor of
(image)
| 413 | |
| 414 | @tf_export('image.flip_left_right') |
| 415 | def flip_left_right(image): |
| 416 | """Flip an image horizontally (left to right). |
| 417 | |
| 418 | Outputs the contents of `image` flipped along the width dimension. |
| 419 | |
| 420 | See also `reverse()`. |
| 421 | |
| 422 | Args: |
| 423 | image: 4-D Tensor of shape `[batch, height, width, channels]` or 3-D Tensor |
| 424 | of shape `[height, width, channels]`. |
| 425 | |
| 426 | Returns: |
| 427 | A tensor of the same type and shape as `image`. |
| 428 | |
| 429 | Raises: |
| 430 | ValueError: if the shape of `image` not supported. |
| 431 | """ |
| 432 | return _flip(image, 1, 'flip_left_right') |
| 433 | |
| 434 | |
| 435 | @tf_export('image.flip_up_down') |