Table of Contents
Shortcuts

# TVTensor

class torchvision.tv_tensors.TVTensor

  [Beta] Base class for all TVTensors.

  You probably don’t want to use this class unless you’re defining your own custom TVTensors. See How to write your own TVTensor class for details.

  property device: device

    Is the `torch.device` where this Tensor is.

  property ndim: int

    Alias for `dim()`

  property shape: Union[Size, List[int], Tuple[int, ...]]

    Returns the size of the `self` tensor. Alias for `size`.

    See also `Tensor.size()`.

    Example:

        >>> t = torch.empty(3, 4, 5)
        >>> t.size()
        torch.Size([3, 4, 5])
        >>> t.shape
        torch.Size([3, 4, 5])

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.