Shortcuts

TVTensors

TVTensors are torch.Tensor subclasses which the v2 transforms use under the hood to dispatch their inputs to the appropriate lower-level kernels. Most users do not need to manipulate TVTensors directly.

Refer to Getting started with transforms v2 for an introduction to TVTensors, or TVTensors FAQ for more advanced info.

Image(data, *[, dtype, device, requires_grad])

torch.Tensor subclass for images with shape [..., C, H, W].

Video(data, *[, dtype, device, requires_grad])

torch.Tensor subclass for videos with shape [..., T, C, H, W].

BoundingBoxFormat(value)

Coordinate format of a bounding box.

BoundingBoxes(data, *, format, canvas_size)

torch.Tensor subclass for bounding boxes with shape [N, 4].

Mask(data, *[, dtype, device, requires_grad])

torch.Tensor subclass for segmentation and detection masks with shape [..., H, W].

TVTensor

Base class for all TVTensors.

set_return_type(return_type)

Set the return type of torch operations on TVTensor.

wrap(wrappee, *, like, **kwargs)

Convert a torch.Tensor (wrappee) into the same TVTensor subclass as like.

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