部分操作是危险的,会中断梯度流。
self.patch_transformer(adv_patch, lab_batch, img_size, do_rotate=True, rand_loc=False)
p_img_batch = self.patch_applier(img_batch, adv_batch_t) # torch.Size([56, 3, 329, 416])
torch.clamp(adv_batch, 0.000001, 0.99999)
affine