AttributeError: 'LinearPackedParams' object has no attribute '_load_state_dict_pre_hooks'

when i used the FX to create a quantized FXmodule ,i create on module.py file by "to_folder()"method of FXGraph。but i can not use this created module。

Traceback (most recent call last): File "quantizedmodule/module.py", line 31, in <module> model = FxModule() File "quantizedmodule/module.py", line 13, in __init__ self.load_state_dict(torch.load(r'/home/data/qxh/code/zyy_dlworks/test/quantizedmodule/state_dict.pt')) File "/home/qxh22/.conda/envs/pytorch18/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1483, in load_state_dict load(self) File "/home/qxh22/.conda/envs/pytorch18/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1481, in load load(child, prefix + name + '.') File "/home/qxh22/.conda/envs/pytorch18/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1481, in load load(child, prefix + name + '.') File "/home/qxh22/.conda/envs/pytorch18/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1478, in load state_dict, prefix, local_metadata, True, missing_keys, unexpected_keys, error_msgs) File "/home/qxh22/.conda/envs/pytorch18/lib/python3.7/site-packages/torch/nn/quantized/modules/linear.py", line 84, in _load_from_state_dict missing_keys, unexpected_keys, error_msgs) File "/home/qxh22/.conda/envs/pytorch18/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1379, in _load_from_state_dict for hook in self._load_state_dict_pre_hooks.values(): File "/home/qxh22/.conda/envs/pytorch18/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1186, in __getattr__ type(self).__name__, name)) AttributeError: 'LinearPackedParams' object has no attribute '_load_state_dict_pre_hooks'

Hi, can you share the code you are using to save your state_dict?