fn
fliplr
→Tensorfliplr(input: Tensor)Flip a 2-D-or-higher tensor left-to-right (along axis 1).
Shortcut for flip with dims=[1]. Requires `input.ndim
= 2`.
Parameters
inputTensorSource tensor with at least 2 dimensions.
Returns
TensorTensor with axis 1 reversed.
Notes
For a matrix , this returns where is the anti-diagonal exchange matrix.
Examples
>>> import lucid
>>> A = lucid.tensor([[1, 2, 3], [4, 5, 6]])
>>> lucid.fliplr(A)
Tensor([[3, 2, 1],
[6, 5, 4]])