Generator
class torch.Generator(device='cpu')
Creates and returns a generator object that manages the state of
   the algorithm which produces pseudo random numbers. Used as a
   keyword argument in many In-place random sampling functions.
Parameters:
      device ("torch.device", optional) -- the desired device for
      the generator.
Returns:
      An torch.Generator object.
Return type:
      Generator
Example:
  >>> g_cpu = torch.Generator()
  >>> g_cuda = torch.Generator(device='cuda')

device
  Generator.device -> device

  Gets the current device of the generator.

  Example:

     >>> g_cpu = torch.Generator()
     >>> g_cpu.device
     device(type='cpu')

get_state() -> Tensor
  Returns the Generator state as a "torch.ByteTensor".

  Returns:
     A "torch.ByteTensor" which contains all the necessary bits to
     restore a Generator to a specific point in time.

  Return type:
     Tensor
