This function sets the seed for both R's random number generator and Torch's random number generator, ensuring reproducibility across operations that involve both R and Torch.
Details
The function calls set.seed() to set the seed for R's random number generator and
torch::torch_manual_seed() to set the seed for Torch's random number generator. This is useful
for ensuring reproducibility in scripts that rely on both R and Torch for random operations.