mindspore.ops.fliplr

View Source On Gitee
mindspore.ops.fliplr(input)[source]

Flip the input tensor in left/right direction.

Parameters

input (Tensor) – The input tensor, the dimension must be at least 2.

Returns

Tensor

Supported Platforms:

Ascend GPU CPU

Examples

>>> import mindspore
>>> import numpy as np
>>> input = mindspore.tensor(np.arange(1, 9).reshape((2, 2, 2)))
>>> output = mindspore.ops.fliplr(input)
>>> print(output)
[[[3 4]
  [1 2]]
 [[7 8]
  [5 6]]]