empty

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

Return a tensor filled with uninitialized data.

Parameters:
  • size (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.