pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::AttackOptions Struct Reference

Settings for Fgsm() and Pgd(). More...

#include <adversarial.hpp>

Public Attributes

double epsilon = 0.03
 The budget: every adversarial input is within epsilon of its original.
 
AttackNorm norm = AttackNorm::Linf
 
int64_t steps = 10
 PGD: the number of steps.
 
double step_size = 0.0
 PGD: the step size; 0 means 2.5 epsilon / steps, Madry et al.'s choice.
 
bool random_start = true
 PGD: start at a uniformly random point of the ball (the L2 ball for L2), as Madry et al. do; without it PGD starts at the input.
 
uint64_t seed = 0
 
double clip_min = -std::numeric_limits<double>::infinity()
 The valid range of each input element, such as [0, 1] for pixels; every adversarial input is clipped into it. Unbounded by default.
 
double clip_max = std::numeric_limits<double>::infinity()
 

Detailed Description

Settings for Fgsm() and Pgd().

Member Data Documentation

◆ clip_max

double pulsatrix::AttackOptions::clip_max = std::numeric_limits<double>::infinity()

◆ clip_min

double pulsatrix::AttackOptions::clip_min = -std::numeric_limits<double>::infinity()

The valid range of each input element, such as [0, 1] for pixels; every adversarial input is clipped into it. Unbounded by default.

◆ epsilon

double pulsatrix::AttackOptions::epsilon = 0.03

The budget: every adversarial input is within epsilon of its original.

◆ norm

AttackNorm pulsatrix::AttackOptions::norm = AttackNorm::Linf

◆ random_start

bool pulsatrix::AttackOptions::random_start = true

PGD: start at a uniformly random point of the ball (the L2 ball for L2), as Madry et al. do; without it PGD starts at the input.

◆ seed

uint64_t pulsatrix::AttackOptions::seed = 0

◆ step_size

double pulsatrix::AttackOptions::step_size = 0.0

PGD: the step size; 0 means 2.5 epsilon / steps, Madry et al.'s choice.

◆ steps

int64_t pulsatrix::AttackOptions::steps = 10

PGD: the number of steps.


The documentation for this struct was generated from the following file: