ffhibnese / Model-Inversion-Attack-ToolBox

A comprehensive toolbox for model inversion attacks and defenses, which is easy to get started.
116 stars 5 forks source link

I can't find target model for plgmi.py #63

Open WolfNort opened 2 days ago

WolfNort commented 2 days ago

Hi. While running your framework, we encountered a problem with the lack of a target model for the plgmi.py attack. On Google disk there are only discriminators and generators, which do not fit the role of a target. Or we could not determine by brute force. We get this error. C:\Users\arsemenov\Desktop\Model-Inversion-Attack-ToolBox\Dexamples\standard\attacks../../../src\modelinversion\utils\outputs.py:27: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. torch.utils._pytree._register_pytree_node( Traceback (most recent call last): File “C:\Users\arsemenov\Desktop\Model-Inversion-Attack-ToolBox\examples\standard\attacks\plgmi.py”, line 70, in target_model.load_state_dict( File “C:\Users\arsemenov.conda\envs\MIA\lib\site-packages\torch\nn\modules\module\module.py”, line 2153, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for IR152_64: Missing key(s) in state_dict: “feature.input_layer.0.weight”, “feature.input_layer.1.weight”, “feature.input_layer.1.bias”, “feature.input_layer.1.running_mean”, “feature.input_layer.1.running_var”, “feature.input_layer.2 .weight”, ‘feature.body.0.res_layer.0.weight’, ‘feature.body.0.res_layer.0.bias’, ‘feature.body.0.res_layer.0.running_mean’, ‘feature.body.0.res_layer.0.running_var’, ‘feature.body.0.res_layer.1.weight’, ‘feature.body.0.res_layer.2.weight’,

Translated with DeepL.com (free version)

Chrisqcwx commented 2 days ago

Hi,

Regarding the issue you mentioned, the weights for the IR152 model are located in the checkpoints_v2/classifiers/celeba64/celeba64_ir152_93.71.pth in google drive. We have already verified that these files are correct and without errors. Could you please share the path you used for the target model during your run? This will help us better understand the root cause of the problem. If you have any further questions, please feel free to ask, or you can contact me via email.

Thank you for your cooperation, and I look forward to your response!