所以尝试对下标进行shuffle,然后根据下标取对应的元素。 import torch. import random. a = torch.rand(9). print('a:\n', a). random.shuffle(a).
確定! 回上一頁