mindspore.mint.flip
- mindspore.mint.flip(input, dims)[source]
Reverses elements in a tensor along the given dims.
- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> import numpy as np >>> input = mindspore.tensor(np.arange(1, 9).reshape((2, 2, 2))) >>> output = mindspore.mint.flip(input, (0, 2)) >>> print(output) [[[6 5] [8 7]] [[2 1] [4 3]]]