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

Amend the weights only if quantize=True. (#4966)

parent 8dcb5b81
......@@ -43,7 +43,7 @@ class QuantizableSqueezeExcitation(SqueezeExcitation):
):
version = local_metadata.get("version", None)
if version is None or version < 2:
if hasattr(self, "qconfig") and (version is None or version < 2):
default_state_dict = {
"scale_activation.activation_post_process.scale": torch.tensor([1.0]),
"scale_activation.activation_post_process.zero_point": torch.tensor([0], dtype=torch.int32),
......
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