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
6af796ab
"vscode:/vscode.git/clone" did not exist on "13bd09dd59aa54fd8b39cd3e1ac3efecb68af386"
Unverified
Commit
6af796ab
authored
Oct 28, 2022
by
Philip Meier
Committed by
GitHub
Oct 28, 2022
Browse files
silence mypy (#6857)
parent
cb60e97a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchvision/prototype/transforms/_augment.py
torchvision/prototype/transforms/_augment.py
+2
-2
No files found.
torchvision/prototype/transforms/_augment.py
View file @
6af796ab
...
@@ -125,7 +125,7 @@ class _BaseMixupCutmix(_RandomApplyTransform):
...
@@ -125,7 +125,7 @@ class _BaseMixupCutmix(_RandomApplyTransform):
class
RandomMixup
(
_BaseMixupCutmix
):
class
RandomMixup
(
_BaseMixupCutmix
):
def
_get_params
(
self
,
flat_inputs
:
List
[
Any
])
->
Dict
[
str
,
Any
]:
def
_get_params
(
self
,
flat_inputs
:
List
[
Any
])
->
Dict
[
str
,
Any
]:
return
dict
(
lam
=
float
(
self
.
_dist
.
sample
(())))
return
dict
(
lam
=
float
(
self
.
_dist
.
sample
(())))
# type: ignore[arg-type]
def
_transform
(
self
,
inpt
:
Any
,
params
:
Dict
[
str
,
Any
])
->
Any
:
def
_transform
(
self
,
inpt
:
Any
,
params
:
Dict
[
str
,
Any
])
->
Any
:
lam
=
params
[
"lam"
]
lam
=
params
[
"lam"
]
...
@@ -147,7 +147,7 @@ class RandomMixup(_BaseMixupCutmix):
...
@@ -147,7 +147,7 @@ class RandomMixup(_BaseMixupCutmix):
class
RandomCutmix
(
_BaseMixupCutmix
):
class
RandomCutmix
(
_BaseMixupCutmix
):
def
_get_params
(
self
,
flat_inputs
:
List
[
Any
])
->
Dict
[
str
,
Any
]:
def
_get_params
(
self
,
flat_inputs
:
List
[
Any
])
->
Dict
[
str
,
Any
]:
lam
=
float
(
self
.
_dist
.
sample
(()))
lam
=
float
(
self
.
_dist
.
sample
(()))
# type: ignore[arg-type]
H
,
W
=
query_spatial_size
(
flat_inputs
)
H
,
W
=
query_spatial_size
(
flat_inputs
)
...
...
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