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
0daffad3
Unverified
Commit
0daffad3
authored
Feb 24, 2023
by
Philip Meier
Committed by
GitHub
Feb 24, 2023
Browse files
Cleanup for e2e gallery example for transforms v2 (#7318)
parent
31a4ef9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
docs/source/conf.py
docs/source/conf.py
+1
-0
gallery/plot_transforms_v2_e2e.py
gallery/plot_transforms_v2_e2e.py
+2
-2
No files found.
docs/source/conf.py
View file @
0daffad3
...
@@ -62,6 +62,7 @@ sphinx_gallery_conf = {
...
@@ -62,6 +62,7 @@ sphinx_gallery_conf = {
"gallery_dirs"
:
"auto_examples"
,
# path to where to save gallery generated output
"gallery_dirs"
:
"auto_examples"
,
# path to where to save gallery generated output
"backreferences_dir"
:
"gen_modules/backreferences"
,
"backreferences_dir"
:
"gen_modules/backreferences"
,
"doc_module"
:
(
"torchvision"
,),
"doc_module"
:
(
"torchvision"
,),
"remove_config_comments"
:
True
,
}
}
napoleon_use_ivar
=
True
napoleon_use_ivar
=
True
...
...
gallery/plot_transforms_v2_e2e.py
View file @
0daffad3
"""
"""
==================================================
==================================================
t
ransforms v2: End-to-end object detection example
T
ransforms v2: End-to-end object detection example
==================================================
==================================================
Object detection is not supported out of the box by ``torchvision.transforms`` v1, since it only supports images.
Object detection is not supported out of the box by ``torchvision.transforms`` v1, since it only supports images.
...
@@ -20,7 +20,6 @@ import torch.utils.data
...
@@ -20,7 +20,6 @@ import torch.utils.data
import
torchvision
import
torchvision
# sphinx_gallery_thumbnail_number = -1
def
show
(
sample
):
def
show
(
sample
):
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
...
@@ -125,6 +124,7 @@ dataset = datasets.wrap_dataset_for_transforms_v2(dataset)
...
@@ -125,6 +124,7 @@ dataset = datasets.wrap_dataset_for_transforms_v2(dataset)
torch
.
manual_seed
(
3141
)
torch
.
manual_seed
(
3141
)
sample
=
dataset
[
0
]
sample
=
dataset
[
0
]
# sphinx_gallery_thumbnail_number = 2
show
(
sample
)
show
(
sample
)
...
...
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