I have a tensor that defined as one hot as
label = torch.from_numpy(np.asarray([0, 0, 1, 0, 0, 0 , 0])).long()

I want to randomly shuffle the 1 position to another position in the label such as the new tensor does not equal the label. Do we have any function to do it in pytorch? For example
new_label = torch.from_numpy(np.asarray([0, 1, 0, 0, 0, 0 , 0])).long()