I think this is a more elegant solution to the problem leveraging the PyTorch API.
torch.flip(torch.from_numpy(x), dims=(0,))
I think this is a more elegant solution to the problem leveraging the PyTorch API.
torch.flip(torch.from_numpy(x), dims=(0,))