torch.mps.get_rng_state¶ torch.mps.get_rng_state(device='mps')[源代码][源代码]¶ 以 ByteTensor 形式返回随机数生成器状态。 参数 device (torch.device 或 int, 可选) – 返回 RNG 状态的设备。默认值:'mps' (即 torch.device('mps'),当前的 MPS 设备)。 返回类型 Tensor