Video¶
- class torchvision.tv_tensors.Video(data: Any, *, dtype: torch.dtype | None = None, device: torch.device | str | int | None = None, requires_grad: bool | None = None)[source]¶
torch.Tensorsubclass for videos with shape[..., T, C, H, W].- Parameters:
data (tensor-like) – Any data that can be turned into a tensor with
torch.as_tensor().dtype (torch.dpython:type, optional) – Desired data type. If omitted, will be inferred from
data.device (torch.device, optional) – Desired device. If omitted and
datais atorch.Tensor, the device is taken from it. Otherwise, the video is constructed on the CPU.requires_grad (bool, optional) – Whether autograd should record operations. If omitted and
datais atorch.Tensor, the value is taken from it. Otherwise, defaults toFalse.
Examples using
Video: