Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
386cfe2a
"src/vscode:/vscode.git/clone" did not exist on "751e250f70cf446ae342c8a860d92f6a8b78261a"
Unverified
Commit
386cfe2a
authored
Dec 19, 2022
by
Philip Meier
Committed by
GitHub
Dec 19, 2022
Browse files
remove RandomApply inheritance from SimpleCopyPaste (#7045)
parent
0dceac02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
torchvision/prototype/transforms/_augment.py
torchvision/prototype/transforms/_augment.py
+3
-4
No files found.
torchvision/prototype/transforms/_augment.py
View file @
386cfe2a
...
...
@@ -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
(
_RandomApply
Transform
):
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment