AdversarialMask icon indicating copy to clipboard operation
AdversarialMask copied to clipboard

I got an error when i try to implement "ValueError: Inputs last two dimensions must match."

Open Lneverdie opened this issue 2 years ago • 2 comments

Traceback (most recent call last): File "D:\AdversarialMask-master\patch\train.py", line 198, in main() File "D:\AdversarialMask-master\patch\train.py", line 193, in main adv_mask.train() File "D:\AdversarialMask-master\patch\train.py", line 95, in train (b_loss, sep_loss), vars = self.forward_step(img_batch, adv_patch_cpu, cls_id) File "D:\AdversarialMask-master\patch\train.py", line 150, in forward_step img_batch_applied = self.fxz_projector(img_batch, preds, adv_patch, do_aug=self.config.mask_aug) File "C:\Users\17193\anaconda3\envs\py39\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "D:\AdversarialMask-master\patch\nn_modules.py", line 81, in forward texture_img = kornia.geometry.remap(img_batch, map_x=pos_orig[:, 0], map_y=pos_orig[:, 1], File "C:\Users\17193\anaconda3\envs\py39\lib\site-packages\kornia\geometry\transform\imgwarp.py", line 494, in remap raise ValueError("Inputs last two dimensions must match.") ValueError: Inputs last two dimensions must match.

Lneverdie avatar Jul 25 '23 07:07 Lneverdie

Please see solution at #5

AlonZolfi avatar Jul 25 '23 07:07 AlonZolfi

@Lneverdie Hello, I want to changed mask template,but it's empty in mask_uv.py ,could you give me some advice how to do it,thanks

yzgrfsy avatar Aug 03 '23 09:08 yzgrfsy