How could I inspect the scale and zero_point value of "QFunctional" from a quantized torchScript Model?

Hello, I try to inspect the Scale and zero_point value of “QFuncational” with a torchscript Model.
But, it always got error: “‘RecursiveScriptModule’ object has no attribute ‘scale’” and “zero_point”.

for “Conv” it can directly got “scale” and “zero_point” value with conv.scale/conv.zero_point.

And, the “QFuncational” actually is “Add”

this works, can you give a repro?

model = nn.Sequential(torch.quantization.QuantStub(), torch.nn.Conv2d(2,2,2))
model.qconfig = torch.quantization.get_default_qconfig()
modelp = torch.quantization.prepare(model)
modelp(torch.randn(1,2,32,32))
modelq = torch.quantization.convert(modelp)
modelj = torch.jit.script(modelq)
print(modelq[1].scale)
print(modelj[1].scale)

also it looks like QFunctionals should still work in the same way (pytorch/functional_modules.py at 22ec6250283568fc475d030dc0b15eda5d13b00b · pytorch/pytorch · GitHub)

so you should be able to inspect them directly.