目录

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.

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

torch.Tensor subclass for videos.

BoundingBoxFormat(value)

Coordinate format of a bounding box.

BoundingBoxes(data, *, format, canvas_size)

torch.Tensor subclass for bounding boxes.

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

torch.Tensor subclass for segmentation and detection masks.

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.

文档

访问 PyTorch 的全面开发人员文档

查看文档

教程

获取面向初学者和高级开发人员的深入教程

查看教程

资源

查找开发资源并解答您的问题

查看资源