As far as I’m aware, if I use torch.manual_seed(12), that will seed the PyTorch random number generator globally, so every time I use any Torch function involving random number generation, it’ll be automatically use the set seed. Is it possible to have seeding for one part of my PyTorch code, but then remove it and allow varying random generation again in a different part of the code? So, for example, I can generate the same array each time with a set seed, but then in a later for-loop, I can generate different random values for each iteration of the loop by not using the seed. I can accomplish this in NumPy by using RandomState to make a local random generator where I want to set a seed, and keep the global random generation without a seed.