torch_get_rng_state | R Documentation |
Low level functionality to set and change the RNG state.
It's recommended to use torch_manual_seed()
for most cases.
torch_get_rng_state()
torch_set_rng_state(state)
cuda_get_rng_state(device = NULL)
cuda_set_rng_state(state, device = NULL)
state |
A tensor with the current state or a list containing the state for each device - (for CUDA). |
device |
The cuda device index to get or set the state. If |
torch_set_rng_state()
: Sets the RNG state for the CPU
cuda_get_rng_state()
: Gets the RNG state for CUDA.
cuda_set_rng_state()
: Sets the RNG state for CUDA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.