TrivialAugmentWide¶
- class torchvision.transforms.TrivialAugmentWide(num_magnitude_bins: int = 31, interpolation: InterpolationMode = InterpolationMode.NEAREST, fill: Optional[List[float]] = None)[source]¶
使用 TrivialAugment Wide 進行資料集無關的資料增強,如 《TrivialAugment: 免調參但達到 SOTA 的資料增強》中所述。如果影像是 torch Tensor,型別應為 torch.uint8,並且預期形狀為 […, 1 或 3, H, W],其中 … 表示任意數量的前導維度。如果 img 是 PIL Image,預期模式為 “L” 或 “RGB”。
- 引數:
num_magnitude_bins (int) – 不同幅度值的數量。
interpolation (InterpolationMode) – 由
torchvision.transforms.InterpolationMode定義的所需插值模式列舉。預設為InterpolationMode.NEAREST。如果輸入是 Tensor,僅支援InterpolationMode.NEAREST、InterpolationMode.BILINEAR。fill (sequence or number, optional) – 變換後圖像區域外的畫素填充值。如果給定一個數字,該值將分別用於所有波段。
使用
TrivialAugmentWide的示例