empty

dragon.vm.torch.empty(
  *sizes,
  dtype=None,
  device=None,
  requires_grad=False
)[source]

Return a tensor filled with uninitialized data.

Parameters:
  • sizes (int...) – The sizes of output tensor.
  • dtype (str, optional) – The optional data type.
  • device (dragon.vm.torch.device, optional) – The optional device option.
  • requires_grad (bool, optional, default=False) – Whether to compute the gradient if necessary.
Returns:

dragon.vm.torch.Tensor – The output tensor.