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
2f32fe82
"docs/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "95235f31837f62be4fd9348a2633018f61c4ace3"
Unverified
Commit
2f32fe82
authored
Sep 16, 2022
by
vfdev
Committed by
GitHub
Sep 16, 2022
Browse files
[proto] Added extra_repr to Compose (#6540)
parent
791bc844
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
torchvision/prototype/transforms/_container.py
torchvision/prototype/transforms/_container.py
+6
-0
No files found.
torchvision/prototype/transforms/_container.py
View file @
2f32fe82
...
@@ -18,6 +18,12 @@ class Compose(Transform):
...
@@ -18,6 +18,12 @@ class Compose(Transform):
sample
=
transform
(
sample
)
sample
=
transform
(
sample
)
return
sample
return
sample
def
extra_repr
(
self
)
->
str
:
format_string
=
[]
for
t
in
self
.
transforms
:
format_string
.
append
(
f
"
{
t
}
"
)
return
"
\n
"
.
join
(
format_string
)
class
RandomApply
(
Compose
):
class
RandomApply
(
Compose
):
def
__init__
(
self
,
transforms
:
Sequence
[
Callable
],
p
:
float
=
0.5
)
->
None
:
def
__init__
(
self
,
transforms
:
Sequence
[
Callable
],
p
:
float
=
0.5
)
->
None
:
...
...
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