Skip to content

Commit 3f28438

Browse files
YosuaMichaelfacebook-github-bot
authored andcommitted
[fbsync] Change weights return type to Mapping (#6097)
Reviewed By: NicolasHug Differential Revision: D36760951 fbshipit-source-id: 4098becffda7fdf4b987f2ca2ed882f914cde40f
1 parent 7c9f61e commit 3f28438

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/models/_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
from dataclasses import dataclass, fields
55
from inspect import signature
6-
from typing import Any, Callable, Dict, cast
6+
from typing import Any, Callable, Dict, Mapping, cast
77

88
from torchvision._utils import StrEnum
99

@@ -59,7 +59,7 @@ def verify(cls, obj: Any) -> Any:
5959
)
6060
return obj
6161

62-
def get_state_dict(self, progress: bool) -> Dict[str, Any]:
62+
def get_state_dict(self, progress: bool) -> Mapping[str, Any]:
6363
return load_state_dict_from_url(self.url, progress=progress)
6464

6565
def __repr__(self) -> str:

0 commit comments

Comments
 (0)