Solved by albanD in post #4 
              
              
                You can check the doc here. It returns the value used to initialize the random number generator. 
You can also use get/set rng state (https://pytorch.org/docs/stable/torch.html#torch.get_rng_state).