TrivialAugmentWide¶
- class torchvision.transforms.TrivialAugmentWide(num_magnitude_bins: int = 31, interpolation: InterpolationMode = InterpolationMode.NEAREST, fill: Optional[List[float]] = None)[原始碼]¶
使用 TrivialAugment Wide 進行獨立於資料集的資料擴增,如 “TrivialAugment: Tuning-free Yet State-of-the-Art Data Augmentation” 中所述。如果圖像為 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 (序列 或 數字, 選填) – 轉換後影像外部區域的像素填充值。 如果給定一個數字,則該值將分別用於所有通道。
使用
TrivialAugmentWide
的範例