torch.get_rng_state torch.get_rng_state() Returns the random number generator state as a torch.ByteTensor. See also: torch.random.fork_rng().