(cls, obj: Any)
| 78 | |
| 79 | @classmethod |
| 80 | def verify(cls, obj: Any) -> Any: |
| 81 | if obj is not None: |
| 82 | if type(obj) is str: |
| 83 | obj = cls[obj.replace(cls.__name__ + ".", "")] |
| 84 | elif not isinstance(obj, cls): |
| 85 | raise TypeError( |
| 86 | f"Invalid Weight class provided; expected {cls.__name__} but received {obj.__class__.__name__}." |
| 87 | ) |
| 88 | return obj |
| 89 | |
| 90 | def get_state_dict(self, *args: Any, **kwargs: Any) -> dict[str, Any]: |
| 91 | return load_state_dict_from_url(self.url, *args, **kwargs) |
no outgoing calls
no test coverage detected