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
58842057
Unverified
Commit
58842057
authored
Jun 21, 2023
by
Philip Meier
Committed by
GitHub
Jun 21, 2023
Browse files
fix mypy (#7685)
parent
016804ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
torchvision/models/_api.py
torchvision/models/_api.py
+3
-1
No files found.
torchvision/models/_api.py
View file @
58842057
...
...
@@ -122,7 +122,9 @@ def get_weight(name: str) -> WeightsEnum:
base_module_name
=
"."
.
join
(
sys
.
modules
[
__name__
].
__name__
.
split
(
"."
)[:
-
1
])
base_module
=
importlib
.
import_module
(
base_module_name
)
model_modules
=
[
base_module
]
+
[
x
[
1
]
for
x
in
inspect
.
getmembers
(
base_module
,
inspect
.
ismodule
)
if
x
[
1
].
__file__
.
endswith
(
"__init__.py"
)
x
[
1
]
for
x
in
inspect
.
getmembers
(
base_module
,
inspect
.
ismodule
)
if
x
[
1
].
__file__
.
endswith
(
"__init__.py"
)
# type: ignore[union-attr]
]
weights_enum
=
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