"src/vscode:/vscode.git/clone" did not exist on "751e250f70cf446ae342c8a860d92f6a8b78261a"
Unverified Commit 386cfe2a authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

remove RandomApply inheritance from SimpleCopyPaste (#7045)

parent 0dceac02
......@@ -9,7 +9,7 @@ from torch.utils._pytree import tree_flatten, tree_unflatten
from torchvision.ops import masks_to_boxes
from torchvision.prototype import datapoints
from torchvision.prototype.transforms import functional as F, InterpolationMode
from torchvision.prototype.transforms import functional as F, InterpolationMode, Transform
from ._transform import _RandomApplyTransform
from .utils import has_any, is_simple_tensor, query_chw, query_spatial_size
......@@ -191,15 +191,14 @@ class RandomCutmix(_BaseMixupCutmix):
return inpt
class SimpleCopyPaste(_RandomApplyTransform):
class SimpleCopyPaste(Transform):
def __init__(
self,
p: float = 0.5,
blending: bool = True,
resize_interpolation: InterpolationMode = F.InterpolationMode.BILINEAR,
antialias: Optional[bool] = None,
) -> None:
super().__init__(p=p)
super().__init__()
self.resize_interpolation = resize_interpolation
self.blending = blending
self.antialias = antialias
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment