Open gmt710 opened 5 years ago
Hi,Thanks for your sharing.I run test.py .I encountered a problem and solved it.
Error:AttributeError: 'Blade_runner' object has no attribute 'perturb_mD_img' line 357
adv_img, perturb, distance = trainer.attacker.perturb_mD_img(img,save_perturb=save_path_perturb, rois=rois, roi_scores=roi_scores)
change to:
adv_img, perturb, distance = trainer.attacker.perturb(img, save_perturb=save_path_perturb, rois=rois, roi_scores=roi_scores)
Hope it's useful to others. @gmt710 Thanks a lot, but why.
Hi,Thanks for your sharing.I run test.py .I encountered a problem and solved it.
Error:AttributeError: 'Blade_runner' object has no attribute 'perturb_mD_img' line 357
adv_img, perturb, distance = trainer.attacker.perturb_mD_img(img,save_perturb=save_path_perturb, rois=rois, roi_scores=roi_scores)
change to:
adv_img, perturb, distance = trainer.attacker.perturb(img, save_perturb=save_path_perturb, rois=rois, roi_scores=roi_scores)
Hope it's useful to others.
@gmt710 I know, Thank you.
Hi,Thanks for your sharing.I run test.py .I encountered a problem and solved it.
Error:AttributeError: 'Blade_runner' object has no attribute 'perturb_mD_img' line 357
adv_img, perturb, distance = trainer.attacker.perturb_mD_img(img,save_perturb=save_path_perturb, rois=rois, roi_scores=roi_scores)
change to:
adv_img, perturb, distance = trainer.attacker.perturb(img, save_perturb=save_path_perturb, rois=rois, roi_scores=roi_scores)
Hope it's useful to others.
Thanks for the solution.
I have another error in the same function call. In the calAttentionMask function. It has
roi_weight = np.ones((h, w)) * roi_scores[i]
and in my case roi_scores is a torch tensor with size torch.Size([300, 21]))
, which does not match with the dimension of np.ones((h, w))
. I was curious what exactly is this function doing. Did you have the same issue and how did you solve it?
Thanks in advance!
Hi,Thanks for your sharing.I run test.py .I encountered a problem and solved it.
Error:AttributeError: 'Blade_runner' object has no attribute 'perturb_mD_img' line 357
change to:
Hope it's useful to others.