a = torch.randint(0, 2, (3, 3)). print(a). random.shuffle(a). print(a). 因此,经过查找资料后,总结pytorch的tensor可以利用如下方式进行shuffle。
確定! 回上一頁