torch.cuda.manual_seed_all(0)#為所有的GPU設定種子,以使得結果是確定的 ... 打亂順序. tensor = tensor[torch.randperm(tensor.size(0))] # 打亂第一個維度 ...
確定! 回上一頁