[ 仅 API 调用方式不一致 ]torchvision.transforms.RandomRotation
torchvision.transforms.RandomRotation
torchvision.transforms.RandomRotation(degrees, interpolation=torchvision.transforms.InterpolationMode.NEAREST, expand=False, center=None, fill=0)
paddle.vision.transforms.RandomRotation
paddle.vision.transforms.RandomRotation(degrees, interpolation='nearest', expand=False, center=None, fill=0, keys=None)
两者功能一致,但调用方式不一致,具体如下:
转写示例
# PyTorch 写法
rotation = torchvision.transforms.RandomRotation(degrees=degrees)
# Paddle 写法
rotation = paddle.vision.transforms.RandomRotation(degrees=degrees)
