new_empty_tensor.py 376 Bytes
Newer Older
eellison's avatar
eellison committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import torch
from torch.jit.annotations import List
from torch import Tensor


def _new_empty_tensor(x, shape):
    # type: (Tensor, List[int]) -> Tensor
    """
    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)