new_empty_tensor.py 363 Bytes
Newer Older
eellison's avatar
eellison committed
1
2
3
4
5
import torch
from torch.jit.annotations import List
from torch import Tensor


6
def _new_empty_tensor(x: Tensor, shape: List[int]) -> Tensor:
eellison's avatar
eellison committed
7
8
9
10
11
12
13
14
15
    """
    Arguments:
        input (Tensor): input tensor
        shape List[int]: the new empty tensor shape

    Returns:
        output (Tensor)
    """
    return torch.ops.torchvision._new_empty_tensor_op(x, shape)