improve fx static quantization
@@ -3320,6 +3320,8 @@ class PyTorch_FXAdaptor(TemplateAdaptor):
sub_name = prefix + '--' + node.target
else:
sub_name = node.target
+ if not hasattr(model, node.target):
+ continue
if 'scale' in node.target:
tune_cfg['get_attr'][sub_name] = float(getattr(model, node.target))
elif 'zero_point' in node.target:
