We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73efcc6 commit 2ea7133Copy full SHA for 2ea7133
torchvision/models/quantization/mobilenetv3.py
@@ -43,7 +43,7 @@ def _load_from_state_dict(
43
):
44
version = local_metadata.get("version", None)
45
46
- if version is None or version < 2:
+ if hasattr(self, "qconfig") and (version is None or version < 2):
47
default_state_dict = {
48
"scale_activation.activation_post_process.scale": torch.tensor([1.]),
49
"scale_activation.activation_post_process.zero_point": torch.tensor([0], dtype=torch.int32),
0 commit comments