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
0bdd01a7
Unverified
Commit
0bdd01a7
authored
Feb 14, 2023
by
Nicolas Hug
Committed by
GitHub
Feb 14, 2023
Browse files
Remove usage of torch._six (#7243)
parent
d4575e5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
torchvision/datasets/utils.py
torchvision/datasets/utils.py
+1
-1
torchvision/datasets/vision.py
torchvision/datasets/vision.py
+1
-1
No files found.
torchvision/datasets/utils.py
View file @
0bdd01a7
...
@@ -451,7 +451,7 @@ def verify_str_arg(
...
@@ -451,7 +451,7 @@ def verify_str_arg(
valid_values
:
Optional
[
Iterable
[
T
]]
=
None
,
valid_values
:
Optional
[
Iterable
[
T
]]
=
None
,
custom_msg
:
Optional
[
str
]
=
None
,
custom_msg
:
Optional
[
str
]
=
None
,
)
->
T
:
)
->
T
:
if
not
isinstance
(
value
,
torch
.
_six
.
string_classes
):
if
not
isinstance
(
value
,
str
):
if
arg
is
None
:
if
arg
is
None
:
msg
=
"Expected type str, but got type {type}."
msg
=
"Expected type str, but got type {type}."
else
:
else
:
...
...
torchvision/datasets/vision.py
View file @
0bdd01a7
...
@@ -36,7 +36,7 @@ class VisionDataset(data.Dataset):
...
@@ -36,7 +36,7 @@ class VisionDataset(data.Dataset):
target_transform
:
Optional
[
Callable
]
=
None
,
target_transform
:
Optional
[
Callable
]
=
None
,
)
->
None
:
)
->
None
:
_log_api_usage_once
(
self
)
_log_api_usage_once
(
self
)
if
isinstance
(
root
,
torch
.
_six
.
string_classes
):
if
isinstance
(
root
,
str
):
root
=
os
.
path
.
expanduser
(
root
)
root
=
os
.
path
.
expanduser
(
root
)
self
.
root
=
root
self
.
root
=
root
...
...
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