我要评分
获取效率
正确性
完整性
易理解

Interface Description

The interfaces of the PyTorch image operator are the same as those of PyTorch. Table 1 lists optimized interfaces. To facilitate adaptation, Interface Definition uses PyTorch function interfaces as examples.

Table 1 Optimized interfaces

Interface

Description

normalize

Normalizes a tensor image using the mean and standard deviation.

permute

Changes the sequence of each dimension of a tensor so that the memory layout is continuous.

resize

Resizes an image. The Bilinear and Bicubic interpolation modes are optimized.

crop

Crops a rectangular region from an image or video frame.

write_video

Encodes a video frame array in tensor format and writes it to a video file.