Generator
Creates and returns a generator object that manages the state of the algorithm which produces pseudo random numbers.
Attributes
- Source
- Generator.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Returns the Generator state as a [[torch.Tensor[UInt8]].
Returns the initial seed for generating random numbers.
Sets the seed for generating random numbers. Returns a torch.Generator object.
Sets the seed for generating random numbers. Returns a torch.Generator object.
It is recommended to set a large seed, i.e. a number that has a good balance of 0 and 1 bits. Avoid having many 0 bits in the seed.
Value parameters
- seed
-
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.
Attributes
- Source
- Generator.scala
Gets a non-deterministic random number from std::random_device or the current time and uses it to seed a Generator.
Gets a non-deterministic random number from std::random_device or the current time and uses it to seed a Generator.
Attributes
- Source
- Generator.scala
Concrete fields
Attributes
- Source
- Generator.scala