Unverified Commit 6aaa2b00 authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Change weights return type to Mapping (#6097)

parent 952f4806
...@@ -3,7 +3,7 @@ import inspect ...@@ -3,7 +3,7 @@ import inspect
import sys import sys
from dataclasses import dataclass, fields from dataclasses import dataclass, fields
from inspect import signature from inspect import signature
from typing import Any, Callable, Dict, cast from typing import Any, Callable, Dict, Mapping, cast
from torchvision._utils import StrEnum from torchvision._utils import StrEnum
...@@ -59,7 +59,7 @@ class WeightsEnum(StrEnum): ...@@ -59,7 +59,7 @@ class WeightsEnum(StrEnum):
) )
return obj 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) return load_state_dict_from_url(self.url, progress=progress)
def __repr__(self) -> str: def __repr__(self) -> str:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment