"docs/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "bd37611b263eb17288e78553463da7af65664ce5"
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
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:
......
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