I try to do image = image[:, :, ::-1], but it complains that ValueError: slice step has to be greater than 0. I try image = torch.from_numpy(image.numpy()[:, :, ::-1]), it still complains: RuntimeError: some of the strides of a given numpy array are negative. This is currently not supported, but will be added in future releases.
So how do I flip the image?