Flip an image vertically (upside down). Outputs the contents of `image` flipped along the height 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 t
(image)
| 434 | |
| 435 | @tf_export('image.flip_up_down') |
| 436 | def flip_up_down(image): |
| 437 | """Flip an image vertically (upside down). |
| 438 | |
| 439 | Outputs the contents of `image` flipped along the height dimension. |
| 440 | |
| 441 | See also `reverse()`. |
| 442 | |
| 443 | Args: |
| 444 | image: 4-D Tensor of shape `[batch, height, width, channels]` or 3-D Tensor |
| 445 | of shape `[height, width, channels]`. |
| 446 | |
| 447 | Returns: |
| 448 | A `Tensor` of the same type and shape as `image`. |
| 449 | |
| 450 | Raises: |
| 451 | ValueError: if the shape of `image` not supported. |
| 452 | """ |
| 453 | return _flip(image, 0, 'flip_up_down') |
| 454 | |
| 455 | |
| 456 | def _flip(image, flip_index, scope_name): |