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
6aaa2b00
"docs/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "bd37611b263eb17288e78553463da7af65664ce5"
Unverified
Commit
6aaa2b00
authored
May 26, 2022
by
Vasilis Vryniotis
Committed by
GitHub
May 26, 2022
Browse files
Change weights return type to Mapping (#6097)
parent
952f4806
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchvision/models/_api.py
torchvision/models/_api.py
+2
-2
No files found.
torchvision/models/_api.py
View file @
6aaa2b00
...
...
@@ -3,7 +3,7 @@ import inspect
import
sys
from
dataclasses
import
dataclass
,
fields
from
inspect
import
signature
from
typing
import
Any
,
Callable
,
Dict
,
cast
from
typing
import
Any
,
Callable
,
Dict
,
Mapping
,
cast
from
torchvision._utils
import
StrEnum
...
...
@@ -59,7 +59,7 @@ class WeightsEnum(StrEnum):
)
return
obj
def
get_state_dict
(
self
,
progress
:
bool
)
->
Dict
[
str
,
Any
]:
def
get_state_dict
(
self
,
progress
:
bool
)
->
Mapping
[
str
,
Any
]:
return
load_state_dict_from_url
(
self
.
url
,
progress
=
progress
)
def
__repr__
(
self
)
->
str
:
...
...
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