oneflow.manual_seed

oneflow.manual_seed(seed)

Sets the seed for generating random numbers. Returns a oneflow.Generator object.

The documentation is referenced from: https://pytorch.org/docs/1.10/generated/torch.manual_seed.html.

Parameters

seed (int) – The desired seed. Value must be within the inclusive range [-0x8000_0000_0000_0000, 0xffff_ffff_ffff_ffff]. Otherwise, a RuntimeError is raised. Negative inputs are remapped to positive values with the formula 0xffff_ffff_ffff_ffff + seed.