We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4575e5 commit 0bdd01aCopy full SHA for 0bdd01a
torchvision/datasets/utils.py
@@ -451,7 +451,7 @@ def verify_str_arg(
451
valid_values: Optional[Iterable[T]] = None,
452
custom_msg: Optional[str] = None,
453
) -> T:
454
- if not isinstance(value, torch._six.string_classes):
+ if not isinstance(value, str):
455
if arg is None:
456
msg = "Expected type str, but got type {type}."
457
else:
torchvision/datasets/vision.py
@@ -36,7 +36,7 @@ def __init__(
36
target_transform: Optional[Callable] = None,
37
) -> None:
38
_log_api_usage_once(self)
39
- if isinstance(root, torch._six.string_classes):
+ if isinstance(root, str):
40
root = os.path.expanduser(root)
41
self.root = root
42
0 commit comments