8000 GitHub - peustr/wt-pgd: Supporting code for the paper: Attacking Adversarial Defences by Smoothing the Loss Landscape. Eustratiadis et al. (ICML Workshop on Adversarial Machine Learning, 2022)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ wt-pgd Public

Supporting code for the paper: Attacking Adversarial Defences by Smoothing the Loss Landscape. Eustratiadis et al. (ICML Workshop on Adversarial Machine Learning, 2022)

Notifications You must be signed in to change notification settings

peustr/wt-pgd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wt-pgd

Installation

conda create -n wtpgd python=3.7
conda activate wtpgd
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
pip install -r requirements.txt
pip install -e .

Example usage

Getting the loss landscape of an adversarial defence.

# assuming the model and data has been loaded
x, y, z, g1, g2 = get_loss_landscape(model, img, target)
fig, ax = create_figure(x, y, z, savefig=True)
plt.show()

Getting the loss landscape of an adversarial defence under attack by WTPGD.

# assuming the model and data has been loaded
x, y, z, g1, g2 = get_loss_landscape(model, img, target, use_wtpgd=True, wtpgd_args={})
fig, ax = create_figure(x, y, z, savefig=True)
plt.show()

About

Supporting code for the paper: Attacking Adversarial Defences by Smoothing the Loss Landscape. Eustratiadis et al. (ICML Workshop on Adversarial Machine Learning, 2022)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0