I am using Post Training Quantization and try to extract the quantized weight for inference phase, but I failed.
I try to directly use
for weight in quantized_model.state_dict():
np.set_printoptions(suppress=True)
print(weight, “\n”, quantized_model.state_dict()[weight].detach().cpu().clone().numpy())
get “TypeError: NumPy conversion for QuantizedCPUQInt8Type is not supported”
Could give me any advice for extracting the quantized weight from the quantized model?
Thank you very much!!