Skip to content

computing gradient #26

@ChoiDae1

Description

@ChoiDae1

Hello. I'm interested in your work and have a question about your implementation.
When implementing PGD, I noticed that your code uses only the gradient sign, not the gradient value, as shown in the following line:
adv_noise.data = (adv_noise.data - alpha * adv_noise.grad.detach().sign()).clamp(-epsilon, epsilon) in visual_attacker.py
Is there a specific reason for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions