neurips18_hierchical_image_manipulation icon indicating copy to clipboard operation
neurips18_hierchical_image_manipulation copied to clipboard

ERROR when running Joint Inference model

Open bensuucar opened this issue 5 years ago • 1 comments

I dowloaded pretrained model for city dataset and when I try to run Joint Inference, it cannot find 'network' in self.netG.params_dict.

I have the following error;

Traceback (most recent call last): File "vis_joint_inference.py", line 30, in joint_inference_model = JointInference(joint_opt) File "/data/Bensu/Models/neurips18_hierchical_image_manipulation-master/models/joint_inference_model.py", line 28, in init self.G_box2mask = create_model(self.opt_maskgen) File "/data/Bensu/Models/neurips18_hierchical_image_manipulation-master/models/models.py", line 9, in create_model model = TwoStreamAE_mask(opt) File "/data/Bensu/Models/neurips18_hierchical_image_manipulation-master/models/TwoStreamAE_mask.py", line 119, in init self.netG.params_dict, None, 'G', opt.which_epoch, '') File "/data/Bensu/Models/neurips18_hierchical_image_manipulation-master/models/base_model.py", line 122, in load_network_dict v.load_state_dict(checkpoint['network'][k]) KeyError: 'network'

Is it because I try it with pre-trained networks?Could you please help me to find where the error comes from?

bensuucar avatar Apr 03 '19 12:04 bensuucar

@bensuucar Can you possibly put a breakpoint (import pdb; pdb.set_trace()) at the following line and print out the "checkpoint" or "dir(checkpoint)"? Thank you!

https://github.com/xcyan/neurips18_hierchical_image_manipulation/blob/master/models/base_model.py#L119

xcyan avatar Apr 06 '19 02:04 xcyan