torch.Tensor.new_empty — PyTorch 1.10.1 documentation
pytorch.org › torchTensor.new_empty(size, dtype=None, device=None, requires_grad=False) → Tensor. Returns a Tensor of size size filled with uninitialized data. By default, the returned Tensor has the same torch.dtype and torch.device as this tensor. Parameters. dtype ( torch.dtype, optional) – the desired type of returned tensor.
torch.empty — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.empty. torch.empty(*size, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, pin_memory=False, memory_format=torch.contiguous_format) → Tensor. Returns a tensor filled with uninitialized data. The shape of the tensor is defined by the variable argument size. Parameters.