torch.cuda.get_rng_state#
- torch.cuda.get_rng_state(device='cuda')[source]#
将指定 GPU 的随机数生成器状态作为 ByteTensor 返回。
- 参数
device (torch.device or int, optional) – The device to return the RNG state of. Default:
'cuda'
(i.e.,torch.device('cuda')
, the current CUDA device).- 返回类型
警告
This function eagerly initializes CUDA.