How to use the torchattacks.attacks.rfgsm.RFGSM function in torchattacks

To help you get started, we’ve selected a few torchattacks examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Harry24k / adversairal-attacks-pytorch / torchattacks / attacks / rfgsm.py View on Github external
def __init__(self, model, eps=16/255, alpha=8/255, iters=1):
        super(RFGSM, self).__init__("RFGSM", model)
        self.eps = eps
        self.alpha = alpha
        self.iters = iters