Skip to content

Commit 386cfe2

Browse files
authored
remove RandomApply inheritance from SimpleCopyPaste (#7045)
1 parent 0dceac0 commit 386cfe2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

torchvision/prototype/transforms/_augment.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from torchvision.ops import masks_to_boxes
1111
from torchvision.prototype import datapoints
12-
from torchvision.prototype.transforms import functional as F, InterpolationMode
12+
from torchvision.prototype.transforms import functional as F, InterpolationMode, Transform
1313

1414
from ._transform import _RandomApplyTransform
1515
from .utils import has_any, is_simple_tensor, query_chw, query_spatial_size
@@ -191,15 +191,14 @@ def _transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
191191
return inpt
192192

193193

194-
class SimpleCopyPaste(_RandomApplyTransform):
194+
class SimpleCopyPaste(Transform):
195195
def __init__(
196196
self,
197-
p: float = 0.5,
198197
blending: bool = True,
199198
resize_interpolation: InterpolationMode = F.InterpolationMode.BILINEAR,
200199
antialias: Optional[bool] = None,
201200
) -> None:
202-
super().__init__(p=p)
201+
super().__init__()
203202
self.resize_interpolation = resize_interpolation
204203
self.blending = blending
205204
self.antialias = antialias

0 commit comments

Comments
 (0)